[issue4171] SSL handshake fails after TCP connection in getpeername()

2010-05-07 Thread Dmitry Dvoinikov
Dmitry Dvoinikov added the comment: Checked out and built revision 80956 of py3k against OpenSSL 0.9.8n. Here is the banner: Python 3.2a0 (py3k:80956, May 8 2010, 11:31:45) [MSC v.1500 32 bit (Intel)] on win32 Now, the breaking script appears not to be breaking any more, even though I trie

[issue8659] ABS(x) == 0 can be simplified to x == 0

2010-05-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- keywords: +needs review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue8659] ABS(x) == 0 can be simplified to x == 0

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : I noticed that in longobject.c, there are a few spots that take the absolute value of an int before comparing the int to 0. There's no -0 for C integers, so the absolute value isn't necessary. I traced back through the commit history, and it looks like t

[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-05-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: +.. function:: fsencode(value) + + Encode *value* to bytes for use in the file system, environment variables or + the command line. Use :func:`sys.getfilesystemencoding` and + ``'surrogateescape'`` error handler for str, and keep bytes unchanged. I'd w

[issue8656] urllib2 mangles file://-scheme URLs

2010-05-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed the change which resulted in Buildbots failure. Those should turn green now. -- ___ Python tracker ___ __

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think your partA patch makes sense. It would benefit from fsencode/fsdecode functions rather than manually doing the 'surrogateescape' thing everywhere. Also, could you add a unittest for os._execvpe to test its behavior? --

[issue8638] Remove suggestion for name mangling from the tutorial

2010-05-07 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: On Fri, May 7, 2010 at 6:35 PM, Terry J. Reedy wrote: > This is such an advanced and rarely used feature that it hardly seems > appropriate for the tutorial. The problem with just leaving it out is that learners stumbling over them in existing code (likel

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Zooko O'Whielacronx
Zooko O'Whielacronx added the comment: > Option 1: Make Unicode-agnosticism the default and force anyone who cares > about the Unicode setting to include a separate header. If they don't > include that header, they can only call safe functions and can't poke at > PyUnicodeObject's internals.

[issue8656] urllib2 mangles file://-scheme URLs

2010-05-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Sat, May 8, 2010 at 10:04 AM, Jean-Paul Calderone wrote: > TypeError: cannot concatenate 'str' and 'NoneType' objects Okay, I see where the problem is. I shall quickly fix it. -- ___ Python tracker

[issue8656] urllib2 mangles file://-scheme URLs

2010-05-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Major buildbot failures caused by this change, eg: ERROR: test_file (test.test_urllib2net.OtherNetworkTests) -- Traceback (most recent call last): File "/home/buildbot/slave/py-build/2.

[issue8658] urlparse.urlunsplit should be smarter about + and file urls

2010-05-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: Duplicate of Issue8657 -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue8657] urlparse.urlunsplit should be smarter about +

2010-05-07 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil keywords: +patch nosy: +orsenthil resolution: -> accepted stage: -> patch review type: -> behavior Added file: http://bugs.python.org/file17258/urlparse_giturl.patch ___ Python tracker

[issue8658] urlparse.urlunsplit should be smarter about + and file urls

2010-05-07 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- nosy: +dabrahams ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue8658] urlparse.urlunsplit should be smarter about + and file urls

2010-05-07 Thread Senthil Kumaran
New submission from Senthil Kumaran : >>> from urlparse import * >>> urlsplit('git+file:///foo/bar/baz') SplitResult(scheme='git+file', netloc='', path='/foo/bar/baz', query='', fragment='') >>> urlunsplit(urlsplit('git+file:///foo/bar/baz')) 'git+file:/foo/bar/baz' >>> -- assignee: ors

[issue8656] urllib2 mangles file://-scheme URLs

2010-05-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed in r80953, r80954 , r80955 and r80956. -- assignee: -> orsenthil nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker

[issue8641] IDLE 3 doesn't highlights b"", but u""

2010-05-07 Thread Puzzlet Chung
Puzzlet Chung added the comment: > In any case, with IDLE on my WinXP 3.1.2 system, all string literals are > green, with or without a leading b. The letter b should also be green, while it shows the letter u from u'string' in green, which it shouldn't as it's not valid anymore. Tested in ID

[issue8657] urlparse.urlunsplit should be smarter about +

