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

2009-12-11 Thread flox
flox 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 #text-vs-data-instead-of-unicode-vs-8-bit And

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

2009-12-11 Thread flox
flox 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` :1: SyntaxWarning: backquote not supported

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

2009-12-11 Thread flox
Changes by flox : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

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

2009-12-11 Thread flox
Changes by flox : -- title: No hint about codecs removed : base64 bz2 hex zlib ... -> No hint about codecs removed: base64 bz2 hex zlib ... ___ Python tracker ___ ___

[issue7470] logger.StreamHandler emit encoding fallback is wrong

2009-12-11 Thread Vinay Sajip
Vinay Sajip 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 : -- keywords: +patch Added file: http://bugs.python.org/file15523/issue7475_warning.diff ___ Python tracker ___ ___ Py

[issue7464] circular reference in HTTPResponse by urllib2

2009-12-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson 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? -- ___ Python track

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

2009-12-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis 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. The codec architecture of P

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

2009-12-11 Thread Marc-Andre Lemburg
Changes by Marc-Andre Lemburg : -- resolution: invalid -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue7464] circular reference in HTTPResponse by urllib2

2009-12-11 Thread Senthil Kumaran
Senthil Kumaran 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 out there? -

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

2009-12-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Benjamin Peterson wrote: > > Benjamin Peterson 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. Codecs can work with arbitrary t

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

2009-12-11 Thread flox
flox 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') b'eJxLTEoG

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, this can be closed as far as I'm concerned. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file15487/cpickle_load_pop.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file15494/cpickle_load_pop-2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread STINNER Victor
STINNER Victor 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 ___ P

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

2009-12-11 Thread STINNER Victor
STINNER Victor 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 tracker

[issue7477] kqueue timers don't work properly

2009-12-11 Thread Hasan
New submission from Hasan : 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, filter=KQ_FILTER_TIMER) e new_e

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2009-12-11 Thread STINNER Victor
New submission from STINNER Victor : 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 opcode/function call. The error occurs

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2009-12-11 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file15525/_sqlite3_setdict.patch ___ Python tracker ___

[issue7479] os.lchmod is not present

2009-12-11 Thread steve
New submission from steve : 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 unix symbolic links,

[issue7477] kqueue timers don't work properly

2009-12-11 Thread Hasan
Hasan added the comment: Typo in the repro. The statement: new_e = f.control should be: new_e = kq.control -- ___ Python tracker ___

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

2009-12-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2009/12/11 Marc-Andre Lemburg : > 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. Didn't you have a proposal

[issue7479] os.lchmod is not present

2009-12-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: lchmod seems to be a BSD-specific function. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-

[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2009-12-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ghaering priority: -> normal stage: -> patch review type: -> crash versions: +Python 2.6, Python 3.1, Python 3.2 ___ Python tracker ___ __

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +alexandre.vassalotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

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

2009-12-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ghaering ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

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

2009-12-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > 2009/12/11 Marc-Andre Lemburg : >> codecs.encode()/.decode() provide access to all codecs, regardless >> of their supported type combinations and of course, you can use >> them directly

[issue1398] Can't pickle partial functions

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti 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 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, similar, cases: for

[issue2335] Backport set literals

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: If there are no objections, I will commit this patch later this week. -- ___ Python tracker ___ __

[issue2333] Backport set and dict comprehensions

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: If there are no objections, I will commit this patch later this week after issue #2335. -- ___ Python tracker ___

[issue1967] Backport dictviews to 2.7

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Can someone review the patches? I would like to commit this later this week. -- ___ Python tracker ___ ___

[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 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 failures in _curses an

[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 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) for Python 2.7 and 3.2.

[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 : -- 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 framework is present _

[issue7452] Invalid mnemonic 'fnstcw'

2009-12-11 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[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 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 that the .dmg is curr

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

2009-12-11 Thread Antoine Pitrou
Antoine Pitrou 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

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

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

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

2009-12-11 Thread Mark Dickinson
Mark Dickinson 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 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. -- Added

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

2009-12-11 Thread Mark Dickinson
Mark Dickinson 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 to use the libm fu

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

2009-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: > expm1(x) = sinh(x/2)*exp(x/2) Should be 2*sinh(x/2)*exp(x/2). -- ___ Python tracker ___ ___ Pytho

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

2009-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: lgamma patch committed to trunk (with looser tests) in r76755. -- ___ Python tracker ___ ___ Python-

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

2009-12-11 Thread flox
Changes by flox : -- versions: -Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue7480] trite documentation issue.

2009-12-11 Thread David W. Lambert
New submission from David W. Lambert : 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: Sentence is a python 2

[issue5716] Overzealous deprecation of BaseException.message

2009-12-11 Thread Alan Isaac
Alan Isaac 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 ___ ___

[issue7481] Failing to start a thread leaves "zombie" thread in "initial" state

2009-12-11 Thread John Mark Schofield
New submission from John Mark Schofield : SUMMARY: When you attempt to start a thread, and you're unable to (you get thread.error) it leaves a thread stuck in an "initial" state that never exits. (threading.enumerate() shows the threads and lists their status as "initial.") REPRODUCTION STEPS: S

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

2009-12-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- title: Segmentation fault after about 20 seconds on lenovo T500 -> Segmentation fault with tuple + gc.collect() ___ Python tracker ___

[issue7471] GZipFile.readline too slow

2009-12-11 Thread Jack Diederich
Jack Diederich 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 minutes before I killed

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread Jack Diederich
Jack Diederich 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 defined in pickle.

[issue7477] kqueue timers don't work properly

2009-12-11 Thread Hasan
Hasan 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 ___

[issue7482] Improve ZeroDivisionError message for float and complex object

2009-12-11 Thread Ezio Melotti
New submission from Ezio Melotti : 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 ZeroDivisionError: float

[issue1967] Backport dictviews to 2.7

2009-12-11 Thread Ezio Melotti
Ezio Melotti 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) [GCC 4.4.1] on linux

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

2009-12-11 Thread Martin v . Löwis
Martin v. Löwis 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 codecs.encode, but a

[issue5716] Overzealous deprecation of BaseException.message

2009-12-11 Thread Ezio Melotti
Ezio Melotti 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 ___ Pyth

[issue7479] os.lchmod is not present

2009-12-11 Thread Martin v . Löwis
Martin v. Löwis 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 system. There are sys

[issue1615158] POSIX capabilities support

2009-12-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever versions: +Python 3.2 -Python 3.1 ___ Python tracker ___ ___ Pyt

[issue7479] os.lchmod is not present

2009-12-11 Thread R. David Murray
R. David Murray 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 ___ Python tra

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

2009-12-11 Thread Ezio Melotti
Ezio Melotti 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 this, BaseException on

[issue7483] str.format behaviour changed from Python 2.6

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

[issue7483] str.format behaviour changed from Python 2.6

2009-12-11 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7483] str.format behaviour changed from Python 2.6

2009-12-11 Thread Ezio Melotti
Ezio Melotti 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 part and leave just th

[issue1615158] POSIX capabilities support

2009-12-11 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +needs review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue7484] smtplib: verify breaks with Postfix servers

2009-12-11 Thread Manuel Pégourié-Gonnard
New submission from Manuel Pégourié-Gonnard : 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 by the server.