[issue14181] Support getbuffer redirection scheme in memoryview

2012-03-03 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: Supporting chained objects that redirect getbuffer requests to a single exporter rather than re-exporting the buffer is a matter of removing an assert, but it needs tests and documentation updates. -- assignee: skrah messages:

[issue14182] collections.Counter equality test thrown-off by zero counts

2012-03-03 Thread Raymond Hettinger
New submission from Raymond Hettinger raymond.hettin...@gmail.com: from collections import Counter x=Counter(a=10,b=0,c=3) y=Counter(a=10,c=3) x == y False all(x[k]==y[k] for k in set(x) | set(y)) True -- assignee: rhettinger components: Library (Lib) messages: 154827 nosy:

[issue12659] Add tests for packaging.tests.support

2012-03-03 Thread Francisco Martín Brugué
Francisco Martín Brugué franci...@email.de added the comment: I've updated the patch with a test case for 'create_distribution' and one minor rename. I personally don't like too much the structure of 'LoggingCatcherTestCase' so improvements are welcome. Cheers, francis -- Added

[issue14176] Fix unicode literals

2012-03-03 Thread Jean-Michel Fauth
Jean-Michel Fauth wxjmfa...@gmail.com added the comment: 2012/3/3 Terry J. Reedy rep...@bugs.python.org Terry J. Reedy tjre...@udel.edu added the comment: That would mean in Python 3, '...' works and u'...' will not work. You misunderstand the PEP: in 3.3, '...' and u'...' will be

[issue14144] urllib2 HTTPRedirectHandler not forwarding POST data in redirect

2012-03-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: However, an added option which leaves the current behavior as the default shouldn't hurt. My opinion too. urllib is sometimes a client, sometimes a library used to build clients, which need a knob to implement their own decisions or possibly

[issue14144] urllib2 HTTPRedirectHandler not forwarding POST data in redirect

2012-03-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Also, new tests and a doc update would be needed, but you may want to wait for Senthil’s approval before doing more work on this. -- ___ Python tracker rep...@bugs.python.org

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-03-03 Thread Merlijn van Deen
Changes by Merlijn van Deen valhall...@gmail.com: Removed file: http://bugs.python.org/file24567/test_bytestrpickle.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6784 ___

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-03-03 Thread Merlijn van Deen
Merlijn van Deen valhall...@gmail.com added the comment: OK, and now a version that's not broken... I forgot to initialize self-bytestr for PicklerObject/UnpicklerObject. *puts on the you-broke-the-build-hat* Except for test_packaging.test_caches, this version passes all tests --

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-03-03 Thread Merlijn van Deen
Changes by Merlijn van Deen valhall...@gmail.com: Removed file: http://bugs.python.org/file24714/pickle_bytestr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6784 ___

[issue14036] urlparse insufficient port property validation