2010-05-07 Thread Dave Abrahams
New submission from Dave Abrahams : from urlparse import * urlunsplit(urlsplit('git+file:///foo/bar/baz')) => git+file:/foo/bar/baz -- messages: 105253 nosy: dabrahams priority: normal severity: normal status: open title: urlparse.urlunsplit should be smarter about + versions: Python 2.6

[issue8642] json.loads description

2010-05-07 Thread MATSUI Tetsushi
MATSUI Tetsushi added the comment: OK, here you are. -- keywords: +patch Added file: http://bugs.python.org/file17256/json.diff ___ Python tracker ___ ___

[issue8644] timedelta.total_seconds needlessly inaccurate, especially for negative timedeltas

2010-05-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17254/issue8644-py3k.diff ___ Python tracker ___ ___ Python-bugs-lis

[issue8644] timedelta.total_seconds needlessly inaccurate, especially for negative timedeltas

2010-05-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17255/issue8644-py3k.diff ___ Python tracker ___ ___ Python-bugs-list

[issue8644] timedelta.total_seconds needlessly inaccurate, especially for negative timedeltas

2010-05-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17246/issue8644-py3k.diff ___ Python tracker ___ ___ Python-bugs-lis

[issue8644] timedelta.total_seconds needlessly inaccurate, especially for negative timedeltas

2010-05-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > (1) there should be a Py_DECREF(total_microseconds) ... Yes, regrtest -R is not a substitute for thinking. > (2) in the docstring, replace 'loose' by 'lose' > Neither is spellcheck. :-) > (3) also in the docstring, I suggest replacing "280 years" by

[issue8656] urllib2 mangles file://-scheme URLs

2010-05-07 Thread Dave Abrahams
New submission from Dave Abrahams : $ touch /tmp/x.html $ python -c 'import urllib2;resp=urllib2.urlopen("file:///tmp/x.html");print resp.geturl()' file:/tmp/x.html note the missing // after the colon -- messages: 105250 nosy: dabrahams priority: normal severity: normal status: open ti

[issue8653] urlparse.urlparse/urlsplit doc missing

2010-05-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: I don't see anything that is missing. Its here in the docs http://docs.python.org/library/urlparse.html#urlparse-result-object And also docstrings has the information too. Could you explain a bit more as what you were expecting and found missing? --

[issue8602] documentation of bz2 module mildly erroneous

2010-05-07 Thread Matt Wartell
Matt Wartell added the comment: Per request, I have attached a context diff for both bz2.txt and 3.0.txt suitable for http://docs.python.org/library/bz2.html and http://docs.python.org/release/3.0.1/whatsnew/3.0.html respectively. The modification in bz2.txt may border on redundant and overl

[issue8653] urlparse.urlparse/urlsplit doc missing

2010-05-07 Thread Dan Buch
Changes by Dan Buch : -- nosy: +meatballhat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-07 Thread STINNER Victor
STINNER Victor added the comment: I realized that fallback to ASCII instead of UTF-8 is not possible yet because of #8611: if it fallbacks to ASCII, it's not more possible to run Python in a non-ASCII directory. I have a patch set fixing #8611 but it's huge and complex. I will not be fixed qu

[issue8547] unittest test discovery can fail when package under test is also installed globally

2010-05-07 Thread Michael Foord
Michael Foord added the comment: Committed again revision 80946 after getting the tests to pass on Windows. -- ___ Python tracker ___

[issue8642] json.loads description

2010-05-07 Thread Éric Araujo
Éric Araujo added the comment: Is it possible for you to propose a patch, as described in http://www.python.org/dev/patches/ ? -- nosy: +merwok ___ Python tracker ___ __

[issue8641] IDLE 3 doesn't highlights b"", but u""

2010-05-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: u'whatever' is not valid syntax for 3.x. In any case, with IDLE on my WinXP 3.1.2 system, all string literals are green, with or without a leading b. If you want this to stay open, cut and paste the opening header like Python 3.1.2 (r312:79149, Mar 21 2010, 00

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8638] Remove suggestion for name mangling from the tutorial

2010-05-07 Thread Clovis Fabricio
Clovis Fabricio added the comment: I help in #python and always suggest people to not use double-underscore name mangling when they mean private. I agree that name mangling shouldn't be on the tutorial at all. It misleads everybody coming from other languages into thinking that it means "priv

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread R. David Murray
R. David Murray added the comment: Adding MvL because he wrote the ABI PEP, and MAL because he cares about the Unicode interface. -- nosy: +lemburg, loewis, r.david.murray ___ Python tracker __

[issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)

2010-05-07 Thread STINNER Victor
STINNER Victor added the comment: Let's try with something: pyunicode_asencodefsdefault.patch adds PyUnicode_EncodeFSDefault() function to uniformize how a unicode is converted to bytes. Fallback to UTF-8 if Py_FileSystemEncoding is not set (I should be ASCII, not UTF-8) and use surrogateesca

[issue8638] Remove suggestion for name mangling from the tutorial

2010-05-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Double underscore name mangling is for avoiding name clashes with base classes, not for 'private attributes'. This is such an advanced and rarely used feature that it hardly seems appropriate for the tutorial. -- nosy: +tjreedy __

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I've been thinking about this a bit more. There are three types of symbols in unicodeobject.h: 1. Functions that are always safe to use 2. Functions that are only safe if the module is compiled with the same Unicode settings as Python 3. Structures and mac

[issue1054967] bdist_deb - Debian packager

2010-05-07 Thread Tarek Ziadé
Tarek Ziadé added the comment: Please don't. I've closed this bug because the bdist_deb command is currently managed by the stdeb project and it's fine like htis. Distutils2 will not have specialized linux bdist_* command like this one, because it is best to keep it in a separate project that

[issue8602] documentation of bz2 module mildly erroneous

2010-05-07 Thread Éric Araujo
Éric Araujo added the comment: Now that #8601 is closed, would you mind providing a doc patch explaining the lack of context manager protocol support and its reason? -- nosy: +merwok ___ Python tracker ___

[issue8604] Adding an atomic FS write API

2010-05-07 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue8655] Problem with getpeercert in the ssl module when retrieving client side certs

2010-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > When I use the argument to make certs optional, it gave me an error > saying it need the ca certs, so I downloaded them and specified to use > them, and now I am getting errors from ssl.c You have to specify the CA cert corresponding to the Certificate Author

[issue8620] wrong truncation of last line in cmd.Cmd

2010-05-07 Thread Éric Araujo
Éric Araujo added the comment: Setting version to 3.2, since this change would not be backward compatible and 2.7 is already in beta. -- components: +Library (Lib) -None nosy: +merwok title: wrong truncation of line in Cmd.cmd -> wrong truncation of last line in cmd.Cmd versions: +Pyt

[issue1054967] bdist_deb - Debian packager

2010-05-07 Thread Éric Araujo
Éric Araujo added the comment: We forgot to reopen the bug. -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list m

[issue8644] timedelta.total_seconds needlessly inaccurate, especially for negative timedeltas

2010-05-07 Thread Mark Dickinson
Mark Dickinson added the comment: Grr. s/docstring/docs/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue8644] timedelta.total_seconds needlessly inaccurate, especially for negative timedeltas

2010-05-07 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patch! Comments, in increasing order of fussiness: (1) there should be a Py_DECREF(total_microseconds) in the case that the "PyLong_FromLong(100L)" call fails (2) in the docstring, replace 'loose' by 'lose' (3) also in the docstring, I su

[issue4171] SSL handshake fails after TCP connection in getpeername()

2010-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Are you able to compile a fresh checkout of either the py3k or release3.1-maint branch? A bunch of fixes have been committed recently, some of which may (or even should) address your issue. -- ___ Python tracker <

[issue8655] Problem with getpeercert in the ssl module when retrieving client side certs

2010-05-07 Thread Westly Ward
Westly Ward added the comment: When I use the argument to make certs optional, it gave me an error saying it need the ca certs, so I downloaded them and specified to use them, and now I am getting errors from ssl.c Here's the error on the server side: wes...@westly-desktop ~/Desktop/ssltest

[issue8655] Problem with getpeercert in the ssl module when retrieving client side certs

2010-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: You must use either ssl.CERT_OPTIONAL or ssl.CERT_REQUIRED if you want to retrieve the client certificate. I admit this makes the getpeercert() API a bit strange, and I'm not sure why the original decision was made. Can you confirm this fixes your issue? ---

[issue4171] SSL handshake fails after TCP connection in getpeername()

2010-05-07 Thread Dmitry Dvoinikov
Dmitry Dvoinikov added the comment: Well, I'm sorry to bring this up again, but the problem persists with Python 3.1.2 (x86, Windows XP). The difference with the test script behaviour is that now it doesn't break every time. Perhaps this is the reason I said the problem was gone. In fact, now th

[issue8655] Problem with getpeercert in the ssl module when retrieving client side certs

2010-05-07 Thread Westly Ward
New submission from Westly Ward : I originally had this problem when writing my IRCd, but then tested it in a basic script. The problem is that getpeercert() is always returning None when executed on the server side, even when the client is using an ssl cert. I have included an example in th

[issue8547] unittest test discovery can fail when package under test is also installed globally

2010-05-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Reverted this in r80939. See http://python.org/dev/buildbot/stable/builders/x86%20XP-4%20trunk/builds/3553/steps/test/logs/stdio -- nosy: +benjamin.peterson ___ Python tracker

[issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6

2010-05-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6

2010-05-07 Thread Ralf Schmitt
Changes by Ralf Schmitt : -- nosy: +schmir ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Adding people to the Nosy List who participated in the original thread on python-ideas, several months ago. Hope you don't mind. :-) -- nosy: +gvanrossum, scoder, zooko ___ Python tracker

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Forcing the compile-time and link-time encodings to match is tricky. The goal is: - Allow Unicode-agnostic modules to link, regardless of unicode settings - Cause a link failure if the unicode settings are mismatched for a module that pokes into PyUnicodeO

[issue1759169] clean up Solaris port and allow C99 extension modules

2010-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: A question about the patch: in configure.in, after "if test $define_xopen_source = yes" (lines 395 and following), there's a bunch of Solaris-specific stuff. Shouldn't it be removed, given that _XOPEN_SOURCE isn't defined anymore under Solaris? -- st

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- keywords: +patch Added file: http://bugs.python.org/file17248/unicode.patch ___ Python tracker ___ ___

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Currently, Python can be built with an internal Unicode representation of UCS2 or UCS4. To prevent extension modules compiled with the wrong Unicode representation from linking, unicodeobject.h #defines many of the Unicode functions. For example, PyUnic

[issue8653] urlparse.urlparse/urlsplit doc missing

2010-05-07 Thread Dave Abrahams
New submission from Dave Abrahams : The docstrings for these functions don't explain the 'scheme' parameter. Even renaming it to default_scheme would help. -- assignee: d...@python components: Documentation messages: 105221 nosy: dabrahams, d...@python priority: normal severity: normal

[issue8547] unittest test discovery can fail when package under test is also installed globally

2010-05-07 Thread Michael Foord
Michael Foord added the comment: Committed revision 80932. Still needs documenting, so leaving open for the moment. -- ___ Python tracker ___ ___

[issue8084] pep-0370 on osx duplicates existing functionality

2010-05-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Christian hasn't been around for a while, and I'd like to release the next beta on time. Thus, I think Tarek's or my review will be sufficent. The idea seems fine to me. -- nosy: +benjamin.peterson ___ Python tr

[issue8652] Minor improvements to the "Handling Exceptions" part of the tutorial

2010-05-07 Thread Marien Zwart
New submission from Marien Zwart : Based on questions asked on freenode's #python by people reading the tutorial I would like to suggest two improvements to http://docs.python.org/tutorial/errors.html#handling-exceptions : - Mention the older "except SomeException, e:" syntax too, not just "ex

[issue8651] "s#" and friends can silently truncate buffer length

2010-05-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : When PY_SSIZE_T isn't defined and a format such as "s#" receives an object whose length fits in a Py_ssize_t but not in an int, the buffer length is silently truncated: >>> s = 'x' * (4 * 1024**3 + 100) >>> t = zlib.compress(s, 1) >>> len(t) 12 >>> len(zlib

[issue8650] zlibmodule.c isn't 64-bit clean

2010-05-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8650] zlibmodule.c isn't 64-bit clean

2010-05-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : zlibmodule.c doesn't define PY_SSIZE_T_CLEAN, and uses lots of "int" variables for length values internally. Besides, the zlib itself uses "uInt" and "uLong" variables in its z_stream structure (rather than something guaranteed to be at least the width of a

[issue8571] zlib causes a SystemError when decompressing a chunk >1GB

2010-05-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue8571] zlib causes a SystemError when decompressing a chunk >1GB

2010-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed in r80926 (trunk), r80927 (2.6), r80928 (py3k) and r80929 (3.1). Thank you! -- ___ Python tracker ___ _

[issue7900] posix.getgroups() failure on Mac OS X

2010-05-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: unit test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue8649] Py_UNICODE_* functions are undocumented

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Python provides several functions for manipulating raw Py_UNICODE strings, but they aren't documented. Below are their signatures. PyAPI_FUNC(size_t) Py_UNICODE_strlen(const Py_UNICODE *u); PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strcpy( Py_UNICODE *s1, c

[issue8571] zlib causes a SystemError when decompressing a chunk >1GB

2010-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Is there a reason to keep inplen and max_length ints instead of making > them Py_ssize_t too? zlibmodule.c isn't 64-bit clean internally. Actually, the zlib itself uses uInt in its z_stream structure. This should be the target of a separate issue, and seems i

[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-07 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file17244/initfsencoding-3.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-07 Thread STINNER Victor
STINNER Victor added the comment: Version 4: I forgot #include in bltinmodule.c. -- Added file: http://bugs.python.org/file17247/initfsencoding-4.patch ___ Python tracker ___ __

[issue8571] zlib causes a SystemError when decompressing a chunk >1GB

2010-05-07 Thread Denis Dmitriev
Denis Dmitriev added the comment: Is there a reason to keep inplen and max_length ints instead of making them Py_ssize_t too? I'm a little worried that keeping them ints will cause a similar problem further down the line. -- ___ Python tracker

[issue8571] zlib causes a SystemError when decompressing a chunk >1GB

2010-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > in the unittests there is some use of 'compress' and 'decompress' > mixed with 'zlib.decompress'. which one is right When testing the decompressor, data needs to be prepared first (compressed). I didn't bother creating a compressor object in this case.

[issue8644] timedelta.total_seconds needlessly inaccurate, especially for negative timedeltas

2010-05-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a patch for py3k branch. I am +1 for backporting to 2.7 and I avoided relying on py3k timedelta/timedelta in the patch. The tests and docs will need to be modified for the backport. Technically speaking, this is a change in documented

[issue8571] zlib causes a SystemError when decompressing a chunk >1GB

2010-05-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: in the unittests there is some use of 'compress' and 'decompress' mixed with 'zlib.decompress'. which one is right (i'm only looking at the diff so i can't see if they were imported from zlib or if the zlib. is required at the moment). otherwise, provided th

[issue8648] The UTF-7 codec functions are undocumented

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The UTF-7 codec functions are undocumented: PyUnicode_DecodeUTF7Stateful PyUnicode_DecodeUTF7 PyUnicode_EncodeUTF7 -- assignee: d...@python components: Documentation messages: 105207 nosy: d...@python, stutzbach priority: normal severity: normal st

[issue8647] PyUnicode_GetMax is undocumented

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : Here's the relevant signature: /* Get the maximum ordinal for a Unicode character. */ PyAPI_FUNC(Py_UNICODE) PyUnicode_GetMax(void); -- assignee: d...@python components: Documentation messages: 105206 nosy: d...@python, stutzbach priority: normal s

[issue8646] PyUnicode_EncodeDecimal is undocumented

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : PyUnicode_EncodeDecimal is undocumented (although it's referenced in passing in the documentation for PyLong_FromUnicode). There's a lengthy comment in unicodeobject.h describing PyUnicode_EncodeDecimal, which could be converted more or less directly int

[issue8571] zlib causes a SystemError when decompressing a chunk >1GB

2010-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch fixing the issue, and a similar one in compressobj.compress(). It also adds tests which are only enabled with the bigmem option. -- Added file: http://bugs.python.org/file17245/zlibbigbuf.patch ___ P

[issue8645] PyUnicode_AsEncodedObject is undocumented

2010-05-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : PyUnicode_AsEncodedObject is undocumented. It has the same signature as PyUnicode_AsEncodedString, although they do slightly different things based on a brief source code inspection (I'm not clear on what that difference is though). -- assignee:

[issue8388] None shouldn't be passed to traceback.format_exception

2010-05-07 Thread Michael Foord
Michael Foord added the comment: Revision 80708 and revision 80709. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue8571] zlib causes a SystemError when decompressing a chunk >1GB

2010-05-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue8454] unittest Module Problem with different Kinds of Invocation

2010-05-07 Thread Michael Foord
Changes by Michael Foord : -- resolution: -> wont fix stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue8388] None shouldn't be passed to traceback.format_exception

