[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Marc-Andre Lemburg m...@egenix.com added the comment: Alexander Belopolsky wrote: I am not sure PyUnicode_Decode() should treat NULL as an empty string. Definitely not. That would hide programming errors. -- nosy: +lemburg title: Some trivial python 2.x pickles fails to load in Python 3.2 - Some trivial python 2.x pickles fails to load in Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11272] input() has trailing carriage return on windows
Duncan Booth kupu...@gmail.com added the comment: If anyone knows how to reproduce the two bugs with a short Python script, I can try to convert it into a test. If you don't mind kicking off some sub-processes then here's a script that shows the bugs. I couldn't figure out how to do a script that would work on Python 3.1 but fail on Python 3.2, because I think to show the problem you have to use the shell to pipe data and Popen on Python 3.1 quotes the pipe character. -- Added file: http://bugs.python.org/file20857/stdintests.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11272 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11297] Make ChainMap() public in the collections module.
New submission from Raymond Hettinger rhettin...@users.sourceforge.net: Attaching a documentation patch. -- assignee: rhettinger files: chainmap.diff keywords: patch messages: 129161 nosy: rhettinger priority: low severity: normal status: open title: Make ChainMap() public in the collections module. type: feature request versions: Python 3.3 Added file: http://bugs.python.org/file20858/chainmap.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11297] Make ChainMap() public in the collections module.
Antoine Pitrou pit...@free.fr added the comment: This is nice, but IMO there is some information lacking, e.g.: - when an underlying mapping is mutated, does the ChainMap get updated too? - does it work with arbitrary mappings or only with dicts or dicts subclasses? I think new_child() isn't very useful. It seems two specialized for a one-liner. Ditto for parents(). -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11297] Make ChainMap() public in the collections module.
Antoine Pitrou pit...@free.fr added the comment: (too specialized, sorry) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Antoine Pitrou pit...@free.fr added the comment: I am not sure PyUnicode_Decode() should treat NULL as an empty string. Definitely not. That would hide programming errors. Well, this could break some third-party code. -- title: Some trivial python 2.x pickles fails to load in Python 3.2 - Some trivial python 2.x pickles fails to load in Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11288] Python installed from MSI doesn't work
Stefan Krah stefan-use...@bytereef.org added the comment: Works fine for me (Windows 7, 64-bit, 32-bit Python-3.2). I do have the plain US English version. Do you have localized versions? -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Marc-Andre Lemburg m...@egenix.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: I am not sure PyUnicode_Decode() should treat NULL as an empty string. Definitely not. That would hide programming errors. Well, this could break some third-party code. If that code passes NULL in as buffer s, that 3rd party code is already broken and the patch would hide this fact. -- title: Some trivial python 2.x pickles fails to load in Python 3.2 - Some trivial python 2.x pickles fails to load in Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Antoine Pitrou pit...@free.fr added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: I am not sure PyUnicode_Decode() should treat NULL as an empty string. Definitely not. That would hide programming errors. Well, this could break some third-party code. If that code passes NULL in as buffer s, that 3rd party code is already broken and the patch would hide this fact. Why broken? Passing NULL as a pointer and 0 as the length doesn't sound broken. Other APIs such as PyString_FromStringAndSize() allow exactly this convention. -- title: Some trivial python 2.x pickles fails to load in Python 3.2 - Some trivial python 2.x pickles fails to load in Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Marc-Andre Lemburg m...@egenix.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: I am not sure PyUnicode_Decode() should treat NULL as an empty string. Definitely not. That would hide programming errors. Well, this could break some third-party code. If that code passes NULL in as buffer s, that 3rd party code is already broken and the patch would hide this fact. Why broken? Passing NULL as a pointer and 0 as the length doesn't sound broken. Other APIs such as PyString_FromStringAndSize() allow exactly this convention. Right. They allow for this because those are object constructors that allow for creating objects without pre-defined content (hence the NULL). The 0 length feature is just a side-effect, not the main reason why we allow NULLs to be passed in as content buffer to those constructors. PyUnicode_Decode() et al. are conversion functions and these require valid content to work on. Passing in a NULL pointer does not fit that specification and so allowing for this would hide programming errors. E.g. an application using PyUnicode_Decode() might have hit a C lib error and forgets to check the pointer for NULL. It then calls PyUnicode_Decode() and the application continues happily without reporting the error. That's a broken application. -- title: Some trivial python 2.x pickles fails to load in Python 3.2 - Some trivial python 2.x pickles fails to load in Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11285] io.py standart stream setup crash
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: Hmm. Note that this problem does *not* occur if i don't install Python but run it in place, e.g. 'cd Lib/test; ../../python.exe -m test -v -uall test_iter' works just perfect. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11285] io.py standart stream setup crash
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: ... and the problem is all gone with 8c2935f180fa/r88525. So i'm faitful now and close this early alpha-stage problem. One of the nosy ones may add a nice description, re-open it or so. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11285] io.py standart stream setup crash
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: (.. should close it, then.) -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Antoine Pitrou pit...@free.fr added the comment: PyUnicode_Decode() et al. are conversion functions and these require valid content to work on. Passing in a NULL pointer does not fit that specification and so allowing for this would hide programming errors. Valid content doesn't mean a lot when the length is 0. What is a valid 0-length string compared to an invalid one? What if the pointer is non-NULL but segfaults when trying to dereference it? Is it valid? Moreover, malloc() is allowed by POSIX to return NULL when called with a 0 length: If size is 0, either a null pointer or a unique pointer that can be successfully passed to free() shall be returned. (http://www.opengroup.org/onlinepubs/007904875/functions/malloc.html) ... which means that such a pointer can then, depending on the platform, get passed (legitimately) to PyUnicode_Decode(). So, IMO, practicality beats purity here. Especially since it is bound to land in a bugfix release (3.2.1), which users don't expect to produce regressions in their own code. OTOH, I agree that a NULL pointer combined with non-0 length could produce an explicit error. -- title: Some trivial python 2.x pickles fails to load in Python 3.2 - Some trivial python 2.x pickles fails to load in Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11285] io.py standart stream setup crash
Antoine Pitrou pit...@free.fr added the comment: For the record: e.g. 'cd Lib/test; ../../python.exe -m test -v -uall test_iter' works just perfect. You don't need to cd. Just ./python -m test (etc.). See http://docs.python.org/devguide/runtests.html for more information. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11285] io.py standart stream setup crash
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - works for me ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Marc-Andre Lemburg m...@egenix.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: PyUnicode_Decode() et al. are conversion functions and these require valid content to work on. Passing in a NULL pointer does not fit that specification and so allowing for this would hide programming errors. Valid content doesn't mean a lot when the length is 0. What is a valid 0-length string compared to an invalid one? What if the pointer is non-NULL but segfaults when trying to dereference it? Is it valid? Moreover, malloc() is allowed by POSIX to return NULL when called with a 0 length: If size is 0, either a null pointer or a unique pointer that can be successfully passed to free() shall be returned. (http://www.opengroup.org/onlinepubs/007904875/functions/malloc.html) ... which means that such a pointer can then, depending on the platform, get passed (legitimately) to PyUnicode_Decode(). ... and Python has for years made sure that PyMem_Malloc() et al. return a non-NULL pointer when passed a size 0 value (see pymem.h for details), since the above was a really poor design choice. A lot of Python code relies on those functions returning NULL only in case of an error. So, IMO, practicality beats purity here. Especially since it is bound to land in a bugfix release (3.2.1), which users don't expect to produce regressions in their own code. Nope. Your suggestion would be a new feature and those are not allowed in patch level releases. I'm -1 on the idea for the reasons already stated. -- title: Some trivial python 2.x pickles fails to load in Python 3.2 - Some trivial python 2.x pickles fails to load in Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Antoine Pitrou pit...@free.fr added the comment: So, IMO, practicality beats purity here. Especially since it is bound to land in a bugfix release (3.2.1), which users don't expect to produce regressions in their own code. Nope. Your suggestion would be a new feature and those are not allowed in patch level releases. What new feature are you talking about? I think you misunderstood the actual issue: NULL as an empty string *worked* in 3.1 and that's why we have a regression with _pickle here. So, in the end, you are the one proposing a change in actual behaviour, while I'm trying to minimize changes (and breakage). -- title: Some trivial python 2.x pickles fails to load in Python 3.2 - Some trivial python 2.x pickles fails to load in Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
New submission from blokeley bloke...@gmail.com: `python -m unittest discover` caught me out. I had a test module called `test-foo.py` and no test was loaded. When I renamed to `test_foo.py` it worked. The documentation says For a project’s tests to be compatible with test discovery they must all be importable. I didn't realise that test-foo would not be importable. Could the documentation say For a project’s tests to be compatible with test discovery they must all be importable, so ensure that the module names are valid Python identifiers. Stackoverflow question is here: http://stackoverflow.com/questions/5088960/python-unittest-discovery-does-not-discover-tests -- assignee: docs@python components: Documentation messages: 129176 nosy: blokeley, docs@python priority: normal severity: normal status: open title: unittest discovery needs better explanation type: behavior versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11277] test_zlib crashes under Snow Leopard buildbot
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: I append a doc_lib_mmap.patch which may be helpful for those poor creatures who plan to write Python scripts for Mac OS X. (It may be a useful add-on anyway.) -- Added file: http://bugs.python.org/file20859/doc_lib_mmap.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11277 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11224] 3.2: tarfile.getmembers causes 100% cpu usage on Windows
Lars Gustäbel l...@gustaebel.de added the comment: Thanks for your great report. This is fixed now in r88528 (py3k) and r88529 (release32-maint). -- keywords: +3.2regression resolution: - accepted stage: - committed/rejected status: open - closed versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
Michael Foord mich...@voidspace.org.uk added the comment: Sounds like a good change to the docs. Care to provide a patch? -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11272] input() has trailing carriage return on windows
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed in 3.3 (r88530) and 3.2 (r88531). Others versions are not affected. Thanks Duncan Booth, I added tests based on your stdintests.py script. I used directly stdin argument of Popen() instead of using cmd.exe to create the pipe (which is not portable). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11272 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10830] PyUnicode_FromFormatV(%c) doesn't support non-BMP characters on narrow build
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed in 3.2 too (r88532). -- resolution: - fixed status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10830 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11277] test_zlib crashes under Snow Leopard buildbot
Changes by Steffen Daode Nurpmeso sdao...@googlemail.com: Removed file: http://bugs.python.org/file20859/doc_lib_mmap.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11277 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Jesús Cea Avión j...@jcea.es added the comment: What if we commit Antoine patch for 3.2.x, and the correct patch for py3k trunk?. I am actually +1 to Marc-Andre. I feel in my guts that the provided patch is hidding a deeper issue. But avoiding surprises for third parties in 3.2.1 is a good idea. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2650] re.escape should not escape underscore
Changes by SilentGhost ghost@gmail.com: Added file: http://bugs.python.org/file20860/test_re.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2650 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2650] re.escape should not escape underscore
Changes by SilentGhost ghost@gmail.com: Removed file: http://bugs.python.org/file20389/test_re.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2650 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Antoine Pitrou pit...@free.fr added the comment: Nope. Your suggestion would be a new feature and those are not allowed in patch level releases. What new feature are you talking about? I think you misunderstood the actual issue: NULL as an empty string *worked* in 3.1 And, with a very high likelihood, it also worked in 2.7, 2.6, etc. So, feel free to suggest a compatibility breakage in 3.3 if you think that's better (*), but I don't think that's acceptable in 3.2.1, where the issue should be fixed anyway. (*) which really means provide a patch :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11277] test_zlib crashes under Snow Leopard buildbot
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: Sorry, i've got that kid running around which sometimes doesn't know what it is doing. But this documentation patch may really be a help. It's my first doc-patch, so it surely needs to be revised, if interest exists in such a patch for mmap at all, say. Thanks for your understanding. -- Added file: http://bugs.python.org/file20861/doc_lib_mmap.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11277 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3080] Full unicode import system
Antoine Pitrou pit...@free.fr added the comment: This new failure is perhaps related: http://www.python.org/dev/buildbot/all/builders/AMD64%20Windows%20Server%202008%203.x/builds/572/steps/test/logs/stdio == FAIL: test_module (test.test_reprlib.LongReprTest) -- Traceback (most recent call last): File c:\buildslave-py3k\3.x.curtin-win2008-amd64\build\lib\test\test_reprlib.py, line 237, in test_module module '%s' from '%s' % (areallylongpackageandmodulenametotestreprtruncation.__name__, areallylongpackageandmodulenametotestreprtruncation.__file__)) AssertionError: module 'areallylongpackageandmodulenametotestreprtruncation.areallylongpackage [truncated]... != module 'areallylongpackageandmodulenametotestreprtruncation.areallylongpackage [truncated]... Diff is 825 characters long. Set self.maxDiff to None to see it. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Marc-Andre Lemburg m...@egenix.com added the comment: Please go with Alexander's solution of fixing the higher level code rather than silently trying to introduce a new feature in PyUnicode_Decode() that hides programming errors. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10791] Wrapping TextIOWrapper around gzip files
David Beazley d...@dabeaz.com added the comment: Bump. This is still broken in Python 3.2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10791 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Antoine Pitrou pit...@free.fr added the comment: Please go with Alexander's solution of fixing the higher level code rather than silently trying to introduce a new feature in PyUnicode_Decode() that hides programming errors. I'm sorry, I'm perfectly fine with my own patch, so someone else will have to propose an alternative patch if they want you. I am certainly not at your disposal for any orders you might give :) Remember, this is open source, so active contributors have the last say, not by-standers. Thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
blokeley bloke...@gmail.com added the comment: Will do but I haven't submitted a patch before and it's impossible to tell from python.org/dev whether to use the svn or hg repositories. If possible, please just let me know the URL of the hg repository against which I should make the patch (I don't currently have an svn client). I tried using hg convert on http://svn.python.org/projects/python/branches/py3k but my company firewall blocked that from working (too many HTTP requests per minute). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
Ezio Melotti ezio.melo...@gmail.com added the comment: http://code.python.org/hg/branches/py3k/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11288] Python installed from MSI doesn't work
Bartosz sspame...@gmail.com added the comment: I've got English version too. Python is 32 bit and operating system is also 32 bit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Marc-Andre Lemburg m...@egenix.com added the comment: Jesús Cea Avión wrote: Jesús Cea Avión j...@jcea.es added the comment: What if we commit Antoine patch for 3.2.x, and the correct patch for py3k trunk?. I am actually +1 to Marc-Andre. I feel in my guts that the provided patch is hidding a deeper issue. But avoiding surprises for third parties in 3.2.1 is a good idea. Jesus, could you please check whether Alexander's solution fixes the problem ? Thanks. -- title: Some trivial python 2.x pickles fails to load in Python 3.2 - Some trivial python 2.x pickles fails to load in Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Antoine Pitrou pit...@free.fr added the comment: Oops, I hadn't seen Alexander's patch. Sorry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11288] Python installed from MSI doesn't work
Bartosz sspame...@gmail.com added the comment: I have found a problem and sollution: previously I have used Python 2.x and when I removed that version and next installed Python32, PYTHONPATH in system variabled indicated still to Python2.x. Removing all python paths to old version solved the problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Antoine Pitrou pit...@free.fr added the comment: So, about Alexander's patch: - it lacks a test - it doesn't solve the issue with PyUnicode_Decode's confusing error message when a NULL is passed (ValueError: operation forbidden on released memoryview object); if we want to disallow NULL, we should have a clean error message -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3080] Full unicode import system
STINNER Victor victor.stin...@haypocalc.com added the comment: This new failure is perhaps related: (...) test_reprlib Ah yes, yesterday, I tried to remember which test was impacted by the module change, but all tests passed on Linux. Anyway, it's now fixed by r88533. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
Changes by blokeley bloke...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file20862/py3k_rev9921_issue11298.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
Changes by blokeley bloke...@gmail.com: Removed file: http://bugs.python.org/file20862/py3k_rev9921_issue11298.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
Changes by blokeley bloke...@gmail.com: Added file: http://bugs.python.org/file20863/py3k_rev9921_issue11298.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
Michael Foord mich...@voidspace.org.uk added the comment: Thanks blokely, looks good. Needs applying to 2.7 / 3.2 and 3.3 branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10791] Wrapping TextIOWrapper around gzip files
R. David Murray rdmur...@bitdance.com added the comment: If a patch had been proposed it probably would have gotten in to 3.2. Maybe someone (perhaps you?) will find the time before 3.2.1. Someone has decided to work on the bz2 rewrite, by the way (issue 5863). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10791 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10791] Wrapping TextIOWrapper around gzip files
David Beazley d...@dabeaz.com added the comment: If I can find some time, I may took a look at this. I just noticed that similar problems arise trying to wrap TextIOWrapper around the file-like objects returned by urllib.request.urlopen as well. In the big picture, some discussion of what it means to be file-like might be in order. If something is file-like and binary, should that always imply that I be able to wrap a TextIOWrapper object around it in order to encode/decode text? I would argue yes, but I'd be curious to know what others think. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10791 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8289] multiprocessing.Process.__init__ pickles all arguments
Changes by Ram Rachum cool...@cool-rr.com: -- versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8289 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10791] Wrapping TextIOWrapper around gzip files
STINNER Victor victor.stin...@haypocalc.com added the comment: What is the problem with Python 3.2? It works correctly here: $ cat bla.txt bli blo bla $ gzip bla.txt $ ./python Python 3.3a0 (unknown, Feb 23 2011, 13:03:50) import gzip, io f = io.TextIOWrapper(gzip.open(bla.txt.gz),encoding='ascii') f.read() 'bli\nblo\nbla\n' If someone added Python 3.2 in the Versions field because of an issue with bz2: please open a new issue instead. -- nosy: +haypo versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10791 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10791] Wrapping TextIOWrapper around gzip files
David Beazley d...@dabeaz.com added the comment: Python 3.2 (r32:88445, Feb 20 2011, 21:51:21) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type help, copyright, credits or license for more information. import gzip import io f = io.TextIOWrapper(gzip.open(file.gz),encoding='latin-1') f.readline() Traceback (most recent call last): File stdin, line 1, in module io.UnsupportedOperation: read1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10791 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9276] pickle should support methods
Ram Rachum cool...@cool-rr.com added the comment: I also miss being able to pickle unbound methods on Python 3. I don't think there's an interest in pickling the actual code objects. In my opinion, unbound methods should be pickled exactly like all the other Python definitions, such as bound methods, top-level functions, and classes: They should be pickled by name. IIUC, the challenge is how to figure out on which class an unbound method is defined. I'm using the term unbound method colloquially, I know it's implemented as a function. So perhaps Python needs to be changed to give unbound methods some attribute that will tell on which class they're defined? -- nosy: +cool-RR ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9276 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9276] pickle should support methods
Changes by Ram Rachum cool...@cool-rr.com: -- versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9276 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10791] Wrapping TextIOWrapper around gzip files
R. David Murray rdmur...@bitdance.com added the comment: Yes, a clear definition of the minimum requirements for being wrapped by TextIOWrapper sounds like a necessary thing to have (and I'd be inclined to agree with your assertion, but I didn't work on the IO library :). It would be best to open a new issue for that. -- versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10791 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11288] Python installed from MSI doesn't work
Matthew Funke go4...@gmail.com added the comment: Changing the environment variables did the trick! Thank you very much! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10791] Wrapping TextIOWrapper around gzip files
STINNER Victor victor.stin...@haypocalc.com added the comment: Yes, a clear definition of the minimum requirements for being wrapped by TextIOWrapper sounds like a necessary thing to have About that: is read1() argument mandatory or not? In _pyio, BufferedIOBase.read1() argument is optional (default: None); BytesIO.read1(), BufferedReader.read1(), BufferedRWPair.read1(), BufferedRandom.read1() argument is mandatory. In _io, BufferedIOBase.read1() raises directly an exception, without checking the arguments; BufferedReader.read1() argument is mandatory. In the io doc, BufferedIOBase.read1() argument is optional (default: -1), BytesIO.read1() has no argument (!) and BufferedReader.read1() argument is mandatory. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10791 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Antoine is right, my patch is only of discussion quality and if my approach gets support, I will produce a more polished patch. While I am fairly certain that this bug should be fixed where it was introduced, namely in the _pickle module, I am not sure patching both load_binstring() and load_short_binstring() is the right approach. It may be better to modify _Unpickler_Read() so that it returns self-input_buffer (or even self-input_buffer + self-next_read_idx) for zero n. This would be a cleaner design similar to that for PyMem_Malloc() et al. (Since _Unpickler_Read() is private API and the comment documenting it does not specify that it returns NULL for n = 0, I think this can be done in a bugfix release. Furthermore, I reviewed the uses of _Unpickler_Read() with variable and thus potentially zero size and one of them is followed by a null check for s.) On the other hand, my patch also eliminates redundant call to _Unpickler_Read() and makes load_binstring() and load_short_binstring() logic similar to that in load_counted_long(). The main advantage, of course is skipping PyUnicode_Decode() which will load a codec potentially triggering an import and execution of python code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Antoine Pitrou pit...@free.fr added the comment: It may be better to modify _Unpickler_Read() so that it returns self-input_buffer (or even self-input_buffer + self-next_read_idx) for zero n. I agree this would be better for readability and maintainability. On the other hand, my patch also eliminates redundant call to _Unpickler_Read() and makes load_binstring() and load_short_binstring() logic similar to that in load_counted_long(). The main advantage, of course is skipping PyUnicode_Decode() which will load a codec potentially triggering an import and execution of python code. Well, a theoretical argument could be made that some codec could return a non-empty string when asked to decode an empty bytestring, but I'm not sure it has much practical worth :) -- title: Some trivial python 2.x pickles fails to load in Python 3.2 - Some trivial python 2.x pickles fails to load in Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Feb 23, 2011 at 10:22 AM, Antoine Pitrou rep...@bugs.python.org wrote: .. Well, a theoretical argument could be made that some codec could return a non-empty string when asked to decode an empty bytestring, but I'm not sure it has much practical worth :) I was thinking about that as well. Note that the opposite is quite common, for example any encoding that uses BOM will turn empty unicode string into a non-empty byte string. I don't think a codec that decodes b'' into non-empty string exists, but it would be reasonable for a codec that requires BOM or some other metadata to reject raise an error on b''. If we rely on decode(b'') == '', these errors will go unnoticed. I am going to prepare a Unpickler_Read() patch with tests and play with it a little. It is a good idea to separate performance optimizations from bug fixes anyways. If we want to bypass decode on empty strings, we can do it independently. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- assignee: - belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
blokeley bloke...@gmail.com added the comment: Added release2.7-maint patch. -- Added file: http://bugs.python.org/file20864/py2.7-maint_rev45852_issue11298.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
Changes by blokeley bloke...@gmail.com: Removed file: http://bugs.python.org/file20864/py2.7-maint_rev45852_issue11298.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
blokeley bloke...@gmail.com added the comment: Added release2.7-maint patch. -- Added file: http://bugs.python.org/file20865/py2.7-maint_rev45852_issue11298.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
blokeley bloke...@gmail.com added the comment: Added release3.2-maint patch. I created the patches by cloning the corresponding hg repo from http://code.python.org/hg If this is the wrong thing to do, let me know. I have no idea where the 3.3 branch is. Please advise. -- Added file: http://bugs.python.org/file20866/py3.2-maint_rev9895_issue11298.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11298] unittest discovery needs better explanation
Michael Foord mich...@voidspace.org.uk added the comment: Hey, blokeley the same patch will apply cleanly against 3.2 / 3.3 so no worries. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11299] Allow deepcopying and pickling paused generators
New submission from Ram Rachum cool...@cool-rr.com: Please allow to deepcopy and to pickle paused generators, including all their state. This is implemented in Pypy: Python 2.5.2 (335e875cb0fe, Dec 28 2010, 20:31:56) [PyPy 1.4.1] on win32 Type copyright, credits or license() for more information. DreamPie 1.1.1 import pickle, copy def next(thing): # For compatibility ... return thing.next() def g(): ... for i in range(4): ... yield i list(g()) [0, 1, 2, 3] live_generator = g() next(live_generator) 0 next(live_generator) 1 Now `live_generator` holds a generator which is in the middle of its operation. It went through 0 and 1, and it still has 2 and 3 to yield. We deepcopy it: live_generator_deepcopy = copy.deepcopy(live_generator) The deepcopied generator assumes the same state of the original one. Let's exhaust it: list(live_generator_deepcopy) [2, 3] list(live_generator_deepcopy) [] Pypy also lets us pickle and unpickle the live generator: live_generator_pickled = pickle.dumps(live_generator) live_generator_unpickled = pickle.loads(live_generator_pickled) list(live_generator_unpickled) [2, 3] list(live_generator_unpickled) [] And the original live generator was unchanged by all these operations: list(live_generator) [2, 3] list(live_generator) [] All the above was demonstrated in Pypy. In Python 3.2, trying to pickle a live generator raises this exception: pickle.dumps(live_generator) Traceback (most recent call last): File stdin, line 1, in module _pickle.PicklingError: Can't pickle class 'generator': attribute lookup builtins.generator failed And trying to deepcopy one raises this exception: copy.deepcopy(live_generator) Traceback (most recent call last): File stdin, line 1, in module File c:\Python32\lib\copy.py, line 174, in deepcopy y = _reconstruct(x, rv, 1, memo) File c:\Python32\lib\copy.py, line 285, in _reconstruct y = callable(*args) File c:\Python32\lib\copyreg.py, line 88, in __newobj__ return cls.__new__(cls, *args) TypeError: object.__new__(generator) is not safe, use generator.__new__() It would be nice if Python 3.2 could pickle and deepcopy live generators. -- components: Library (Lib) messages: 129213 nosy: cool-RR priority: normal severity: normal status: open title: Allow deepcopying and pickling paused generators type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11299] Allow deepcopying and pickling paused generators
Ram Rachum cool...@cool-rr.com added the comment: P.S. I'm willing to write a test-case if it will help. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11297] Make ChainMap() public in the collections module.
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10791] Wrapping TextIOWrapper around gzip files
Antoine Pitrou pit...@free.fr added the comment: It would probably be ok to fallback on read() when read1() isn't implemented. read1() is supposed to be implemented by all BufferedIO-compliant classes, but in all honesty I don't think it's very useful in practice. It's supposed to be an optimization, and I think it's a misguided one; the generalized prefetch() primitive I proposed last year would certainly be more useful: see http://mail.python.org/pipermail/python-dev/2010-September/104194.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10791 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11297] Make ChainMap() public in the collections module.
R. David Murray rdmur...@bitdance.com added the comment: I don't think that new_child and parents are too specialized at all, indeed they are essential to one of the primary use cases for the construct. I find Django's push and pop much more intuitive than new_child and parents, however, and would prefer those methods. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11297] Make ChainMap() public in the collections module.
Alex alex.gay...@gmail.com added the comment: An important distinction with Django's push/pop is that they mutate the Context (ChainMap) rather than return a fresh instance. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10791] Wrapping TextIOWrapper around gzip files
Changes by Alex alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10791 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11297] Make ChainMap() public in the collections module.
R. David Murray rdmur...@bitdance.com added the comment: Yes, that's part of what I find more intuitive about it. I think of the chainmap as a stack. Perhaps if I had a different application (I would use it for either configuration or namespace management) I'd want a different API, but for those two the stack approach seems most natural to me. In particular, since only the top dict can be updated, it seems most natural to pop it off the top of the stack in order to modify the next one down (and then push it back, if desired). If instead the way to modify the next one down is to do parents, then I'm mutating the chainmap I just did the parents call on, but I'm not referencing that object, I'm referencing the one I got back from the parents call. It just seems more natural that the mutation operations should be carried out via a single chainmap object by using pop and push rather than effectively modifying (potentially multiple) chainmap objects by manipulating other chainmap objects. (Yes, I realize that it is really the underlying dicts that are being modified, but conceptually I'm thinking of the chainmap as a single data structure). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11227] [DOC] asyncore - use 'Host' header in HTTP example
Changes by Sandro Tosi sandro.t...@gmail.com: -- assignee: sandro.tosi - docs@python nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11239] regexp-howto - add missing } to metachars
Changes by Sandro Tosi sandro.t...@gmail.com: -- assignee: sandro.tosi - docs@python nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11239 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example
Changes by Sandro Tosi sandro.t...@gmail.com: -- assignee: sandro.tosi - docs@python nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11292] Curses - add A_REVERSE to attributes table
Changes by Sandro Tosi sandro.t...@gmail.com: -- assignee: sandro.tosi - docs@python nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11292 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11293] Distutils - read the file when using it in long_description
Changes by Sandro Tosi sandro.t...@gmail.com: -- assignee: sandro.tosi - docs@python nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11293 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11294] Locale - update uniform ERA_*_FMT doc
Changes by Sandro Tosi sandro.t...@gmail.com: -- assignee: sandro.tosi - docs@python nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11294 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11288] Python installed from MSI doesn't work
Martin v. Löwis mar...@v.loewis.de added the comment: Ok, closing this as invalid then - it's not a bug in the installer, but a misconfiguration of the local system. Thanks to Bartosz for the analysis! -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11297] Make ChainMap() public in the collections module.
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, the new_child() and parents() part of the API was modeled after contexts in ANLTR where they are needed to overcome the limitations of Django's push/pop style which precludes a context from having multiple, independent children at the same time. The module docstring in the http://code.activestate.com/recipes/577434/ recipe shows how new_child() can be used to easily model both dynamic scoping and nested scoping. The other advantage of the new_child/parents API over the push/pop API is that it overcomes the occasional templating need to keep two copies of the context (before a push and after a push). In some ways, it is more difficult to keep track of a mutating chain that is being continuously pushed and popped. It is simpler to assign a chain to a variable and always know that it is associated with a given template and not have to worry about whether some utility function pushed a new context and failed to pop it when it was done. A push/pop style introduces the same problems as matching matching malloc() with free() in C. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11300] mmap() large file failures on Mac OS X docfix
New submission from Steffen Daode Nurpmeso sdao...@googlemail.com: Issue 11277 was closed upon the generally accepted conclusion that the failure is that mmap(2) on Mac OS X has a long time known bug (see msg129107, or directly http://lists.apple.com/archives/darwin-development/2003/Jun/msg00141.html). Issue 11277 fixed the problem in the test suite, but it does give end-users no hint that such a problem exists (on the documentation side). And it's my believe that a beginner or even a non-low-level programmer may be lost in an equal situation. (Though one could argue that such a HE should not use mmap(2), but everyone has a first-time somewhen, say.) In addition, there are many people who don't have the chance to work/test on multiple operating systems and/or hardware, and who need the hand of people who are experienced and can give hints on stupidiness or however this word is correctly spelled. (Am i preaching already?) Because Python is expected to be a user-friendly language i do request a documentation patch which gives a hint. I'll apply a patch, but i'm somewhat new to Python and rST etc., so it surely needs a hand. (Maybe even its speech is too aggressive??) -- assignee: docs@python components: Documentation files: doc_lib_mmap.patch keywords: patch messages: 129221 nosy: docs@python, sdaoden priority: normal severity: normal status: open title: mmap() large file failures on Mac OS X docfix type: feature request versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20867/doc_lib_mmap.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11252] Handling statement OR assignment continuation '\' on Win32 platform
Łukasz Langa luk...@langa.pl added the comment: OK, now I know more about glob than I ever wanted to! :) Basically it comes down to this: unix os.path.split('\\') ('', '\\') win32 os.path.split('\\') ('\\', '') This is why \ is recognized as the root directory on Win32 and as a non-existent file on Unix. In case of / both Unix and Win32 treat it as a valid directory separator so `os.path.split('/')` returns `('/', '')`. This is why / is recognized as the root directory on both systems. Does this answer your questions? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11252 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11301] cookielib.LWPCookieJar.save() doesn't save cookies
New submission from Mike Cencula m...@cencula.com: I'm trying to use cookielib.LWPCookieJar.save() to save cookies from a website. The cookie file is created with a header line, but the cookies are not stored. Example program attached. Python version: 2.5.2 (r252:60911, Jan 24 2010, 14:53:14) Running on Debian lenny as a guest on Virtualbox Output from the attached file pasted below: mike@debian:~$ python cookieexample2.py Here are the headers of the page : Server: none Content-Type: text/html Pragma: no-cache Cache-Control: no-cache Expires: Tue, 04 Dec 1993 21:29:02 GMT Vary: Accept-Encoding Date: Wed, 23 Feb 2011 20:43:55 GMT Transfer-Encoding: chunked Connection: close Connection: Transfer-Encoding These are the cookies we have received so far : 0 : Cookie BIGipServerdiy_pool=604317450.20480. for www.diy.co.uk/ 1 : Cookie BIGipServerdiy_pool=637871882.20480. for www.diy.com/ 2 : Cookie DYN_USER_CONFIRM=1ab776eae0bf5661a2955c6ec7858439 for www.diy.com/ 3 : Cookie DYN_USER_ID=1619150879 for www.diy.com/ 4 : Cookie JSESSIONID=OVHJMMEHW4LOQCRHAWVCFFIKE2C0YIV0 for www.diy.com/ mike@debian:~$ Contents of cookie.lwp afterward: mike@debian:~$ cat cookies.lwp #LWP-Cookies-2.0 mike@debian:~$ Behavior is nearly identical using cookielib.MozillaCookieJar except the headers are different in the saved cookie file. Cookies themselves are not saved. I am new to Python, so I hope this is not user error. -- components: Library (Lib) files: cookieexample2.py messages: 129223 nosy: mcencula priority: normal severity: normal status: open title: cookielib.LWPCookieJar.save() doesn't save cookies type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file20868/cookieexample2.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11301] cookielib.LWPCookieJar.save() doesn't save cookies
Mike Cencula m...@cencula.com added the comment: User error indeed. Adding ignore_discard=True, ignore_expires=True cured the issue. Thank you. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11302] Add more tests to test_ast.py
New submission from Vincent Legoll vincent.leg...@gmail.com: While working to improve pypy's compliance with cpython2.7 I added more tests to the ast module test suite. They may be of interest here too... -- components: Tests files: add-more-tests-for-ast_py.patch keywords: patch messages: 129225 nosy: vincele priority: normal severity: normal status: open title: Add more tests to test_ast.py versions: Python 2.7 Added file: http://bugs.python.org/file20869/add-more-tests-for-ast_py.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I am attaching a new version of issue11286.diff which fixes the issue by removing special handling of n == 0 case from _Unpickler_Read(). Note that _Unpickler_Read() (formerly known as unpickler_read()) only started to return null pointer instead of a pointer to an empty string when given n == 0 after optimizations implemented in issue #9410. This observation makes me more comfortable with changing the behavior of this function because current behavior is itself a regression from 3.1. (An off-topic remark: What was the point of renaming static functions in _pickle.c made in r84653? There is no need to prefix static C functions with an underscore to make them private and the convention seems to be not to use CamelCase in the names of non-CAPI functions.) -- stage: patch review - commit review Added file: http://bugs.python.org/file20870/issue11286.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file20856/issue11286.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4376] Nested ctypes 'BigEndianStructure' fails
Changes by Jake jake.coff...@gmail.com: -- nosy: +Jake.Coffman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: $ ./python.exe -m timeit b'x'.decode('latin1') 10 loops, best of 3: 2.57 usec per loop $ ./python.exe -m timeit b'x'.decode('latin-1') 100 loops, best of 3: 0.336 usec per loop The reason for this behavior is that 'latin-1' is short-circuited in C code while 'latin1' has to be looked up in aliases.py. Attached patch fixes this issue. -- files: latin1.diff keywords: patch messages: 129227 nosy: belopolsky, lemburg priority: normal severity: normal status: open title: b'x'.decode('latin1') is much slower than b'x'.decode('latin-1') type: performance Added file: http://bugs.python.org/file20871/latin1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11304] Input/output tutorial - PI is rounded not truncated
New submission from Sandro Tosi sandro.t...@gmail.com: Following up http://mail.python.org/pipermail/docs/2011-January/002974.html here's a patch to fix it. -- assignee: docs@python components: Documentation keywords: patch messages: 129228 nosy: docs@python, sandro.tosi priority: low severity: normal stage: patch review status: open title: Input/output tutorial - PI is rounded not truncated versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8426] multiprocessing.Queue fails to get() very large objects
Charles-Francois Natali neolo...@free.fr added the comment: Alright, it's normal behaviour, but since it doesn't seem to be documented, it can be quite surprising. A queue works like this: - when you call queue.put(data), the data is added to a deque, which can grow and shrink forever - then a thread pops elements from the deque, and sends them so that the other process can receive them through a pipe or a Unix socket (created via socketpair). But, and that's the important point, both pipes and unix sockets have a limited capacity (used to be 4k - pagesize - on older Linux kernels for pipes, now it's 64k, and between 64k-120k for unix sockets, depending on tunable systcls). - when you do queue.get(), you just do a read on the pipe/socket In multiproc3.py, the items are first appended to the queue, then the sender process is waited on. But when size = 7279, the data submitted reaches 64k, so the writting thread blocks on the write syscall. And since a join is performed before dequeing the item, you just deadlock, since the join waits for the sending thread to complete, and the write can't complete since the pipe/socket is full! If you dequeue the item before waiting the submitter process, everything works fine: t0 = time.time() try: get_t0 = time.time() vals = q.get(timeout=3.) get_duration = time.time() - get_t0 s.join() Now, for the initial report, the problem is related: def child(task_q, result_q): while True: print Getting task... task = task_q.get() print Got task, task[:10] task = task * 1 print Putting result, task[:10] result_q.put(task) print Done putting result, task[:10] task_q.task_done() tasks = [foo, bar, ABC, baz] for task in tasks: print Putting task, task[:10], ... task_q.put(task) print Done putting task, task[:10] task_q.join() for task in tasks: print Getting result... print Got result, result_q.get()[:10] When the child puts results, since they're bigger tha 64k, the underlying pipe/socket fills up. Thus, the sending thread blocks on the write, and doesn't dequeue the result_q, which keeps growing. So you end up storing in the result_q every object before starting to dequeue them, which represents roughly 4 * 3 * 1e8 = 1.2GB, which could explain the out-of-memory errors (and if it's Unicode string it's even much more)... So the moral is: don't put() to much data to a queue without dequeuing them in a concurrent process... -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8426 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11304] Input/output tutorial - PI is rounded not truncated
SilentGhost ghost@gmail.com added the comment: Sandro, you didn't attach anything. -- nosy: +SilentGhost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11304] Input/output tutorial - PI is rounded not truncated
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11304] Input/output tutorial - PI is rounded not truncated
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Fixed in r88356, r88537, and r88538. Thanks for the report. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11304] Input/output tutorial - PI is rounded not truncated
Changes by SilentGhost ghost@gmail.com: -- Removed message: http://bugs.python.org/msg129230 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11304] Input/output tutorial - PI is rounded not truncated
Changes by SilentGhost ghost@gmail.com: -- nosy: -SilentGhost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: In issue11303.diff, I add similar optimization for encode('latin1') and for 'utf8' variant of utf-8. I don't think dash-less variants of utf-16 and utf-32 are common enough to justify special-casing. -- Added file: http://bugs.python.org/file20872/issue11303.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com