[RELEASED] Python 3.3.0 beta 2

2012-08-13 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On behalf of the Python development team, I'm happy to announce the
second beta release of Python 3.3.0 -- a little later than originally
scheduled, but much better for it.

This is a preview release, and its use is not recommended in
production settings.

Python 3.3 includes a range of improvements of the 3.x series, as well
as easier porting between 2.x and 3.x.  Major new features and changes
in the 3.3 release series are:

* PEP 380, syntax for delegating to a subgenerator (yield from)
* PEP 393, flexible string representation (doing away with the
   distinction between wide and narrow Unicode builds)
* A C implementation of the decimal module, with up to 80x speedup
   for decimal-heavy applications
* The import system (__import__) now based on importlib by default
* The new lzma module with LZMA/XZ support
* PEP 397, a Python launcher for Windows
* PEP 405, virtual environment support in core
* PEP 420, namespace package support
* PEP 3151, reworking the OS and IO exception hierarchy
* PEP 3155, qualified name for classes and functions
* PEP 409, suppressing exception context
* PEP 414, explicit Unicode literals to help with porting
* PEP 418, extended platform-independent clocks in the time module
* PEP 412, a new key-sharing dictionary implementation that
   significantly saves memory for object-oriented code
* PEP 362, the function-signature object
* The new faulthandler module that helps diagnosing crashes
* The new unittest.mock module
* The new ipaddress module
* The sys.implementation attribute
* A policy framework for the email package, with a provisional (see
   PEP 411) policy that adds much improved unicode support for email
   header parsing
* A collections.ChainMap class for linking mappings to a single unit
* Wrappers for many more POSIX functions in the os and signal
   modules, as well as other useful functions such as sendfile()
* Hash randomization, introduced in earlier bugfix releases, is now
   switched on by default

In total, almost 500 API items are new or improved in Python 3.3.
For a more extensive list of changes in 3.3.0, see

 http://docs.python.org/3.3/whatsnew/3.3.html (*)

To download Python 3.3.0 visit:

 http://www.python.org/download/releases/3.3.0/

Please consider trying Python 3.3.0 with your code and reporting any bugs
you may notice to:

 http://bugs.python.org/


Enjoy!

(*) Please note that this document is usually finalized late in the release
cycle and therefore may have stubs and missing entries at this point.

- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and 3.3's contributors)

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlAnxVAACgkQN9GcIYhpnLAECACcDeE+N2AfYVnuwMkq682znfDU
ODAAn0J87+MVA9WHEV5iYZd3ub9ZhbpC
=LvY0
-END PGP SIGNATURE-
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Python Game Programming Challenge (PyWeek) #15 is coming!

2012-08-13 Thread Richard Jones
The 15th Python Game Programming Challenge (PyWeek) is coming. It'll
run from the 9th to the 16th of September:

  http://pyweek.org/

The PyWeek challenge:

1. Invites entrants to write a game in one week from scratch either as
an individual or in a team,
2. Is intended to be challenging and fun,
3. Will increase the public body of game tools, code and expertise,
4. Will let a lot of people actually finish a game, and
5. May inspire new projects (with ready made teams!)


Check out the help page for how to compete and the growing resources
message board post:

   http://pyweek.org/s/help/
   http://pyweek.org/d/4008/


Richard
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


combine modelformset and inlineformset in django views

2012-08-13 Thread Asif Jamadar
I have two models

   class A(models.Model):
name = models.CharField(50)
type = models.CharField(50)

   class B(models.Model):
field1 = ForeignKeyField(A)
value = IntegerField()

I need to generate both formsets and inline formsets using the above models.

For class A I will generate model formset, but i'm not getting how to bind 
inline formset for model B to modelformsets

How can I combine both modelformsets from model A and inline formsets  from 
model A and model B on save method in django views?
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANNOUNCE] Campaign to support the notmm project!

2012-08-13 Thread Etienne Robillard

Hi All,

I'm raising a campaign to support the notmm project, a freely accessible 
open source project i created
to develop an advanced web framework for Django. Furthermore the project 
is using ConfigObj internally for allowing

flexible configuration and Cython for extending Django apps in C.

If you would like thus supporting the time and work I invested into the 
project I would really appreciate
a small donation, as I'm now really poor and cannot even finance the 
server hosting. Your donation would therefore be used
to put back the website online and continue active development of an 
alternative web framework for Python which
doesn't necessarily force its users to log in Facebook or Twitter for 
commenting, or syndication purposes..


Lastly if you have any comments on this letter or would like further 
info before making a donation it will be my pleasure

to help..

Kind regards,
Etienne

http://pledgie.com/campaigns/16268

--
Etienne Robillard
Green Tea Hackers Club
Fine Software Carpentry For The Rest Of Us!
http://gthc.org/
e...@gthcfoundation.org

“It is easy to fly into a passion... anybody can do that, but to be angry with 
the right person to the right extent and at the right time and in the right way 
that is not easy.” -Aristotle

“You have to accept whatever comes and the only important thing is that you 
meet it with courage and with the best that you have to give.”
- Eleanor Roosevelt

--
http://mail.python.org/mailman/listinfo/python-list


Re: Idle no longer works

2012-08-13 Thread jussij
On Saturday, August 11, 2012 4:09:16 PM UTC-7, Opap-OJ wrote:

 I can no longer open the Idle IDE for Python on Windows 7.
 ..
 Any idea why?

It looks like your registry has changed.

To fix this just use the Windows Explorer, click on a Python file 
and use the 'Open with, Choose default program' menu and then 
select the Idle IDE as the default program.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: save dictionary to a file without brackets.

2012-08-13 Thread Steven D'Aprano
On Sun, 12 Aug 2012 17:15:12 -0700, alex23 wrote:

 On Aug 10, 7:37 pm, Mark Lawrence breamore...@yahoo.co.uk wrote:
 Well whatever you do *DON'T* mention Cython. I mentioned it just now
 but I think I've got away with it.
 
 While I'm not against threads straying off topic, you're beginning to
 come across as a bit of an asshole now.
 
 Just let it go.

Chill out Alex, it's all good. Mark was channelling a famous scene from 
Fawlty Towers, staring Monty Python's own John Cleese, hence it is on-
topic, for the sillier definitions of on-topic.

After making a German tourist cry with his repeated insensitive comments 
about World War Two, Basil Fawlty (Cleese) -- who is an obnoxious git at 
the best of times but is currently suffering from a concussion -- remarks 
to his staff, Don't mention the war, I mentioned it once but I think I 
got away with it.

http://www.youtube.com/watch?v=7xnNhzgcWTk



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Threads and sockets

2012-08-13 Thread Ulrich Eckhardt

Am 10.08.2012 15:01, schrieb loial:

I am writing an application to send data to a printer port(9100) and
then recieve PJL responses back on that port. Because of the way PJL
works I have to do both in the same process(script).


If I understand that right, you are opening a TCP connection, so 
obviously this must be done in the same process, regardless of what PJL 
(whatever that exactly is) does.




At the moment I do not start to read responses until the data has
been sent to the printer. However it seems I am missing some
responses from the printer whilst sending the data, so I need to be
able to do the 2 things at the same time.


Using TCP, that shouldn't happen, so I really wonder what exactly you 
are doing here.




Can I open a port once and then use 2 different threads, one to write
to the post and one to read the responses)?


Yes, definitely, take a look at the select() function of the select 
module. This basically looks like this:


  (r, w, x) = select(...)
  if r:
  # read and handle incoming data
  ...
  if w:
  # write pending output data
  ...
  if x:
  # handle connection failure
  ...


If all this is not what you are doing and what you want (which I'm not 
100% sure of) then please elaborate a bit what you're doing and what 
kind of connection you are using.