2012-03-03 Thread zulla
zulla d...@defendassist.com added the comment: u(http://www.google.com:99;).port 99L -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14036

[issue14176] Fix unicode literals

2012-03-03 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I'd like to encourage you to not try this sort of thing out from an interactive interpreter (incidentally, where does psi last command come from? It doesn't look like Python's REPL). As David and Terry noted, interactions with such a console,

[issue4773] HTTPMessage not documented and has inconsistent API across Py2/Py3

2012-03-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Now that two Python 3 releases have been made, I don’t know if changing the code is still an option. The doc can certainly still be improved. Adding Ezio to nosy; I think it’s you who opened a bug report about removing superfluous getter

[issue4773] HTTPMessage not documented and has inconsistent API across Py2/Py3

2012-03-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file13430/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4773 ___

[issue14122] operator: div() instead of truediv() in documention since 3.1.2

2012-03-03 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This was fixed in 8de95f3b2404 (3.2) and d4b17c478e49 (default). Thanks for the report and the patch! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___

[issue14171] warnings from valgrind about openssl as used by CPython

2012-03-03 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: # generated on buildbot.rubenkerkhof.com, which had, according to Ruben # Fedora's package openssl-1.0.1-0.1.beta2.fc17.x86_64 I think openssl needs to be compiled with -DPURIFY to avoid this. -- nosy: +skrah

[issue14126] Speed up list comprehensions by preallocating the list where possible

2012-03-03 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: You should try to port the patch to 3.3 and do some benchmark there. Having some additional tests to make sure that it works fine in all the cases would be nice too (even if listcomps are already used elsewhere in the code/tests).

[issue14135] check for locale changes in test.regrtest

2012-03-03 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14135 ___

[issue14183] Test coverage for lib/packaging.install and lib/packaging/pypi/wrapper

2012-03-03 Thread Francisco Martín Brugué
New submission from Francisco Martín Brugué franci...@email.de: I've added a test to Lib/packaging/tests/test_install.py to increase the line test coverage of lib/packaging.install (and lib/packaging/pypi/wrapper indirectly from 14% to 80%). -- components: Tests files:

[issue14183] Test coverage for lib/packaging.install and lib/packaging/pypi/wrapper

2012-03-03 Thread Francisco Martín Brugué
Changes by Francisco Martín Brugué franci...@email.de: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14183 ___ ___

[issue14183] Test coverage for lib/packaging.install and lib/packaging/pypi/wrapper

2012-03-03 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +eric.araujo, nadeem.vawda stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14183 ___

[issue14183] Test coverage for packaging.install and packaging.pypi.wrapper

2012-03-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the patch. -# Test that the isntalled raises an exception if the project does not +# Test that the installed raises an exception if the project does not It took me many seconds to find the change :) +def

[issue14183] Test coverage for packaging.install and packaging.pypi.wrapper

2012-03-03 Thread Francisco Martín Brugué
Francisco Martín Brugué franci...@email.de added the comment: Hi Éric, - # Test that the isntalled raises an exception if the project does not + # Test that the installed raises an exception if the project does not It took me many seconds to find the change :) The editor told me :) +

[issue14126] Speed up list comprehensions by preallocating the list where possible

2012-03-03 Thread Philip Jenvey
Philip Jenvey pjen...@underboss.org added the comment: iter(range(1)) should also see a speedup because range's iter supports __length_hint__ -- nosy: +pjenvey ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14126

[issue14183] Test coverage for packaging.install and packaging.pypi.wrapper

2012-03-03 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: -install.install_dists = lambda x, y=None: None +install.install_dists = lambda x, y = None: None PEP 8: Never put spaces in a function (or lambda) signature. I cannot find that exactly in pep8. From the section

[issue14184] test_recursion_limit

2012-03-03 Thread Dionysios Kalofonos
Changes by Dionysios Kalofonos peite...@gmail.com: -- nosy: dk priority: normal severity: normal status: open title: test_recursion_limit ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14184

[issue14184] test_recursion_limit

2012-03-03 Thread Dionysios Kalofonos
New submission from Dionysios Kalofonos peite...@gmail.com: python compiled with ./configure --with-pydebug CC=clang MACOSX_DEPLOYMENT_TARGET=10.7 make EXTRA_CFLAGS=-Wno-unused-value -Wno-empty-body -Qunused-arguments -- components: +Tests versions: +Python 3.3 Added file:

[issue14185] Failure to build _dbm with ndbm on Arch Linux

2012-03-03 Thread Westley Martínez
New submission from Westley Martínez aniko...@gmail.com: When building Python I get this: building dbm using ndbm *** WARNING: renaming _dbm since importing it failed: build/lib.linux-i686-3.3-pydebug/_dbm.cpython-33dm.so: undefined symbol: dbm_nextkey Failed to build these modules: _dbm

[issue14183] Test coverage for packaging.install and packaging.pypi.wrapper

2012-03-03 Thread Francisco Martín Brugué
Francisco Martín Brugué franci...@email.de added the comment: Nadeem: - Don't use spaces around the '=' sign when used to indicate a keyword argument or a default parameter value. ok, code formating is not working as expected (at least for lambdas...) Éric : If you grep packaging tests

[issue14166] private dispatch table for picklers

2012-03-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: That looks like a good idea. I don't understand the following code: +try: +self._dispatch_table = self.dispatch_table +except AttributeError: +self._dispatch_table = dispatch_table ... since

[issue13951] Seg Fault in .so called by ctypes causes the interpreter to Seg Fault

2012-03-03 Thread Westley Martínez
Westley Martínez aniko...@gmail.com added the comment: Hi I found this bug randomly and have made two small patches to change the documentation. One assumes that the faulthandler module is available for 3.3. The other patch is for earlier versions of Python. -- keywords: +patch

[issue13951] Seg Fault in .so called by ctypes causes the interpreter to Seg Fault

2012-03-03 Thread Westley Martínez
Changes by Westley Martínez aniko...@gmail.com: Added file: http://bugs.python.org/file24723/cpython-13951-pre3.3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13951 ___

[issue12328] multiprocessing's overlapped PipeConnection on Windows

2012-03-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hmm, I tried to apply the latest patch to the default branch and it failed. It also seems the patch was done against a changeset (508bc675af63) which doesn't exist in the repo... -- ___ Python tracker

[issue4773] HTTPMessage not documented and has inconsistent API across Py2/Py3

2012-03-03 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Yep, #12707. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4773 ___ ___ Python-bugs-list

[issue14186] Link to PEP 3107 in def part of Language Reference

2012-03-03 Thread Chris Rebert
New submission from Chris Rebert pyb...@rebertia.com: The part of the Language Reference concerning the `def` statement (http://docs.python.org/dev/reference/compound_stmts.htm#function-definitions ) should include a See Also link to PEP 3107 Function Annotations. -- assignee:

[issue14187] add annotation entry to Glossary

2012-03-03 Thread Chris Rebert
New submission from Chris Rebert pyb...@rebertia.com: The Glossary should include an entry for annotation and/or function annotation regarding the language feature introduced by PEP 3107. -- assignee: docs@python components: Documentation messages: 154852 nosy: cvrebert, docs@python

[issue13703] Hash collision security issue

2012-03-03 Thread Chris Rebert
Chris Rebert pyb...@rebertia.com added the comment: The Design and History FAQ (will) need a minor corresponding update: http://docs.python.org/dev/faq/design.html#how-are-dictionaries-implemented -- ___ Python tracker rep...@bugs.python.org

[issue14126] Speed up list comprehensions by preallocating the list where possible

2012-03-03 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Could you run the benchamrks at http://hg.python.org/benchmarks/ and report the results, for 3.3 (rather than 2.7), please? Adding a new bytecode because it speeds up one 4 line program does not seem such a good idea. -- nosy:

[issue13797] Allow objects implemented in pure Python to export PEP 3118 buffers

2012-03-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: FWIW, Cython lets user code implement the buffer interface for extension types using the special methods __getbuffer__() and __releasebuffer__(), so providing the same methods (although with a different signature) also for normal

[issue14135] check for locale changes in test.regrtest

2012-03-03 Thread Westley Martínez
Westley Martínez aniko...@gmail.com added the comment: Here's a test that checks for changes to the locale. -- nosy: +anikom15 Added file: http://bugs.python.org/file24724/test_14135.py ___ Python tracker rep...@bugs.python.org

[issue14135] check for locale changes in test.regrtest

2012-03-03 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Thanks for the patch, but I think Brett meant to say that this should be added to Lib/test/regrtest.py:750, among the other resources. -- ___ Python tracker rep...@bugs.python.org

[issue14171] warnings from valgrind about openssl as used by CPython

2012-03-03 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: It remembers me a funny story. http://wiki.debian.org/SSLkeys -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14171

[issue14126] Speed up list comprehensions by preallocating the list where possible

2012-03-03 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14126 ___ ___ Python-bugs-list

[issue14188] Sharing site-packages between Apply and python.org builds breaks extensions

2012-03-03 Thread Barry Alan Scott
New submission from Barry Alan Scott barry-sc...@users.sourceforge.net: I'm testing on Mac OS X 10.7.3 http://bugs.python.org/issue4865 added /Library/Python/2.7/site-packages to the path for python.org built 2.7. This will work for .py files but .so cannot be shared. pysvn will SEGV

[issue13964] os.utimensat() and os.futimes() should accept (sec, nsec), drop os.futimens()

2012-03-03 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: utime.patch: ugly draft to add support of (sec, nsec) tuple to os.*utime*() functions. -- Added file: http://bugs.python.org/file24725/utime.patch ___ Python tracker rep...@bugs.python.org

[issue14188] Sharing site-packages between Apply and python.org builds breaks extensions

2012-03-03 Thread Barry Alan Scott
Barry Alan Scott barry-sc...@users.sourceforge.net added the comment: Pysvn binary kits can be downloaded from http://pysvn.tigris.org/files/documents/1233/49180/py27_python_org_pysvn_svn1617-1.7.6-1457-intel.dmg and

[issue13964] os.utimensat() and os.futimes() should accept (sec, nsec), drop os.futimens()

2012-03-03 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: After Guido rejected 410 and said let's just do nanoseconds, take it to the bug tracker I created issue #14127. Your having changed this issue to be the same thing means that at least one of 'em is redundant. Could you engage on that

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Because the use case is to copy the access and modification time from a file to another, I would prefer to use the timespec structure: (sec: int, nsec: int). st_atime_ns and st_mtime_ns fields would be added to os.stat() structure: int

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: os.utime() would accept int, float or (sec: int, nsec: int) for atime and mtime. That's not future-proof for when we have better-than-nanosecond timestamps. See my suggestion above. -- ___ Python

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Actually, I'm hoping that by the time we get better than nanosecond resolution, we can also switch to 128-bit floats, and then the existing st_[acm]time field will become the preferred representation once more. What goes around comes

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Actually, I'm hoping that by the time we get better than nanosecond resolution, we can also switch to 128-bit floats, and then the existing st_[acm]time field will become the preferred representation once more. What if your hope isn't

[issue14085] PyUnicode_WRITE: comparison is always true warnings

2012-03-03 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset ba0bd949ddf5 by Victor Stinner in branch 'default': Close #14085: remove assertions from PyUnicode_WRITE macro http://hg.python.org/cpython/rev/ba0bd949ddf5 -- nosy: +python-dev resolution: - fixed stage:

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Well, Guido has already nixed future-proof formats, see his comments above: I take full responsibility for fixing the precision at ns. So hope is all I have left. -- ___ Python tracker

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, Guido has already nixed future-proof formats, see his comments above: I don't think Guido is *against* future-proof formats per se, he's against them when they have a cost compared to non future-proof ones. The proposal I made (a

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: I grant you that (int, float) is probably, theoretically better than (int, int). But it's academic as Guido has ruled against anything but a straight int representing nanoseconds, and I doubt he's gonna change his mind. --

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: Any solution involving tuple is too ugly. Please stick with the plan. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127 ___

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I grant you that (int, float) is probably, theoretically better than (int, int). But it's academic as Guido has ruled against anything but a straight int representing nanoseconds, and I doubt he's gonna change his mind. Why not let Guido

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: The following solution might be compatible with Guido's suggestion: os.stat(path).st_atime_ns - nanoseconds_since_epoch_as_int os.stat(path).st_ctime_ns - nanoseconds_since_epoch_as_int os.stat(path).st_mtime_ns -

[issue14127] os.stat and os.utime: allow preserving exact metadata

2012-03-03 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: I don't see how that's better than os.utime(path, ns=(atime, mtime)) If you think that in the future you could add resolution=fs, well, you could just as easily add fs=(atime, mtime). -- ___

[issue14188] Sharing site-packages between Apply and python.org builds breaks extensions

2012-03-03 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Sorry, I can't reproduce the problem. By default and by design, Library/Python/2.7/site-packages comes last in sys.path for the python.org installed Pythons. Are you sure you aren't overriding sys.path with a PYTHONPATH environment variable or some

[issue14188] Sharing site-packages between Apply and python.org builds breaks extensions

2012-03-03 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14188 ___ ___ Python-bugs-list mailing

[issue14184] test_recursion_limit fails on OS X when compiled with clang

2012-03-03 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- assignee: - ned.deily nosy: +ned.deily stage: - needs patch title: test_recursion_limit - test_recursion_limit fails on OS X when compiled with clang ___ Python tracker rep...@bugs.python.org

[issue14128] _elementtree should expose types and factory functions consistently with ElementTree

2012-03-03 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: I'll go on and commit this. The test suite of ET is not bad and all tests keep passing. Stylistic issues and best practices can be fixed later. I want to have other work done on _elementtree, and having several patches to the same source file

[issue14189] Documentation for some C APIs is missing clear specification of the type of reference they return

2012-03-03 Thread Baruch Sterin
New submission from Baruch Sterin pyt...@bsterin.com: In addition to the description text, most C API functions have a one-line, emphasized specification whether they return a new or a borrowed reference. (e.g. 'Return value: New reference.'). The following API functions are missing that.

[issue14128] _elementtree should expose types and factory functions consistently with ElementTree

2012-03-03 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset ce1c26cbe5fb by Eli Bendersky in branch 'default': Issue #14128: Exposing Element as an actual type from _elementtree, rather than a factory function. http://hg.python.org/cpython/rev/ce1c26cbe5fb -- nosy:

[issue14190] Minor C API documentation bugs

2012-03-03 Thread Baruch Sterin
New submission from Baruch Sterin pyt...@bsterin.com: The following functions are documented, but do not exist in the code: * PyCodec_KnownEncoding * PyRun_SimpleFileFlags The following function is documented and exists in the code, but is not exposed through any of the header files:

[issue11477] Bug in code dispatching based on internal slots

2012-03-03 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11477 ___ ___ Python-bugs-list

[issue14191] argparse: nargs='*' doesn't parse all positional parameters

2012-03-03 Thread Glenn Linderman
New submission from Glenn Linderman v+pyt...@g.nevcal.com: To me, all positional parameters mean whether they are in the front, back or middle, as long as they are not diriectly preceded by an option that can accept an unlimited number of parameters. from argparse import ArgumentParser,