[issue7475] No hint about codecs removed : base64 bz2 hex zlib ...

2009-12-11 Thread flox
flox la...@yahoo.fr added the comment: «Everything you thought you knew about binary data and Unicode has changed.» Reopening for the documentation part. This mistake deserves some words in the documentation: docs.python.org/dev/py3k/whatsnew/3.0.html

[issue7475] No hint about codecs removed : base64 bz2 hex zlib ...

2009-12-11 Thread flox
flox la...@yahoo.fr added the comment: Is it possible to add DeprecationWarning for these codecs when using python -3 ? {}.has_key('a') __main__:1: DeprecationWarning: dict.has_key() not supported in 3.x; use the in operator False print `123` stdin:1: SyntaxWarning: backquote not

[issue7475] No hint about codecs removed: base64 bz2 hex zlib ...

2009-12-11 Thread flox
Changes by flox la...@yahoo.fr: -- title: No hint about codecs removed : base64 bz2 hex zlib ... - No hint about codecs removed: base64 bz2 hex zlib ... ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7475

[issue7470] logger.StreamHandler emit encoding fallback is wrong

2009-12-11 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Never mind my earlier comment, I looked at the change more carefully after a cup of coffee, and it now makes sense to me ;-) Fixed checked into trunk (r76754), thanks. -- resolution: - fixed status: open - closed

[issue7475] No hint about codecs removed: base64 bz2 hex zlib ...

2009-12-11 Thread flox
Changes by flox la...@yahoo.fr: -- keywords: +patch Added file: http://bugs.python.org/file15523/issue7475_warning.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7475 ___

[issue7464] circular reference in HTTPResponse by urllib2

2009-12-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: cool. The mindtrove one in particular seems nice. I didn't realize that one could build boundobjects oneself. Is there any chance of getting a weakmethod class into the weakref module? --

[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Martin v. Löwis wrote: Martin v. Löwis mar...@v.loewis.de added the comment: It's not possible to add these codecs back. Bytes objects (correctly) don't have an encode method, and string objects (correctly) don't have a decode method.

[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-11 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg m...@egenix.com: -- resolution: invalid - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7475 ___ ___

[issue7464] circular reference in HTTPResponse by urllib2

2009-12-11 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: On Fri, Dec 11, 2009 at 09:40:40AM +, Kristján Valur Jónsson wrote: Is there any chance of getting a weakmethod class into the weakref module? This is a separate feature request on weakref module. It may opened and discussion carried

[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Benjamin Peterson wrote: Benjamin Peterson benja...@python.org added the comment: I agree with Martin. gzip and bz2 convert bytes to bytes. Encodings deal strictly with unicode - bytes. Sorry, Bejamin, but that's simply not true.

[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-11 Thread flox
flox la...@yahoo.fr added the comment: Thinking about it, I am +1 to reimplement the codecs. We could implement new methods to replace the old one. (similar to base64.encodebytes and base64.decodebytes) b'abc'.encodebytes('base64') b'YWJj\n' b'abc'.encodebytes('zlib').encodebytes('base64')

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Yes, this can be closed as far as I'm concerned. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7452 ___

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file15487/cpickle_load_pop.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7455 ___

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file15494/cpickle_load_pop-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7455 ___

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oops, cpickle_load_pop-2.patch contains an useless variable (picklingError = pickle.UnpicklingError). Here is the version 3 of my patch. -- Added file: http://bugs.python.org/file15524/cpickle_load_pop-3.patch

[issue4853] I/O operation on closed socket: improve the error message

2009-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Well, this issue is not really important. The current behaviour is already correct (raising an error if the file is closed). -- resolution: - wont fix status: open - closed ___ Python

[issue7477] kqueue timers don't work properly

2009-12-11 Thread Hasan
New submission from Hasan hala...@gmail.com: kqueue timers are not working at all on Mac OSX 10.6.1 (probably not working on other BSDs as well but haven't tested it). Here's a simply repro: from select import * kq = kqueue() e = kevent(1, flags=KQ_EV_ENABLE|KQ_EV_ONESHOT,

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2009-12-11 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: Methods create_function, create_aggregate, set_authorizer, set_progress_handler, create_collation of the _sqlite3.Connection class doesn't catch PyDict_SetItem/PyDict_DelItem errors. The error will be catched by next

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2009-12-11 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- keywords: +patch Added file: http://bugs.python.org/file15525/_sqlite3_setdict.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7478

[issue7479] os.lchmod is not present

2009-12-11 Thread steve
New submission from steve eyeboot...@gmail.com: Reason for opening this bug: I am opening a bug because the documentation here: http://docs.python.org/library/os.html#os.lchmod Says that in python 2.6 there is a method os.lchmod() for changing the permissions of

[issue7477] kqueue timers don't work properly

2009-12-11 Thread Hasan
Hasan hala...@gmail.com added the comment: Typo in the repro. The statement: new_e = f.control should be: new_e = kq.control -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7477 ___

[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-11 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2009/12/11 Marc-Andre Lemburg rep...@bugs.python.org: codecs.encode()/.decode() provide access to all codecs, regardless of their supported type combinations and of course, you can use them directly via the codec registry, subclass from

[issue7479] os.lchmod is not present

2009-12-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: lchmod seems to be a BSD-specific function. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7479 ___

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2009-12-11 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +ghaering priority: - normal stage: - patch review type: - crash versions: +Python 2.6, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7478

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +alexandre.vassalotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7455 ___ ___

[issue7394] sqlite3: some OperationalError exceptions should be ProgrammingError (PEP 249)

2009-12-11 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7394 ___ ___ Python-bugs-list mailing

[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Benjamin Peterson wrote: Benjamin Peterson benja...@python.org added the comment: 2009/12/11 Marc-Andre Lemburg rep...@bugs.python.org: codecs.encode()/.decode() provide access to all codecs, regardless of their supported type

[issue1398] Can't pickle partial functions

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Indeed. Jack Diederich added support for pickling partial functions in r70931. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Mark Dickinson wrote: Is there still a need for a separate C function for creating a zero- initialized bytes object from a Py_ssize_t or a Python integer? What C function are you referring to? And this check doesn't cover other,

[issue2335] Backport set literals

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: If there are no objections, I will commit this patch later this week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2335 ___

[issue2333] Backport set and dict comprehensions

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: If there are no objections, I will commit this patch later this week after issue #2335. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2333

[issue1967] Backport dictviews to 2.7

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: Can someone review the patches? I would like to commit this later this week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1967

[issue7473] x84_64 arch Missing from 2.6.4 Mac universal binaries - Cripples building embedded 64-bit

2009-12-11 Thread Paul Nelson
Paul Nelson paul.nel...@jmp.com added the comment: Once the binary (ppc, i386) binary is installed it becomes impossible to rebuild python from source as 3-way binary on the system, without first removing the 2.6.4 dual architecture /Library/Frameworks/Python.framework. It causes compile

[issue7473] x84_64 arch Missing from 2.6.4 Mac universal binaries - Cripples building embedded 64-bit

2009-12-11 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I don't agree that the current binaries are only useful for Tiger and earlier, the binaries work just fine on Leopard and Snow Leopard as well. FWIW. I'm planning to provide a 3-way universal binary, or even just intel (i386, x86_64)

[issue7473] Compile error when building a 3-way universal framework when a 2-way universal framework is present

2009-12-11 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- resolution: - accepted stage: - needs patch title: x84_64 arch Missing from 2.6.4 Mac universal binaries - Cripples building embedded 64-bit - Compile error when building a 3-way universal framework when a 2-way universal

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-11 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7452 ___ ___

[issue7473] Compile error when building a 3-way universal framework when a 2-way universal framework is present

2009-12-11 Thread Paul Nelson
Paul Nelson paul.nel...@jmp.com added the comment: I would humbly suggest that it be 3-way, until it is 10.6 (Snow Leopard) and above. In our case as long as we support Leopard, we will be supporting all 3 architectures for our software. It would be appreciated if the web page indicated

[issue7466] Segmentation fault after about 20 seconds on lenovo T500

2009-12-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: IMO it would be better to call _PyObject_GC_IS_TRACKED() explicitly rather than rely on a subtle difference between the two APIs as in the current patch. -- ___ Python tracker rep...@bugs.python.org

[issue7466] Segmentation fault after about 20 seconds on lenovo T500

2009-12-11 Thread flox
flox la...@yahoo.fr added the comment: Ok. It is here: http://bugs.python.org/file15520/issue7466.diff -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7466 ___

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: What C function are you referring to? A currently non-existent one! I was wondering whether the current bytes- from-integer functionality that PyBytes_FromObject supplies is important enough to preserve somehow. I'd guess not. --

[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-11 Thread flox
flox la...@yahoo.fr added the comment: I've ported the codecs from Py2: base64, bytes_escape, bz2, hex, quopri, rot13, uu and zlib It's not a big deal. Basically: - StringIO.StringIO -- io.BytesIO - 'string_escape' -- 'bytes_escape' Will add documentation if we agree on the feature.

[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2009-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: nirinA: thanks for prodding this issue. Yes, it is still alive (just). :) About adding the Euler constant: I agree this should be added. Do you have time to expand your patch to include docs and a test or two? For expm1, I was planning

[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2009-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: expm1(x) = sinh(x/2)*exp(x/2) Should be 2*sinh(x/2)*exp(x/2). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3366 ___

[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2009-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: lgamma patch committed to trunk (with looser tests) in r76755. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3366 ___

[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes

2009-12-11 Thread flox
Changes by flox la...@yahoo.fr: -- versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7380 ___ ___ Python-bugs-list mailing list

[issue7480] trite documentation issue.

2009-12-11 Thread David W. Lambert
New submission from David W. Lambert b49p23t...@stny.rr.com: http://docs.python.org/dev/py3k/library/stdtypes.html#index-559 Proposal: remove last sentence from class.__bases__ The tuple of base classes of a class object. If there are no base classes, this will be an empty tuple. Reason:

[issue5716] Overzealous deprecation of BaseException.message

2009-12-11 Thread Alan Isaac
Alan Isaac alan.is...@gmail.com added the comment: FYI a patch has been committed that should fix this. For discussion see http://bugs.python.org/issue6844 -- nosy: +aisaac ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5716

[issue7466] Segmentation fault with tuple + gc.collect()

2009-12-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- title: Segmentation fault after about 20 seconds on lenovo T500 - Segmentation fault with tuple + gc.collect() ___ Python tracker rep...@bugs.python.org

[issue7471] GZipFile.readline too slow

2009-12-11 Thread Jack Diederich
Jack Diederich jackd...@gmail.com added the comment: I tried passing a size to readline to see if increasing the chunk helps (test file was 120meg with 700k lines). For values 1k-10k all took around 30 seconds, with a value of 100 it took 80 seconds, with a value of 100k it ran for several

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread Jack Diederich
Jack Diederich jackd...@gmail.com added the comment: This seems to have been introduced in r72930 when the stackUnderflow() was moved from the top of the function to the bottom. It used to test for len 0. Question, should cPickle and pickle be raising the same error here? UnpicklingError is

[issue7477] kqueue timers don't work properly

2009-12-11 Thread Hasan
Hasan hala...@gmail.com added the comment: Closing it. My mistake. I was passing incorrect arguments. KQ_EV_ONESHOT requires KQ_EV_ADD as well, and timer data goes into data. -- status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7482] Improve ZeroDivisionError message for float and complex object

2009-12-11 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: The current error messages for divisions by 0 of float and complex object say float/complex division, whereas for int and long is integer/long division by zero: 5/0 ZeroDivisionError: integer division or modulo by zero 5.0/0

[issue1967] Backport dictviews to 2.7

2009-12-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The patch (backport_dictviews.diff) doesn't seem to work for me. I applied it on trunk after a svn up, did ./configure make and when I tried d.view{items|keys|values} Python segfaulted: Python 2.7a1+ (trunk:76759M, Dec 12 2009, 00:28:52)

[issue7475] codecs missing: base64 bz2 hex zlib ...

2009-12-11 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: codecs.encode()/.decode() provide access to all codecs, regardless of their supported type combinations and of course, you can use them directly via the codec registry, subclass from them, etc. I presume that the OP didn't talk about

[issue5716] Overzealous deprecation of BaseException.message

2009-12-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Closing this as a duplicate of #6844. -- nosy: +ezio.melotti resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - BaseException DeprecationError raises inappropriately

[issue7479] os.lchmod is not present

2009-12-11 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: All functions in the POSIX/os module are available only on those systems that support them, and then do exactly what the system says they should do. So if your system doesn't have lchmod, the os module won't provide such a function on your

[issue1615158] POSIX capabilities support

2009-12-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever versions: +Python 3.2 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1615158 ___

[issue7479] os.lchmod is not present

2009-12-11 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Perhaps the bug is a small documentation bug, in that it should be Availability: BSD-based unix? We don't seem to have any other examples of doing that in the docs, though. -- nosy: +r.david.murray

[issue6108] unicode(exception) and str(exception) should return the same message on Py2.6

2009-12-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: In r64791, BaseException gained a new __unicode__ method that does the equivalent of the following things: * if the number of args is 0, returns u'' * if it's 1 returns unicode(self.args[0]) * if it's 1 returns unicode(self.args) Before

[issue7483] str.format behaviour changed from Python 2.6

2009-12-11 Thread Jeong-Min Lee
New submission from Jeong-Min Lee false...@gmail.com: In Python 2.6, '{0:030}'.format(1) '10' '{0:-30}'.format(1) '1-' In Python 2.7a / 3.1, '{0:030}'.format(1) '01' '{0:-30}'.format(1)

[issue7483] str.format behaviour changed from Python 2.6

2009-12-11 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - eric.smith nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7483 ___

[issue7483] str.format behaviour changed from Python 2.6

2009-12-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The problem seems to be in Objects/stringlib/formatter.h at line 472: if (format-fill_char == '0') spec-n_min_width = format-width - n_non_digit_non_padding; else spec-n_min_width = 0; I tried to comment out that

[issue1615158] POSIX capabilities support

2009-12-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1615158 ___ ___

[issue7484] smtplib: verify breaks with Postfix servers

2009-12-11 Thread Manuel Pégourié-Gonnard
New submission from Manuel Pégourié-Gonnard m...@elzevir.fr: Hi, The verify method of SMTP objects created with smtplib doesn't work properly with servers running Postfix, due to quoting problems: the address is enclosed in pointed brackets by the method, which changes the way it is interpreted