Happy hacking!

Uli
--
http://mail.python.org/mailman/listinfo/python-list


Re: Official reason for omitting inspect.currentcallable() ?

2012-08-13 Thread Steven D'Aprano
On Sun, 12 Aug 2012 23:06:19 +, kj wrote:

 Is there an *explicitly stated* reason (e.g. in a PEP, or in some python
 dev list message) for why the inspect module (at least for Python 2.7)
 does not include anything like a currentcallable() function that would
 *stably*[1] return the currently executing callable object?

I doubt it. Should there be? currentcallable is not a standard function 
in any language I'm familiar with, although I may be missing something 
obvious.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


testfixtures 2.3.5 Released!

2012-08-13 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 2.3.5. testfixtures 
is a collection of helpers for writing succinct unit tests including 
help for:


- Comparing objects and sequences

Better feedback when the results aren't as you expected along with 
support for comparison of objects that don't normally support comparison.


- Mocking out objects and methods

Easy to use ways of stubbing out objects, classes or individual methods 
for both doc tests and unit tests. Special helpers are provided for 
testing with dates and times.


- Testing logging

Helpers for capturing logging output in both doc tests and unit tests.

- Testing stream output

Helpers for capturing stream output, such as that from print statements, 
and making assertion about it.


- Testing with files and directories

Support for creating and checking files and directories in sandboxes for 
both doc tests and unit tests.


- Testing exceptions

Easy to use ways of checking that a certain exception is raised, even 
down the to the parameters the exception is raised with.


This release fixes a small bug that meant failures in dictionary 
comparison didn't always produce the same output. (It was correct, just 
partly unsorted)


The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


http://www.simplistix.co.uk/software/python/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk
--
http://mail.python.org/mailman/listinfo/python-list


Re: Official reason for omitting inspect.currentcallable() ?

2012-08-13 Thread Chris Angelico
On Mon, Aug 13, 2012 at 6:24 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
 On Sun, 12 Aug 2012 23:06:19 +, kj wrote:

 Is there an *explicitly stated* reason (e.g. in a PEP, or in some python
 dev list message) for why the inspect module (at least for Python 2.7)
 does not include anything like a currentcallable() function that would
 *stably*[1] return the currently executing callable object?

 I doubt it. Should there be? currentcallable is not a standard function
 in any language I'm familiar with, although I may be missing something
 obvious.

I'm not familiar with it by that name, but Pike's this_function is
what the OP's describing.

(Yes, I'm citing Pike again. Sorry.)

It's a useful construct in theory when you want to write in recursion,
which was part of the rationale behind PEP 3130 (btw, Terry, it would
have been nice if you'd mentioned the number instead of sending me to
the index to try to figure out which one you were referring to, but
anyway). But how often is it actually useful in practice? I've never
actually used this_function other than in writing a crazy recursive
lambda (was testing different languages' handling of infinite
recursion - high level languages shouldn't segfault, one much-maligned
language DOES).

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


How to uncompress a VOB file? (Win XP)

2012-08-13 Thread Xantipius
subj
-- 
http://mail.python.org/mailman/listinfo/python-list


Threading KeyError in Python 3.3 beta 2?

2012-08-13 Thread Blind Anagram
I thought I would try out Python 3.3 beta 2.  


This works well so far but I keep getting the message:

Exception KeyError: KeyError(6308,) in module 'threading' 
   from 'c:\\Program Files\\Python33\\lib\\threading.py' ignored


after some of my python code completes.  


Is this an issue worth reporting?

--
http://mail.python.org/mailman/listinfo/python-list


Re: How to uncompress a VOB file? (Win XP)

2012-08-13 Thread Steven D'Aprano
On Mon, 13 Aug 2012 03:18:49 -0700, Xantipius wrote:

 subj

The same way as you compressed it, only in reverse.

When you ask a sensible question, I'm sure that somebody will give you a 
sensible answer.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Threading KeyError in Python 3.3 beta 2?

2012-08-13 Thread Chris Angelico
On Mon, Aug 13, 2012 at 8:36 PM, Blind Anagram non...@nowhere.com wrote:
 I thought I would try out Python 3.3 beta 2.
 This works well so far but I keep getting the message:

 Exception KeyError: KeyError(6308,) in module 'threading'from
 'c:\\Program Files\\Python33\\lib\\threading.py' ignored

 after some of my python code completes.
 Is this an issue worth reporting?

It might be, but it depends on what your code is and is doing. Can you
put together a minimal test case?

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Threading KeyError in Python 3.3 beta 2?

2012-08-13 Thread Blind Anagram
Chris Angelico  wrote in message 
news:mailman.3222.1344856408.4697.python-l...@python.org...


On Mon, Aug 13, 2012 at 8:36 PM, Blind Anagram non...@nowhere.com wrote:

I thought I would try out Python 3.3 beta 2.
This works well so far but I keep getting the message:

Exception KeyError: KeyError(6308,) in module 'threading'from
'c:\\Program Files\\Python33\\lib\\threading.py' ignored

after some of my python code completes.
Is this an issue worth reporting?


It might be, but it depends on what your code is and is doing. Can you
put together a minimal test case?

===
Thank you for your response.

Here is a fairly short bit of code which produces the exception:

for pre in ('12', '13', '14', '15', '21' ):
 n = int(pre + '543')
 s = str(n * n)
 if len(set(s)) == 9:
   print(n, s)

--
http://mail.python.org/mailman/listinfo/python-list


Re: Running Python web apps on shared ASO servers?

2012-08-13 Thread Gilles
On Sun, 12 Aug 2012 22:26:19 +0100, Tim Golden m...@timgolden.me.uk
wrote:
Just to make a point: one person's isn't a good solution is another 
person's works perfectly well for me. Modern servers are really quite 
quick: the cost of starting up a Python process and generating an HTML 
page can be really quite low. I've certainly had low-traffic production 
websites running for years on CGI without anyone complaining.

Thanks Tim for the input. I'll try the different solutions available
and see if CGI is good enough for my needs.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Threading KeyError in Python 3.3 beta 2?

2012-08-13 Thread Chris Angelico
On Mon, Aug 13, 2012 at 9:24 PM, Blind Anagram non...@nowhere.com wrote:

 Here is a fairly short bit of code which produces the exception:

 for pre in ('12', '13', '14', '15', '21' ):
  n = int(pre + '543')
  s = str(n * n)
  if len(set(s)) == 9:
print(n, s)

Interesting. I just downloaded a clean 3.3 onto this Windows box,
saved your script to a file (booom.py hehe), and ran it - no
exception. Same thing pasting that code into the interactive
interpreter or idle. Did you import anything before running that code?
If not, it may be a site.py problem or something.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Threading KeyError in Python 3.3 beta 2?

2012-08-13 Thread Steven D'Aprano
On Mon, 13 Aug 2012 12:24:55 +0100, Blind Anagram wrote:

 Here is a fairly short bit of code which produces the exception:
 
 for pre in ('12', '13', '14', '15', '21' ):
   n = int(pre + '543')
   s = str(n * n)
   if len(set(s)) == 9:
 print(n, s)


Um, I don't think so. 


 for pre in ('12', '13', '14', '15', '21' ):
...   n = int(pre + '543')
...   s = str(n * n)
...   if len(set(s)) == 9:
... print(n, s)
...
12543 157326849



Since your code doesn't even import threading, let alone use it, I can't 
imagine how you get an error in threading.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Threading KeyError in Python 3.3 beta 2?

2012-08-13 Thread Chris Angelico
On Mon, Aug 13, 2012 at 9:38 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
 Since your code doesn't even import threading, let alone use it, I can't
 imagine how you get an error in threading.

Hey, I try not to get scornful until at least the sixth post :)

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to uncompress a VOB file? (Win XP)