2010-05-07 Thread Michael Foord
Michael Foord added the comment: Now fixed. -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue1533] Bug in range() function for large values

2010-05-07 Thread Mark Dickinson
Mark Dickinson added the comment: The backport looks fine. Applied in r80917. Thanks, Alexander. -- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue1533] Bug in range() function for large values

2010-05-07 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, okay---that makes some sense; I'm happy to leave floats as they are (i.e., DeprecationWarning for small floats; TypeError for larger floats) and just fix use of __int__ for non-floats. I'll look at the patch. -- assignee: belopolsky -> mark.dic

[issue8644] timedelta.total_seconds needlessly inaccurate, especially for negative timedeltas

2010-05-07 Thread Mark Dickinson
Mark Dickinson added the comment: P.S. This change would also make total_seconds() consistent with division by timedelta(seconds=1): >>> td / timedelta(seconds=1) -0.000123 In fact, this might even be a good way to re-implement total_seconds internally. -- _

[issue8644] timedelta.total_seconds needlessly inaccurate, especially for negative timedeltas

2010-05-07 Thread Mark Dickinson
New submission from Mark Dickinson : I just noticed (while responding to issue 8643) that timedelta.total_seconds() has some accuracy problems, especially for negative timedeltas: Python 3.2a0 (py3k:80840:80842, May 7 2010, 12:29:35) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help",

[issue8643] incorrect timedelta yielded by two on-the-fly nows subtraction

2010-05-07 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. My example did make me realize that the total_seconds() method isn't as accurate as it could be. I'll open another issue for this. -- ___ Python tracker ___

[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > >> +codec = _PyCodec_Lookup(Py_FileSystemDefaultEncoding); >> +if (!codec) { >> +Py_FatalError( >> +"Py_Initialize: unable to load the file system codec"); >> >> It's better to use the same approac

[issue8643] incorrect timedelta yielded by two on-the-fly nows subtraction

2010-05-07 Thread Michal Božoň
Michal Božoň added the comment: ok, my fault, i should have tried >>> (abs(datetime.datetime.now() - datetime.datetime.now())).seconds 0 sorry :) -- ___ Python tracker ___

[issue8571] zlib causes a SystemError when decompressing a chunk >1GB

2010-05-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue8571] zlib causes a SystemError when decompressing a chunk >1GB

2010-05-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Confirmed. It even segfaults under 3.x. -- nosy: +pitrou priority: normal -> high stage: -> patch review versions: +Python 2.7, Python 3.1 ___ Python tracker _

[issue8643] incorrect timedelta yielded by two on-the-fly nows subtraction

2010-05-07 Thread Mark Dickinson
Mark Dickinson added the comment: This is correct behaviour. Note that .seconds is only one of the three attributes that contribute to the value of a timedelta: the others are .microseconds and .days. A timedelta is normalised in such a way that td.seconds and td.microseconds are always no

[issue8643] incorrect timedelta yielded by two on-the-fly nows subtraction

2010-05-07 Thread Michal Božoň
Changes by Michal Božoň : -- title: incorrect timedelta yielded by two on-the-fly nows -> incorrect timedelta yielded by two on-the-fly nows subtraction ___ Python tracker ___ __

[issue8638] Remove suggestion for name mangling from the tutorial

2010-05-07 Thread Skip Montanaro
Skip Montanaro added the comment: Maybe the wording should be changed, but name mangling serves a useful purpose. There are two definitions of "private" which seem to be a bit conflated in this section: * "private" as in, "this name is not part of the public API - use it at your own risk".

[issue8643] incorrect timedelta yielded by two on-the-fly nows

2010-05-07 Thread Michal Božoň
New submission from Michal Božoň : now() - now() from datetime.datetime produces not-nearly-zero timedelta: >>> import datetime >>> (datetime.datetime.now() - datetime.datetime.now()).seconds 86399 (i can't in the moment figure out why this is happening, sice the datetime library is written in

[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-07 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file17242/initfsencoding-2.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-07 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file17244/initfsencoding-3.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue8610] Python3/POSIX: errors if file system encoding is None

2010-05-07 Thread STINNER Victor
STINNER Victor added the comment: Le vendredi 07 mai 2010 11:19:52, vous avez écrit : > > Ok, you conviced me with your PYTHONFSENCODING suggestion (#8622). Can > > you review my last patch please? > > I don't think we can change the fallback encoding in 3.2. But you > can start a discussion on

  1   2   >