2012-08-13 Thread Ben Finney
Xantipius r...@bk.ru writes:

 subj

resp

-- 
 \ “What is needed is not the will to believe but the will to find |
  `\   out, which is the exact opposite.” —Bertrand Russell, _Free |
_o__)   Thought and Official Propaganda_, 1928 |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Threading KeyError in Python 3.3 beta 2?

2012-08-13 Thread Blind Anagram
Chris Angelico  wrote in message 
news:mailman.3223.1344857956.4697.python-l...@python.org...


On Mon, Aug 13, 2012 at 9:24 PM, Blind Anagram non...@nowhere.com wrote:


Here is a fairly short bit of code which produces the exception:

for pre in ('12', '13', '14', '15', '21' ):
 n = int(pre + '543')
 s = str(n * n)
 if len(set(s)) == 9:
   print(n, s)


Interesting. I just downloaded a clean 3.3 onto this Windows box,
saved your script to a file (booom.py hehe), and ran it - no
exception. Same thing pasting that code into the interactive
interpreter or idle. Did you import anything before running that code?
If not, it may be a site.py problem or something.

===
Thanks to you both for your responses.

Its an IDE issue of some kind (I am using WING).

When I run under a command prompt (or IDLE) all is well.

Sorry to have bothered you.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Threading KeyError in Python 3.3 beta 2?

2012-08-13 Thread Chris Angelico
On Mon, Aug 13, 2012 at 9:51 PM, Blind Anagram non...@nowhere.com wrote:
 Thanks to you both for your responses.

 Its an IDE issue of some kind (I am using WING).

 When I run under a command prompt (or IDLE) all is well.

Next time, do mention that sort of environmental consideration in the
original post :)

As a general rule, be careful of threading and windowing toolkits;
quite a few of them have restrictions on what you can and can't do, or
even completely do not support threads.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: decoding a byte array that is unicode escaped?

2012-08-13 Thread strong . drug
пятница, 6 ноября 2009 г., 12:48:47 UTC+4 пользователь sam написал:

 I am simply trying to display this copyright symbol on a webpage, so
 how do I encode the byte array to utf-8 given that it is 'escape
 encoded' in the above way?  I tried:
 
 responseByteArray.decode('utf-8')
 and responseByteArray.decode('unicode_escape')
 and str(responseByteArray).
 
 I am using Python 3.1.
I had some problem with reading zip archive in raw (binary) mode.
I solve it this way

open (filename, 'rb').read ().encode('string_escape')
# now we had strings with strange symbols are escaped
# than we can handle it without decoding excepions for example:
body = '\r\n'.join (lines) 

# if we have unescaped strings we can get an exception there
# after opertions, we needed we must unescape all content
# and drop it out to network (in my case)
body = body.decode('string-escape')

# then we can send so to the server
connection.request('POST', upload_url,  body, headers)

BR)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: save dictionary to a file without brackets.

2012-08-13 Thread Mark Lawrence

On 13/08/2012 01:15, alex23 wrote:

On Aug 10, 7:37 pm, Mark Lawrence breamore...@yahoo.co.uk wrote:

Well whatever you do *DON'T* mention Cython. I mentioned it just now but
I think I've got away with it.


While I'm not against threads straying off topic, you're beginning to
come across as a bit of an asshole now.

Just let it go.



Why on your say so?

--
Cheers.

Mark Lawrence.

--
http://mail.python.org/mailman/listinfo/python-list


Re: How to uncompress a VOB file? (Win XP)

2012-08-13 Thread Mark Lawrence

On 13/08/2012 11:18, Xantipius wrote:

subj



Either

a) write some code and when and if it fails give us a small code snippet 
that demonstates the problem with the complete traceback.


or

b) state how much you are willing to pay for someone here to come up 
with a solution for you.


--
Cheers.

Mark Lawrence.

--
http://mail.python.org/mailman/listinfo/python-list


Re: How to uncompress a VOB file? (Win XP)

2012-08-13 Thread PythonAB

On 13 aug 2012, at 14:40, Mark Lawrence wrote:

 On 13/08/2012 11:18, Xantipius wrote:
 subj
 
 
 Either
 
 a) write some code and when and if it fails give us a small code snippet that 
 demonstates the problem with the complete traceback.
 
 or
 
 b) state how much you are willing to pay for someone here to come up with a 
 solution for you.
 
 -- 
 Cheers.
 
 Mark Lawrence.
 

or... go out and buy the DVD it's ripped from... ;)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to uncompress a VOB file? (Win XP)

2012-08-13 Thread Miki Tebeka
Have a look at PyMedia.
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: psutil 0.6.0 released

2012-08-13 Thread Giampaolo Rodolà
Hi folks,
I'm pleased to announce the 0.6.0 release of psutil:
http://code.google.com/p/psutil/

This is one of the best releases so far as it addresses two important
issues: system memory functions management and permission errors
occurring on Windows and OSX.


=== Memory functions ===

psutil.phymem_usage() and psutil.virtmem_usage() are deprecated.
Instead we now have psutil.virtual_memory() and psutil.swap_memory(),
which should provide all the necessary pieces to monitor the actual
system memory usage, both physical and swap/disk related.

The refactoring was modeled after Zabbix, see:
http://code.google.com/p/psutil/issues/detail?id=311
http://blog.zabbix.com/when-alexei-isnt-looking/#vm.memory.size
http://www.zabbix.com/documentation/2.0/manual/appendix/items/vm.memory.size_params

If you don't want to read how and why I did that, the bottom line is:
if you want to monitor actual system memory usage in a cross platform
fashion use:

 psutil.virtual_memory().available


=== No more AccessDenied exceptions when querying processes ===

On Windows and OSX the Process methods below were always raising AccessDenied
for any process owned by another user:

OSX
- name
- get_memory_info()
- get_memory_percent()
- get_cpu_times()
- get_cpu_percent()
- get_num_threads()

WINDOWS
- create_time
- get_children()
- get_cpu_times()
- get_cpu_percent()
- get_memory_info()
- get_memory_percent()
- get_num_handles()
- get_io_counters()

Especially on OSX this made psutil basically unusable as a limited
user, even for determining basic process information such as CPU
percent or memory usage.
Now this is no longer the case.
For further details see:
http://code.google.com/p/psutil/issues/detail?id=297
http://code.google.com/p/psutil/issues/detail?id=303


=== Other major enhancements ===

- per-process extended memory stats.
- per-process number of voluntary and involuntary context switches.
- per-process connections: added UNIX sockets support.
- (BSD) Process.get_connections() rewritten in C and no longer requiring lsof.
- (OSX) added support for process cwd
- psutil.network_io_counters() now provides the number of in/out
packets dropped and with errors.
- new example scripts:
example/meminfo.py
example/free.py
example/netstat.py
example/pmap.py


=== New features by example ===

 import psutil, os
 p = psutil.Process(os.getpid())

 p.get_num_ctx_switches()
amount(voluntary=78, involuntary=19)

 p.get_ext_memory_info()
meminfo(rss=9662464, vms=49192960, shared=3612672, text=2564096,
lib=0, data=5754880, dirty=0)

 p.get_connections(kind='unix')
[connection(fd=8, family=1, type=1,
local_address='/tmp/unix_socket.sock', remote_address=None,
status='')]


 psutil.virtual_memory()
vmem(total=8374149120L, available=2081050624L, percent=75.1,
used=8074080256L, free=300068864L, active=3294920704,
inactive=1361616896, buffers=529895424L, cached=1251086336)

 psutil.swap_memory()
swap(total=2097147904L, used=296128512L, free=1801019392L,
percent=14.1, sin=304193536, sout=677842944)


=== Compatitility notes ===

0.6.0 version does not introduce any backward incompatibility.
Nevertheless it introduces some deprecations warnings:

- psutil.phymem_usage() is deprecated in favor of psutil.virtual_memory()
- psutil.virmem_usage() is deprecated in favor of psutil.swap_memory()
- psutil.cached_phymem() is deprecated in favor of
psutil.virtual_memory().cached
- psutil.phymem_buffers() is deprecated in favor of
psutil.virtual_memory().buffers

The deprecated functions will be removed in next 1.0.0 version.


=== Links ===

* Home page: http://code.google.com/p/psutil
* Source tarball: http://psutil.googlecode.com/files/psutil-0.6.0.tar.gz
* Api Reference: http://code.google.com/p/psutil/wiki/Documentation


Please try out this new release and let me know if you experience any
problem by filing issues on the bug tracker.
Thanks in advance.


--- Giampaolo Rodola'

http://code.google.com/p/pyftpdlib/
http://code.google.com/p/psutil/
http://code.google.com/p/pysendfile/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Official reason for omitting inspect.currentcallable() ?

2012-08-13 Thread kj
In mailman.3221.1344847903.4697.python-l...@python.org Chris Angelico 
ros...@gmail.com writes:

I'm not familiar with it by that name, but Pike's this_function is
what the OP's describing.

You got it.

It's a useful construct in theory when you want to write in recursion,
which was part of the rationale behind PEP 3130 

Thank you!

kj
-- 
http://mail.python.org/mailman/listinfo/python-list


print(....,file=sys.stderr) buffered?

2012-08-13 Thread Helmut Jarausch
Hi,

for tracing purposes I have added some print outs like

print('+++ before calling foo',file=sys.stderr)
x=foo(..)
print('--- after  calling foo',

and within 'foo'
print(' entering foo ...',file=sys.stderr)

Now, when executing this, I always get

+++ before calling foo
--- after  calling foo
 entering foo ...

When outputting to stderr from C/C++ it's guaranteed that the different 
outputs appear in the same order as they have been generated.

Is this guarantee no more valid in Python 3.2 ?

Many thanks for a comment,
Helmut.

(That's a single-threaded application)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: print(....,file=sys.stderr) buffered?

2012-08-13 Thread Ramchandra Apte
As far as I know,
stdout is usually buffered (not necessary) in both C++ and Python
stderr is non-buffered in both C++ and Python (I can't imagine the point of
stderr if it were buffered)
Even with this, stdout usually come immediately - the situation you have
shouldn't happen.
Are you using an IDE? If so, which one?

On 13 August 2012 20:46, Helmut Jarausch jarau...@skynet.be wrote:

 Hi,

 for tracing purposes I have added some print outs like

 print('+++ before calling foo',file=sys.stderr)
 x=foo(..)
 print('--- after  calling foo',

 and within 'foo'
 print(' entering foo ...',file=sys.stderr)

 Now, when executing this, I always get

 +++ before calling foo
 --- after  calling foo
  entering foo ...

 When outputting to stderr from C/C++ it's guaranteed that the different
 outputs appear in the same order as they have been generated.

 Is this guarantee no more valid in Python 3.2 ?

 Many thanks for a comment,
 Helmut.

 (That's a single-threaded application)

 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Does anyone have an activate script for portable python?

2012-08-13 Thread Ramchandra Apte
PS:virtualenv is added to the stdlib in Python 3.3

On 13 August 2012 05:42, alex23 wuwe...@gmail.com wrote:

 On Aug 12, 9:09 am, Gelonida N gelon...@gmail.com wrote:
  In Pythons installed with virtualenv there is on windows an activate.bat
  script, that can be used to setup the cmd-shell such, that the search
  path for python and pythor elated tools (pip / easy_install) is setup
  properly.
  Do such a scripts also exist for Portable python?


 Portable Python is just Python with some helper scripts for not
 requiring a system installation.

 So command-line-command-to-run-portable-python virtualenv venv-
 name should be all you need.
 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: print(....,file=sys.stderr) buffered?

2012-08-13 Thread Grant Edwards
On 2012-08-13, Helmut Jarausch jarau...@skynet.be wrote:
 Hi,

 for tracing purposes I have added some print outs like

 print('+++ before calling foo',file=sys.stderr)
 x=foo(..)
 print('--- after  calling foo',

 and within 'foo'
 print(' entering foo ...',file=sys.stderr)

 Now, when executing this, I always get

 +++ before calling foo
 --- after  calling foo
 entering foo ...

 When outputting to stderr from C/C++ it's guaranteed that the different 
 outputs appear in the same order as they have been generated.

You're not printing to stderr in the second print() call -- you're
printing to stdout.  The two file objects have separate buffers and
may even be using two different buffering modes (e.g. line vs. block).
You can't interleave writes to stderr and stdout and assume order is
preserved unless you take specific steps (such as forcing them both to
be unbuffered or flushing them at certain points).

 Is this guarantee no more valid in Python 3.2 ?

If you write to stderr all three times, it should work the way you
want it to.

-- 
Grant Edwards   grant.b.edwardsYow! ... I'm IMAGINING a
  at   sensuous GIRAFFE, CAVORTING
  gmail.comin the BACK ROOM of a
   KOSHER DELI --
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: save dictionary to a file without brackets.

2012-08-13 Thread alex23
On Aug 13, 10:37 pm, Mark Lawrence breamore...@yahoo.co.uk wrote:
 Why on your say so?

My mistake, I didn't realise you wanted to sound so tedious. Knock
yourself out.


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: save dictionary to a file without brackets.

2012-08-13 Thread alex23
On Aug 13, 6:05 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
 Chill out Alex, it's all good. Mark was channelling a famous scene from
 Fawlty Towers, staring Monty Python's own John Cleese, hence it is on-
 topic, for the sillier definitions of on-topic.

Thank you, yes, I get that. However, Mark has repeatedly been
directing this dickishness at Stefan Behnel ever since he was asked to
not stray off topic. While Mark doesn't have to listen to anyone else
about his behaviour, he can't expect not to be called a dick when
acting like one.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: print(....,file=sys.stderr) buffered?

2012-08-13 Thread Helmut Jarausch
On Mon, 13 Aug 2012 15:43:31 +, Grant Edwards wrote:

 On 2012-08-13, Helmut Jarausch jarau...@skynet.be wrote:
 Hi,

 for tracing purposes I have added some print outs like

 print('+++ before calling foo',file=sys.stderr)
 x=foo(..)
 print('--- after  calling foo',

Sorry, this is a cut'n paste error. I did use
print('--- after  calling foo',file=sys.stderr)


 and within 'foo'
 print(' entering foo ...',file=sys.stderr)

 Now, when executing this, I always get

 +++ before calling foo --- after  calling foo
 entering foo ...

 When outputting to stderr from C/C++ it's guaranteed that the different
 outputs appear in the same order as they have been generated.
 
 You're not printing to stderr in the second print() call -- you're
 printing to stdout.  The two file objects have separate buffers and may
 even be using two different buffering modes (e.g. line vs. block).
 You can't interleave writes to stderr and stdout and assume order is
 preserved unless you take specific steps (such as forcing them both to
 be unbuffered or flushing them at certain points).
 
 Is this guarantee no more valid in Python 3.2 ?
 
 If you write to stderr all three times, it should work the way you want
 it to.

It seems it doesn't do so in my case.

Thanks,
Helmut.


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: save dictionary to a file without brackets.

2012-08-13 Thread rusi
On Aug 13, 1:05 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:

 Chill out Alex, it's all good. Mark was channelling a famous scene from
 Fawlty Towers, staring Monty Python's own John Cleese, hence it is on-
 topic, for the sillier definitions of on-topic.

Ha! Thanks for that connection.
Watched and enjoyed Fawlty towers as a kid but have never seen a Monty
Python.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: print(....,file=sys.stderr) buffered?

2012-08-13 Thread Jerry Hill
On Mon, Aug 13, 2012 at 11:16 AM, Helmut Jarausch jarau...@skynet.be wrote:
 Now, when executing this, I always get

 +++ before calling foo
 --- after  calling foo
 entering foo ...

Can you give us a piece of code we can run that produces this output
for you?  You gave us an outline in your original post, but it would
be useful to have a self contained example that you can say reliably
produces the unexpected output for you.

Also, what environment, OS, and exact python version is this?  Is the
code being run in an IDE of some sort?  Does the behavior change if
you call your code directly from the command line?

-- 
Jerry
-- 
http://mail.python.org/mailman/listinfo/python-list


Sharing code between different projects?

2012-08-13 Thread andrea crotti
I am in the situation where I am working on different projects that
might potentially share a lot of code.

I started to work on project A, then switched completely to project B
and in the transiction I copied over a lot of code with the
corresponding tests, and I started to modify it.

Now it's time to work again on project A, but I don't want to copy
things over again.

I would like to design a simple and nice way to share between projects,
where the things I want to share are simple but useful things as for
example:

class TempDirectory:
Create a temporary directory and cd to it on enter, cd back to
the original position and remove it on exit

def __init__(self):
self.oldcwd = getcwd()
self.temp_dir = mkdtemp()

def __enter__(self):
logger.debug(create and move to temp directory %s % self.temp_dir)
return self.temp_dir

def __exit__(self, type, value, traceback):
# I first have to move out
chdir(self.oldcwd)
logger.debug(removing the temporary directory and go back to
the original position %s % self.temp_dir)
rmtree(self.temp_dir)


The problem is that there are functions/classes from many domains, so it
would not make much sense to create a real project, and the only name I
could give might be utils or utilities..

In plus the moment the code is shared I must take care of versioning and
how to link different pieces together (we use perforce by the way).

If then someone else except me will want to use these functions then of
course I'll have to be extra careful, designing really good API's and so
on, so I'm wondering where I should set the trade-off between ability to
share and burden to maintain..

Anyone has suggestions/real world experiences about this?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: save dictionary to a file without brackets.

2012-08-13 Thread Mark Lawrence

On 13/08/2012 17:14, alex23 wrote:

On Aug 13, 10:37 pm, Mark Lawrence breamore...@yahoo.co.uk wrote:

Why on your say so?


My mistake, I didn't realise you wanted to sound so tedious. Knock
yourself out.




Yes m'lud.  Do I lick your boots or polish them?

--
Cheers.

Mark Lawrence.

--
http://mail.python.org/mailman/listinfo/python-list


Re: save dictionary to a file without brackets.

2012-08-13 Thread Mark Lawrence

On 13/08/2012 01:15, alex23 wrote:

On Aug 10, 7:37 pm, Mark Lawrence breamore...@yahoo.co.uk wrote:

Well whatever you do *DON'T* mention Cython. I mentioned it just now but
I think I've got away with it.


While I'm not against threads straying off topic, you're beginning to
come across as a bit of an asshole now.

Just let it go.



http://mail.python.org/pipermail/pypy-dev/2012-February/009277.html

--
Cheers.

Mark Lawrence.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Idle no longer works

2012-08-13 Thread Terry Reedy

On 8/13/2012 1:43 PM, Dennis Lee Bieber wrote:

On Mon, 13 Aug 2012 00:11:06 -0700 (PDT), jus...@zeusedit.com declaimed
the following in gmane.comp.python.general:


On Saturday, August 11, 2012 4:09:16 PM UTC-7, Opap-OJ wrote:


I can no longer open the Idle IDE for Python on Windows 7.
..
Any idea why?


It looks like your registry has changed.


Most likely, or the Python installation has be damaged.


To fix this just use the Windows Explorer, click on a Python file
and use the 'Open with, Choose default program' menu and then
select the Idle IDE as the default program.


That is probably the worst choice to make -- since what you've
defined means double clicking on ANY .py file will NOT RUN IT -- but
rather attempt to open it with the editor (IDLE)... But since IDLE
itself is a .py file, it may fail to start at all.

If double-clicking an IDLE.py file does not start it, then the
registry has lost the association of .py to python.exe, not to IDLE. OR
-- .py IS associated to python.exe but the association (the run
command is not passing the .py file name to the python executable).

On WinXP (with ActiveState 2.5.x version) my associations are as:

E:\UserData\Wulfraed\My Documentsassoc .py
.py=py_auto_file

E:\UserData\Wulfraed\My Documentsftype py_auto_file
py_auto_file=E:\Python25\python.exe %1 %*

E:\UserData\Wulfraed\My Documents

(with similar entries for .pyw to hook into pythonw.exe)
{Just booted the Win7 laptop with Python 2.7.x: The only real difference
is that it uses Python.File where the above has py_auto_file}


Re-installing, as I suggested in the first response, is much easier, 
especially for someone not familiar with the above.


--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


Re: Does anyone have an activate script for portable python?

2012-08-13 Thread Gelonida N

On 08/13/2012 02:12 AM, alex23 wrote:

On Aug 12, 9:09 am, Gelonida N gelon...@gmail.com wrote:

In Pythons installed with virtualenv there is on windows an activate.bat
script, that can be used to setup the cmd-shell such, that the search
path for python and pythor elated tools (pip / easy_install) is setup
properly.
Do such a scripts also exist for Portable python?



Portable Python is just Python with some helper scripts for not
requiring a system installation.

So command-line-command-to-run-portable-python virtualenv venv-
name should be all you need.


Hmm I guess I didn't express myself very well.

The idea is to easily create a cmd window, that the path is setup in 
order to point to portably python by default.


At a first glance at Portable Python it seemed to me, that this doesn't 
exist.


Having a small icon to click at, that opens a cmd window with the right 
setup or just a .bat file, that could be called to adapt the setup of an 
existing cmd window.



It's not too difficult to write such scipts, but I though it would be 
interesting to see whether I'm the only one missing such feature in 
portable Python.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Sharing code between different projects?

2012-08-13 Thread Rob Day
I'd just create a module - called shared_utils.py or similar - and import
that in both projects. It might be a bit messy if there's no 'unifying
theme' to the module - but surely it'd be a lot less messy than your
TempDirectory class, and anyone else who knows Python will understand
'import shared_utils' much more easily.

I realise you might not want to say, but if you could give some idea what
sort of projects these are, and what sorts of code you're trying to share,
it might make things a bit clearer.

I'm not really sure what your concerns about 'versioning and how to link
different pieces together' are - what d you think could go wrong here?

On 13 August 2012 17:53, andrea crotti andrea.crott...@gmail.com wrote:

 I am in the situation where I am working on different projects that
 might potentially share a lot of code.

 I started to work on project A, then switched completely to project B
 and in the transiction I copied over a lot of code with the
 corresponding tests, and I started to modify it.

 Now it's time to work again on project A, but I don't want to copy
 things over again.

 I would like to design a simple and nice way to share between projects,
 where the things I want to share are simple but useful things as for
 example:

 class TempDirectory:
 Create a temporary directory and cd to it on enter, cd back to
 the original position and remove it on exit
 
 def __init__(self):
 self.oldcwd = getcwd()
 self.temp_dir = mkdtemp()

 def __enter__(self):
 logger.debug(create and move to temp directory %s %
 self.temp_dir)
 return self.temp_dir

 def __exit__(self, type, value, traceback):
 # I first have to move out
 chdir(self.oldcwd)
 logger.debug(removing the temporary directory and go back to
 the original position %s % self.temp_dir)
 rmtree(self.temp_dir)


 The problem is that there are functions/classes from many domains, so it
 would not make much sense to create a real project, and the only name I
 could give might be utils or utilities..

 In plus the moment the code is shared I must take care of versioning and
 how to link different pieces together (we use perforce by the way).

 If then someone else except me will want to use these functions then of
 course I'll have to be extra careful, designing really good API's and so
 on, so I'm wondering where I should set the trade-off between ability to
 share and burden to maintain..

 Anyone has suggestions/real world experiences about this?
 --
 http://mail.python.org/mailman/listinfo/python-list




-- 
Robert K. Day
robert@merton.oxon.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Sharing code between different projects?

2012-08-13 Thread Chris Angelico
On Tue, Aug 14, 2012 at 2:53 AM, andrea crotti
andrea.crott...@gmail.com wrote:
 The problem is that there are functions/classes from many domains, so it
 would not make much sense to create a real project, and the only name I
 could give might be utils or utilities..

There's actually much merit in a generic utilities module. Keep things
nicely segregated (ideally such that you know what things depend on
what other, but at very least keep track of where one ends and another
begins - that's trivial if everything's one function or one class,
but less so when you have a family of related functions), and then you
can consider promoting one block of code to stand-alone module. But in
the meantime, you have a single module used in two places, even if it
doesn't have a very clear definition as yet.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to uncompress a VOB file? (Win XP)

2012-08-13 Thread Xantipius
On Aug 13, 3:40 pm, Mark Lawrence breamore...@yahoo.co.uk wrote:
 On 13/08/2012 11:18, Xantipius wrote:

  subj

 Either

 a) write some code and when and if it fails give us a small code snippet
 that demonstates the problem with the complete traceback.

 or

 b) state how much you are willing to pay for someone here to come up
 with a solution for you.

 --
 Cheers.

 Mark Lawrence.

Mark, in regard your last remark:
it's just a recreation for me. Nothing more in it.
I like to put some weird and useless problems before myself.

Cheers.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to uncompress a VOB file? (Win XP)

2012-08-13 Thread Chris Angelico
On Tue, Aug 14, 2012 at 9:00 AM, Xantipius r...@bk.ru wrote:
 Mark, in regard your last remark:
 it's just a recreation for me. Nothing more in it.
 I like to put some weird and useless problems before myself.

In that case, I strongly recommend that you write some code instead of
throwing zero-effort questions onto a mailing list.

Though this sort of request does tend to have amusement value. Thanks Ben!

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to uncompress a VOB file? (Win XP)

2012-08-13 Thread Mark Lawrence

On 14/08/2012 00:00, Xantipius wrote:

On Aug 13, 3:40 pm, Mark Lawrence breamore...@yahoo.co.uk wrote:

On 13/08/2012 11:18, Xantipius wrote:


subj


Either

a) write some code and when and if it fails give us a small code snippet
that demonstates the problem with the complete traceback.

or

b) state how much you are willing to pay for someone here to come up
with a solution for you.

--
Cheers.

Mark Lawrence.


Mark, in regard your last remark:
it's just a recreation for me. Nothing more in it.
I like to put some weird and useless problems before myself.

Cheers.



Is it your normal practice to communicate with yourself via a public 
mailing list/news group?  When did you seek my permission to call me by 
my forename?


--
Cheers.

Mark Lawrence.

--
http://mail.python.org/mailman/listinfo/python-list


Re: save dictionary to a file without brackets.

2012-08-13 Thread alex23
On Aug 14, 3:43 am, Mark Lawrence breamore...@yahoo.co.uk wrote:
 On 13/08/2012 01:15, alex23 wrote:

  On Aug 10, 7:37 pm, Mark Lawrence breamore...@yahoo.co.uk wrote:
  Well whatever you do *DON'T* mention Cython. I mentioned it just now but
  I think I've got away with it.

  While I'm not against threads straying off topic, you're beginning to
  come across as a bit of an asshole now.

  Just let it go.

 http://mail.python.org/pipermail/pypy-dev/2012-February/009277.html

 --
 Cheers.

 Mark Lawrence.

Yeah, you're really coming across as holding the moral high ground
here.

Plonk.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: save dictionary to a file without brackets.

2012-08-13 Thread Steven D'Aprano
On Mon, 13 Aug 2012 18:07:26 +0100, Mark Lawrence wrote:

 On 13/08/2012 17:14, alex23 wrote:
 On Aug 13, 10:37 pm, Mark Lawrence breamore...@yahoo.co.uk wrote:
 Why on your say so?

 My mistake, I didn't realise you wanted to sound so tedious. Knock
 yourself out.



 Yes m'lud.  Do I lick your boots or polish them?


Children children, if you won't play nice don't play at all. You're 
scaring away the people who are here to learn about Python.




-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to uncompress a VOB file? (Win XP)

2012-08-13 Thread Steven D'Aprano
On Tue, 14 Aug 2012 01:34:46 +0100, Mark Lawrence wrote:

 When did you seek my permission to call me by my forename?

Sheesh. It's 2012, not 1812. If you sign your posts with your full name, 
you have to expect that people will call you Mark rather than Mr 
Lawrence or Lord High Mucky-Muck Grand Poohbar Lawrence -- even if 
they haven't been formally introduced.

Mark, we're all human and the occasional snark is only to be expected, 
but demanding that people ask permission to call you by your first name 
in an informal forum like this crosses the line to total dickishness. 
Chill out before you get yourself kill-filed into irrelevance.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


how to call perl script from html using python

2012-08-13 Thread mullapervez
Hi,

I wanna call perl script in HTML form n store that data in DB using Python.

How can i do this...??

Please help me

Thank you
Pervez
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to call perl script from html using python

2012-08-13 Thread Simon Cropper

On 14/08/12 15:12, mullaper...@gmail.com wrote:

Hi,

I wanna call perl script in HTML form n store that data in DB using Python.

How can i do this...??

Please help me

Thank you
Pervez



Google you question.

Many solutions already exist on the Internet.

--
Cheers Simon

   Simon Cropper - Open Content Creator

   Free and Open Source Software Workflow Guides
   
   Introduction   http://www.fossworkflowguides.com
   GIS Packages   http://www.fossworkflowguides.com/gis
   bash / Pythonhttp://www.fossworkflowguides.com/scripting
--
http://mail.python.org/mailman/listinfo/python-list


Re: how to call perl script from html using python

2012-08-13 Thread mullapervez
On Tuesday, August 14, 2012 10:42:48 AM UTC+5:30, mulla...@gmail.com wrote:
 Hi,
 
 
 
 I wanna call perl script in HTML form n store that data in DB using Python.
 
 
 
 How can i do this...??
 
 
 
 Please help me
 
 
 
 Thank you
 
 Pervez

Hey Simon,

Thank You for your mail and time,

Yest I spent entire day for this , But I didn't get any solution for this 
problem .I google it but am not able to get any solution for this 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to call perl script from html using python

2012-08-13 Thread Simon Cropper

On 14/08/12 15:31, mullaper...@gmail.com wrote:

On Tuesday, August 14, 2012 10:42:48 AM UTC+5:30, mulla...@gmail.com wrote:

Hi,



I wanna call perl script in HTML form n store that data in DB using Python.



How can i do this...??



Please help me



Thank you

Pervez


Hey Simon,

Thank You for your mail and time,

Yest I spent entire day for this , But I didn't get any solution for this 
problem .I google it but am not able to get any solution for this



Then you should outline what you have tried and what the problems you 
encountered that way people can help.


--
Cheers Simon

   Simon Cropper - Open Content Creator

   Free and Open Source Software Workflow Guides
   
   Introduction   http://www.fossworkflowguides.com
   GIS Packages   http://www.fossworkflowguides.com/gis
   bash / Pythonhttp://www.fossworkflowguides.com/scripting
--
http://mail.python.org/mailman/listinfo/python-list


[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-08-13 Thread Simon Sapin

Simon Sapin added the comment:

I just remembered about this. I suppose it is too late for 3.3?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15634] synchronized decorator for the threading module

2012-08-13 Thread Juan Javier

New submission from Juan Javier:

I think it will be useful to have a decorator like this one on the threading 
module:

def synchronized(func):
A decorator to make a function execution synchronized.

Examples:

@synchronized
def foo():
pass

class Foo:
def __init__(self):
self.__syncdata = None

@property
def syncdata(self):
return self.__syncdata

@syncdata.setter
@synchronized
def syncdata(self, value):
self.__syncdata = value

if not hasattr(func, __lock):
func.__lock = threading.Lock()
def _synchronized(*args, **kwds):
with func.__lock:
func(*args, **kwds)
_synchronized.__doc__ = func.__doc__
return _synchronized

What do you think?

--
components: Library (Lib)
messages: 168071
nosy: jjdominguezm
priority: normal
severity: normal
status: open
title: synchronized decorator for the threading module
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15634
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15635] memory leak with generators

2012-08-13 Thread Florent Xicluna

New submission from Florent Xicluna:

Hello,

I noticed a large memory consumption in my application.
I tracked it down to be a problem with garbage collection of generator locals.

The issue was noticed in 2.6 first. Then I reproduced it in 2.7.
The test case finds some leak in 3.3 too, it seems.

--
components: Interpreter Core
files: testiterbug.py
messages: 168072
nosy: flox
priority: normal
severity: normal
status: open
title: memory leak with generators
type: resource usage
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file26779/testiterbug.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15635
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15564] cgi.FieldStorage should not call read_multi on files

2012-08-13 Thread patrick vrijlandt

patrick vrijlandt added the comment:

I must admit my usage case is a hack, but the summary is: view a page on one 
computer, process it on another computer; like sending the page to a friend, 
with friend - self and send - upload.

I found one other victim in python 
(https://groups.google.com/d/topic/web2py/ixeUUWryZh0/discussion) but only an 
occasional reference to other languages; most posts relate to security issues 
with mht files.

My previous example only served to show that the mime-type is a necessary 
condition for the problem to occur; you are right that this input would be 
expected to throw an exception.

So I went on and created a complete testcase/example (attached). The 
PatchedFieldStorage class parses the mht file correctly into parts. However, 
the names of the parts are in content-location headers inside  
the mht file and get lost. Also the code is ugly.

Trying to better re-use existing code like in ExperimentalFieldStorage was not 
succesful so far: The MIME-prologue is parsed as one of the parts, and the 
outerboundary is not respected, losing a dataelement next to the file. The 
print() calls show that the next line may be valuable (like a header) or not so 
much (like a boundary), but so far the class has no provision for look-ahead I 
think.

email.message_from_binary_file correctly parses my mht-files; so a completely 
different approach might be to more rely on that package for parsing MIME 
encoded data.

--
Added file: http://bugs.python.org/file26780/test_cgi4.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15564
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15624] clarify io.TextIOWrapper newline documentation

2012-08-13 Thread Andrew Svetlov

Andrew Svetlov added the comment:

For me input means «reading from» and output — «writing to».

Nevertheless I'm ok with you suggestion.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15624] clarify newline documentation for open and io.TextIOWrapper.

2012-08-13 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
title: clarify io.TextIOWrapper newline documentation - clarify newline 
documentation for open and io.TextIOWrapper.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15624] clarify newline documentation for open and io.TextIOWrapper.

2012-08-13 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Close as fixed. Thanks.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15624] clarify newline documentation for open and io.TextIOWrapper.

2012-08-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5b629e9fde61 by Andrew Svetlov in branch '3.2':
Issue #15624: clarify newline documentation for open and io.TextIOWrapper
http://hg.python.org/cpython/rev/5b629e9fde61

New changeset 9e098890ea2c by Andrew Svetlov in branch 'default':
Issue #15624: clarify newline documentation for open and io.TextIOWrapper
http://hg.python.org/cpython/rev/9e098890ea2c

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8800] add threading.RWLock

2012-08-13 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

I should add that on Windows, the new SRW that is part of Vista and Windows 7, 
uses locking, that is it favors neither readers or writers.  It appears that 
nowadays the complex semantics of RWLocks have not really proven worthwile.  
See http://msdn.microsoft.com/en-us/magazine/cc163405.aspx

Perhaps this proposed patch is overly complex.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8800
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-13 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-13 Thread Hynek Schlawack

Hynek Schlawack added the comment:

Silence means consent, so I will supply a patch as soon as 3.4 is open.

Meanwhile, I reworded the docs for os.makedirs, the patch is attached. Please 
have a look at it so we can get it in for 3.3.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file26781/os-makedirs.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15624] clarify newline documentation for open and io.TextIOWrapper.

2012-08-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks a lot, Andrew.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15624
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15636] base64.decodebytes is only available in Python3.1+

2012-08-13 Thread Andrew Scheller

New submission from Andrew Scheller:

According to the documentation ( 
http://docs.python.org/py3k/library/base64.html#base64.decodebytes ) both the 
decodebytes and the deprecated decodestring methods are available in the base64 
module in Python3.x
However in Python3.0 (I'm testing with version 3.0.1 built from source) the 
base64 module only has the decodestring method, it doesn't have decodebytes. 
IMHO the documentation should be updated to reflect this.

It looks like decodebytes was added to Python3.1 by 
http://bugs.python.org/issue3613

--
assignee: docs@python
components: Documentation
messages: 168080
nosy: docs@python, lurchman
priority: normal
severity: normal
status: open
title: base64.decodebytes is only available in Python3.1+
type: enhancement
versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15561] update subprocess docs to reference io.TextIOWrapper

2012-08-13 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Do you mean to mention stdin as well as stdout/stderr? It will be nice.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15561
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15635] memory leak with generators

2012-08-13 Thread Florent Xicluna

Florent Xicluna added the comment:

I don't mean perlbrew, but homebrew (an OS X package manager to install from 
source).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15635
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15635] memory leak with generators

2012-08-13 Thread Florent Xicluna

Florent Xicluna added the comment:

Though, I cannot reproduce on Debian Squeeze (2.6.6 deb or 2.7 from source) or 
Ubuntu (2.7.2+ or 3.2).

Someone on OS X might confirm the same issue.
This is python 2.7.3 installed from source (using perlbrew) and GCC 4.2.1.


The output of the script is:

$ python testiterbug.py
2.7.3 (default, May 20 2012, 19:54:58)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

[row for row in iterit(16777216)]
Memory usage:   9.3 MB

[row for row in iterit(8388608)]
Memory usage: 266.6 MB

--
nosy: +hynek, ned.deily, ronaldoussoren

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15635
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15555] Default newlines of io.TextIOWrapper

2012-08-13 Thread Andrew Svetlov

Andrew Svetlov added the comment:

It doesn't.
_io can be fixed to directly support os.linesep, but I doubt if anybody really 
need it.

--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15561] update subprocess docs to reference io.TextIOWrapper

2012-08-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Yes, that too. :) I am working on it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15561
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15555] Default newlines of io.TextIOWrapper

2012-08-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I think it can be useful for testing reasons (e.g. testing that os.linesep is 
respected by certain code).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15637] Segfault reading null VMA (works fine in python 2.x)

2012-08-13 Thread Alberto Milone

New submission from Alberto Milone:

The attached test case works fine in Python 2.7 but causes Pyhton 3.2 to 
segfault.

--
components: ctypes
files: randr_test
messages: 168087
nosy: albertomilone
priority: normal
severity: normal
status: open
title: Segfault reading null VMA (works fine in python 2.x)
type: crash
versions: Python 3.2
Added file: http://bugs.python.org/file26782/randr_test

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15637
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15635] memory leak with generators

2012-08-13 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I can reproduce this on an OSX 10.8 system, both using python 2.7 and python 
3.3. The growth is significantly less using python 3.3.

What's odd is that the growth does not occur when both test_iter calls use 
124 as the argument (or larger values).

If I'd had to guess I'd say that the free implementation doesn't return a 
buffer to the system for smaller blocks and does do it for larger buffers.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15635
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15635] memory leak with generators

2012-08-13 Thread Ronald Oussoren

Ronald Oussoren added the comment:

BTW. I don't think this is a memory leak, the amount of memory used doesn't 
increase when there are more calls to test_iter(123).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15635
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15509] webbrowser.open sometimes passes zero-length argument to the browser.

2012-08-13 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Better to fix producer of empty lines than filter those ones.
Keep in mind: there are several places there args list generated, probably you 
fix not all error sources.

--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15509
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-13 Thread R. David Murray

R. David Murray added the comment:

That's exactly what Georg's suggestion is about.  Sphinx does have a way to 
mark doctest snippets as run this, don't run this.  I believe that requires 
using 'make doctest' as the runner, but I already think that is the way to go, 
as I said before.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15629
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15638] incorrect version info for TextIOWrapper write_through docs

2012-08-13 Thread Chris Jerdonek

New submission from Chris Jerdonek:

The io.TextIOWrapper documentation says that the write_through argument was 
added in version 3.3:

Changed in version 3.3: The write_through argument has been added.

http://docs.python.org/dev/library/io.html#io.TextIOWrapper

However, it seems to be present in 3.2.  Also, the 3.2 documentation does not 
mention the write_through argument.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 168092
nosy: asvetlov, cjerdonek, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: incorrect version info for TextIOWrapper write_through docs
versions: Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-13 Thread R. David Murray

R. David Murray added the comment:

Silence doesn't mean consent, but it does mean you can go ahead and see if 
anyone complains :)

I think your proposal is fine, but I'd prefer making the sentinels just 
IGNORE and FAIL.  The module namespace means the names themselves don't 
have to be fully qualified.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15561] update subprocess docs to reference io.TextIOWrapper

2012-08-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

For 3.2 to mention write_through, issue 15638 should probably be fixed first.  
I can create a patch for that first.

--
dependencies: +incorrect version info for TextIOWrapper write_through docs

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15561
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15633] httplib.response is not closed after all data has been read

2012-08-13 Thread R. David Murray

R. David Murray added the comment:

Without a reproducible test case I doubt we are going to be able to solve this, 
but yes please provide what information you can for the record, in case someone 
else runs in to it in a more reproducible situation.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15633
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15639] csv.Error description is incorrectly broad

2012-08-13 Thread Xavier Morel

New submission from Xavier Morel:

In both Python 2.7 and Python 3.x, csv.Error is documented as:

Raised by any of the functions when an error is detected.

As far as I can tell from using the module and looking at the code, this is 
completely incorrect. There is actually a single instance of csv.Error being 
used: the instantiation of csv.Dialect (which converts TypeError raised from 
_csv._Dialect() into csv.Error, a comment notes that this is for compatibility 
with py 2.3).

And the only way to hit that code paths seems to be subclassing `Dialect` and 
putting incorrect values in the various attributes (providing them to 
`csv.reader` raises a TypeError).

I believe the documentation to csv.Error should be changed to:

1. Mark it as effectively deprecated
2. Indicate that the only situation in which it it may be raised is when 
initializing a subclass of csv.Dialect

--
assignee: docs@python
components: Documentation
messages: 168096
nosy: docs@python, xmorel
priority: normal
severity: normal
status: open
title: csv.Error description is incorrectly broad
versions: Python 2.7, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15639
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15592] subprocess.communicate() breaks on no input with universal newlines true

2012-08-13 Thread Andrew Svetlov

Andrew Svetlov added the comment:

_communicate_with_select has the same problem as _communicate_with_poll.

I don't understand why input has encoded if  universal_newlines and passed 
unchanged otherwise.

From my perspective input should be encoded (converted to bytes) if it is str 
regardless of universal_newlines value.

--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15592
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12623] universal newlines subprocess support broken with select- and poll-based communicate()

2012-08-13 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15634] synchronized decorator for the threading module

2012-08-13 Thread R. David Murray

R. David Murray added the comment:

Writing such a decorator is pretty trivial to do.  On the other hand, I've done 
it often enough that I could be convinced it is useful to add.

I think it would be better to have a decorator generator that takes a lock as 
its argument, however, since an application might well want to use the same 
lock for sections that it doesn't make sense to decorate, or use an RLock 
instead of a lock.  If no lock is passed, a default Lock could be created.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15634
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15634] synchronized decorator for the threading module

2012-08-13 Thread R. David Murray

R. David Murray added the comment:

Oh, I misread your code.

The code I'm working on uses the lock to serialize several different functions, 
and your decorator wouldn't work for that.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15634
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15595] subprocess.Popen(universal_newlines=True) does not work for certain locales

2012-08-13 Thread Chris Jerdonek

Changes by Chris Jerdonek chris.jerdo...@gmail.com:


--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15595
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15635] memory leak with generators

2012-08-13 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15635
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15604] PyObject_IsTrue failure checks

2012-08-13 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15604
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15557] Tests for webbrowser module

2012-08-13 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15557
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15634] synchronized decorator for the threading module

2012-08-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I'm not sure how useful that is in practice. Often you want to use the same 
lock accross several functions or methods.
Also, I think it would be more accurate to call this serialized than 
synchronized.

--
nosy: +jyasskin, pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15634
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15638] incorrect version info for TextIOWrapper write_through docs

2012-08-13 Thread R. David Murray

R. David Murray added the comment:

If I remember correctly it existed in one of the versions (python vs C) but not 
in both.  Or, it existed but wasn't actually respected by one of the versions.

--
nosy: +pitrou, r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15571] Python version of TextIOWrapper ignores write_through arg

2012-08-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ba055ccd99ef by Andrew Svetlov in branch 'default':
Issue #15571: comment the fact what python impl of TextIOWrapper always works 
in write_throuth mode
http://hg.python.org/cpython/rev/ba055ccd99ef

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15638] incorrect version info for TextIOWrapper write_through docs

2012-08-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

The C version seems to have it in 3.2 as well:

http://hg.python.org/cpython/file/5b629e9fde61/Modules/_io/textio.c#l818

Is it possible you were thinking of issue 15571 (not used in Python version 
but still respected)?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15571] Python version of TextIOWrapper ignores write_through arg

2012-08-13 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Patch applied

--
nosy: +asvetlov
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15638] incorrect version info for TextIOWrapper write_through docs

2012-08-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

See 9144014028f3. It was part of a bugfix in the 3.2 branch, therefore it 
wasn't exposed as a public API.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15638] incorrect version info for TextIOWrapper write_through docs

2012-08-13 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
resolution:  - rejected
stage: needs patch - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15638
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15561] update subprocess docs to reference io.TextIOWrapper

2012-08-13 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 As I can see in subprocess.py TextIOWrapper is applied to stdin also in 
 non-buffered (write_through=True) mode.

In 3.2, I will not mention the write_through argument based on Antoine's 
response to issue 15638.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15561
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >