[issue10030] Patch for zip decryption speedup

2010-10-12 Thread Shashank
Shashank added the comment: Attached is a patch with changes in Lib/test/test_zipfile.py to test both C and pure-py impls (on systems where the C impl is present). Admittedly, this approach to emulating the absence of C impl is a bit hacky. This is primarily because the changed class is not a

[issue10049] Add a "no-op" (null) context manager to contextlib

2010-10-12 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: Is there anything else I need to do to have the patch reviewed and applied? I am in no hurry since we're still using 2.x, I'd just like to know if more needs to be done on my part to move the issue forward. My last Python patch was accepted quite some years a

[issue10030] Patch for zip decryption speedup

2010-10-12 Thread Shashank
Changes by Shashank : Added file: http://bugs.python.org/file19197/zipdecrypt.patch ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue10067] itertools' docs put izip_longest in the "terminating on the shortest input sequence" section

2010-10-12 Thread Daniel Abel
New submission from Daniel Abel : Both the 2.x and 3.x documentation for itertools has izip_longest (zip_longest for 3.x) in the "Iterators terminating on the shortest input sequence" section. However, according to izip_longest's documentation, it terminates when the _longest_ iterator is exh

[issue10068] global objects created in some module are not destroyed when last reference to that module is released

2010-10-12 Thread Valery Lesin
New submission from Valery Lesin : Interpreter: Python 3.1.2 Sample: = first.py = import sys import second if 'second' in sys.modules: print ('in sys modules') del sys.modules['second'] del second = second.py = class A: def __init__(self): print('created') def __de

[issue10049] Add a "no-op" (null) context manager to contextlib

2010-10-12 Thread R. David Murray
R. David Murray added the comment: Unless Nick has further feedback I think you've done all you need to, thanks. -- nosy: +r.david.murray ___ Python tracker ___

[issue10069] 2to3 crash in fix_urllib.py

2010-10-12 Thread Hallvard B Furuseth
New submission from Hallvard B Furuseth : This line: from urllib import quote as quote_url, urlencode makes 2to3 on Python 3.2a2 crash. At lib2to3/fixes/fix_urllib.py line 124, member = None. -- components: 2to3 (2.x to 3.0 conversion tool) messages: 118410 nosy: hfuru priority: normal

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Hallvard B Furuseth
New submission from Hallvard B Furuseth : It would be nice with some official way to tell 2to3, "Leave this code chunk alone. This is 2.* code, that is 3.* code": try: # Python 2.6 from urlparse import urlparse, urlunparse except ImportError: # Python 3

[issue10068] global objects created in some module are not destroyed when last reference to that module is released

2010-10-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This also reproduces in 2.7. 2.6 and 2.7 have a different behaviour. -- nosy: +amaury.forgeotdarc versions: +Python 2.7 ___ Python tracker __

[issue10069] 2to3 crash in fix_urllib.py

2010-10-12 Thread Hallvard B Furuseth
Changes by Hallvard B Furuseth : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue10071] Should not release GIL while running RegEnumValue

2010-10-12 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : Currently, PC/winreg.c releases GIL while calling registry API, but I found this in Remarks section of RegEnumValue. http://msdn.microsoft.com/en-us/library/ms724865%28VS.85%29.aspx > While using RegEnumValue, an application should not call any registry >

[issue10071] Should not release GIL while running RegEnumValue

2010-10-12 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- Removed message: http://bugs.python.org/msg118413 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue10071] Should not release GIL while running RegEnumValue

2010-10-12 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : Currently, PC/winreg.c releases GIL while calling registry API, but I found this in Remarks section of RegEnumValue. http://msdn.microsoft.com/en-us/library/ms724865%28VS.85%29.aspx > While using RegEnumValue, an application should not call any registry >

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't understand. If the code is already Python 3 code, why are you running 2to3 on it? -- nosy: +loewis ___ Python tracker ___ ___

[issue10071] Should not release GIL while running RegEnumValue

2010-10-12 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file19198/py27_test_winreg_crash_stack_trace.txt ___ Python tracker ___ _

[issue10071] Should not release GIL while running RegEnumValue

2010-10-12 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- Removed message: http://bugs.python.org/msg118414 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue10071] Should not release GIL while running RegEnumValue

2010-10-12 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue10071] Should not release GIL while running RegEnumValue

2010-10-12 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : Currently, PC/winreg.c releases GIL while calling registry API, but I found this in Remarks section of RegEnumValue. http://msdn.microsoft.com/en-us/library/ms724865%28VS.85%29.aspx > While using RegEnumValue, an application should not call any registry >

[issue10069] 2to3 crash in fix_urllib.py

2010-10-12 Thread R. David Murray
Changes by R. David Murray : -- nosy: +benjamin.peterson type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Hallvard B Furuseth
Hallvard B Furuseth added the comment: Martin v. Löwis writes: > Martin v. Löwis added the comment: > > I don't understand. If the code is already Python 3 code, why are you > running 2to3 on it? I should have clarified - it's still Python 2 code (maybe 2.7), moving one step at a time toward

[issue10068] global objects created in some module are not destroyed when last reference to that module is released

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Probably issue7140, which will disable clearing of the module dict if it's caught in a reference cycle (which it is here, since A.__init__ and A.__del__ will reference it as their globals dict). -- nosy: +benjamin.peterson, pitrou ___

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: I still don't understand. If it's 2.x code, why do you want to say that it is 3.x code? If you don't want to run a specific fixer, you can exclude it from the list of fixers. -- ___ Python tracker

[issue10030] Patch for zip decryption speedup

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hello, Some quick comments: - the C module should be private and therefore called _zipdecrypt - if you want to avoid API mismatch, you could give a tp_call to your C decrypter object, rather than a "decrypt" method - you can put all initialization code in zipd

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

2010-10-12 Thread Georg Brandl
Changes by Georg Brandl : -- priority: deferred blocker -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue8746] os.chflags() and os.lchflags() are not built when they should be be

2010-10-12 Thread Georg Brandl
Changes by Georg Brandl : -- priority: deferred blocker -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Hallvard B Furuseth
Hallvard B Furuseth added the comment: Martin v. Löwis writes: > I still don't understand. If it's 2.x code, why do you want to say that > it is 3.x code? It works on Python 2. It runs on Python 3 - maybe correctly, or maybe it's not that far along yet. Maybe some files in a package work on

[issue4758] Python 3.x internet documentation needs work

2010-10-12 Thread Rafe H. Kettler
Rafe H. Kettler added the comment: Thanks Eric, I think you're right. I'll do that. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Rafe H. Kettler
New submission from Rafe H. Kettler : I think that the documentation for ftplib is a bit too concise and assumes that the reader in an expert in the protocol when the point of the module is to abstract out such details. For example, for the error documentation, the exceptions are only explaine

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread AM Helin
New submission from AM Helin : calendar.isleap() doesn't enforce any types, leading to string formatting errors when a string is passed to it: >>> calendar.isleap("2011") Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.1/lib/pyt

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread AM Helin
Changes by AM Helin : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: Maybe we need to tackle this from a different angle: can you please specify the feature you are asking for exactly, with any syntax, API, or command line changes that you consider necessary? Omitting redundant parentheses for print is a separate issue (feel

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread R. David Murray
R. David Murray added the comment: In Python we often don't type check, we just let errors happen. It is true that it would make the problem clearer to do a type check and issue a specific error message, but I don't know if it is worth it. (The error would already have been clear if it were

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Hallvard B Furuseth
Hallvard B Furuseth added the comment: > Maybe we need to tackle this from a different angle: can you please > specify the feature you are asking for exactly, with any syntax, API, or > command line changes that you consider necessary? First, nothing here is necessary, since it's just a request

[issue1708] improvements for linecache

2010-10-12 Thread R. David Murray
R. David Murray added the comment: I am indeed going to close this. The patch isn't complete, since there's the line ending issue Antoine pointed out, which implies that there are also some missing tests. I doubt that linecache performance is something that affects very many people, but i

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Hallvard B Furuseth
Hallvard B Furuseth added the comment: Another syntax could be attached to if-else and try-except. Given: if ...: else: or try: except ...: if 2to3 would translate to or vise versa, sans whitespace/comment differences, then it does not do

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I agree with David on this one. In addition to the arguments already stated, the string value of an exception is not part of specification. The exception is still TypeError even if the message may be confusing. I also find that once read in the conte

[issue6322] Pdb breakpoints don't work on lines without bytecode

2010-10-12 Thread R. David Murray
Changes by R. David Murray : -- nosy: +georg.brandl -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10063] file:// scheme will stop accessing via ftp protocol

2010-10-12 Thread Éric Araujo
Éric Araujo added the comment: file: URIs provoking FTP access seem wrong to me. Are there widely-used tools displaying this behavior? -- nosy: +eric.araujo ___ Python tracker ___

[issue10063] file:// scheme will stop accessing via ftp protocol

2010-10-12 Thread R. David Murray
R. David Murray added the comment: I doubt it. As Senthil says, file invoking ftp it is a bug. I'm just betting that *someone* is going to complain when it stops working in their particular situation. -- ___ Python tracker

[issue10063] file:// scheme will stop accessing via ftp protocol

2010-10-12 Thread Éric Araujo
Éric Araujo added the comment: Ah, I thought this was not a bug, because of “RFC 1738, says that host, if present should be the FQDN of the machine”. If it’s a bug I’m all for fixing it in all three versions. -- ___ Python tracker

[issue10066] xmlrpclib does not handle some non-printable characters properly

2010-10-12 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report. Unfortunately, 2.6 only gets security fixes, not general bug fixes; can you tell if this applies to 2.7, 3.1 and 3.2? If you have a small script that displays the problem, please attach it. -- nosy: +eric.araujo, loewis

[issue10069] 2to3 crash in fix_urllib.py

2010-10-12 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +benjamin.peterson, eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Éric Araujo
Éric Araujo added the comment: How about this phrasing: “Make 2to3 fixers not touch code in a block starting with ’if sys.version >= '3'’“ (and hexversion, version_info, you get the idea)? -- ___ Python tracker _

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10039] python é.py fails with UnicodeEncodeErr or if PYTHONFSENCODING is used

2010-10-12 Thread Éric Araujo
Éric Araujo added the comment: I don’t understand why reading a filename would not respect the envvar stating the filesystem encoding. -- nosy: +eric.araujo ___ Python tracker

[issue10042] total_ordering stack overflow

2010-10-12 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: A patch would be great. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8106] SSL session management

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: http://www.openssl.org/docs/ssl/SSL_CTX_set_session_cache_mode.html suggests that SSL session caching already occurs by default in server mode: “SSL_SESS_CACHE_SERVER Server sessions are added to the session cache. When a client proposes a session to be

[issue10066] xmlrpclib does not handle some non-printable characters properly

2010-10-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: The patch is incorrect. Even though this may let get these characters "through", the other end will have no clue that \x is meant as an escape. Please face the ugly truth: XML (and hence XML-RPC) just does not support these characters, see http://www.w3.org/

[issue10067] itertools' docs put izip_longest in the "terminating on the shortest input sequence" section

2010-10-12 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +rhettinger versions: -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue10063] file:// scheme will stop accessing via ftp protocol

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'd say disable hostnames in file:// URIs altogether. There's no practical reason for forcing a hostname in there, and trying to check that it matches the local host's FQDN sounds like a distraction. -- nosy: +pitrou _

[issue10063] file:// scheme will stop accessing via ftp protocol

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: (by disable I meant disallow, sorry) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue10063] file:// scheme will stop accessing via ftp protocol

2010-10-12 Thread R. David Murray
R. David Murray added the comment: Éric: WellI suppose that depends on how you look at it. The RFC says that 'file:' does not specify a network protocol, and so "it's utility in network protocols between hosts is limited". So, technically an implementation that decides to handle 'file://

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: > How about this phrasing: “Make 2to3 fixers not touch code in a block > starting with ’if sys.version >= '3'’“ (and hexversion, version_info, > you get the idea)? I don't think this can work. You may have to write code like if sys.version_info >= (3,): try

[issue10039] python é.py fails with UnicodeEncodeErr or if PYTHONFSENCODING is used

2010-10-12 Thread R. David Murray
R. David Murray added the comment: Éric, if you are saying, "the user asked for it, it *should* fail", then that is indeed one of the arguments put forward in issue 9992 where this was discussed. But I think the emerging consensus is that it is better to just avoid the problem by always usin

[issue10039] python é.py fails with UnicodeEncodeErr or if PYTHONFSENCODING is used

2010-10-12 Thread Éric Araujo
Éric Araujo added the comment: > if you are saying, "the user asked for it, it *should* fail", then > that is indeed one of the arguments put forward in issue 9992 where > this was discussed. You could put it that way, thanks for phrasing my thoughts :) > But I think the emerging consensus is t

[issue10063] file:// scheme will stop accessing via ftp protocol

2010-10-12 Thread Éric Araujo
Éric Araujo added the comment: With this explanation, I agree with Senthil’s plan too. -- ___ Python tracker ___ ___ Python-bugs-list

[issue10063] file:// scheme will stop accessing via ftp protocol

2010-10-12 Thread R. David Murray
R. David Murray added the comment: I think the error message should be changed from 'allowed' to 'supported', though. -- ___ Python tracker ___

[issue10049] Add a "no-op" (null) context manager to contextlib

2010-10-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm with Antoine. Why not just do this in the context function itself? I think it's more explicit and easier than reading the doc to figure out what nullcontext is supposed to do: from contextlib import contextmanager CONDITION = False @contextmanager de

[issue10074] dictobject.c: crash in Py_XDECREF

2010-10-12 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar : I noticed that Python 2.6.6 crashes on OSX 10.6 when using Komodo. The below traceback indicates a crash in line 911 - "Py_XDECREF(ep->me_value);" in tags/r266/Objects/dictobject.c Thread 0: Dispatch queue: com.apple.main-thread 0 org.activestate.Act

[issue10049] Add a "no-op" (null) context manager to contextlib

2010-10-12 Thread R. David Murray
R. David Murray added the comment: Because hardcoding a particular condition into a context manager is less flexible? (I'm +0 on this thing myself, by the way.) -- ___ Python tracker

[issue9003] urllib.request and http.client should allow certificate checking

2010-10-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file19189/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue10074] dictobject.c: crash in Py_XDECREF

2010-10-12 Thread Ronald Oussoren
Ronald Oussoren added the comment: It is not impossible that this is a bug in python, but IMHO pretty unlikely, it is way more likely to be a bug in a 3th-party extension. BTW. This issue is very likely to languish unless you add a way to reproduce the issue (and preferably without Komodo).

[issue10067] itertools' docs put izip_longest in the "terminating on the shortest input sequence" section

2010-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I saw that when I put in in. It doesn't fit the overall category but it does belong in the same general grouping and the notes make the semantics clear, so there is no harm in it and I like the current presentation better than the alternatives. -- r

[issue10067] itertools' docs put izip_longest in the "terminating on the shortest input sequence" section

2010-10-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue10049] Add a "no-op" (null) context manager to contextlib

2010-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Are you sure that this is useful enough to warrant inclusion in the standard lib? I don't know of anyone else who has used the same idiom. It seems crufty to me -- something that adds weight (mental burden and maintenance effort) without adding much valu

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Hallvard B Furuseth
Hallvard B Furuseth added the comment: [I got failed issue tracker submission, trying again...] >> How about this phrasing: “Make 2to3 fixers not touch code in a >> block starting with ’if sys.version >= '3'’“ >> (and hexversion, version_info, you get the idea)? Right, almost... it doesn't nee

[issue10075] Get session cache stats from SSLContext

2010-10-12 Thread Antoine Pitrou
New submission from Antoine Pitrou : This patch adds a method to query the session cache statistics from an SSL context. See http://www.openssl.org/docs/ssl/SSL_CTX_set_session_cache_mode.html# for more info. -- components: Library (Lib) files: sslstats.patch keywords: patch messages:

[issue10074] dictobject.c: crash in Py_XDECREF

2010-10-12 Thread Ned Deily
Ned Deily added the comment: And what is libpyxpcom.dylib? As Ronald says, this is almost certainly a 3rd-party extension module problem. -- nosy: +ned.deily ___ Python tracker __

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-12 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Made an attempt to port lekma's patch to py3k-trunk. No (logical) changes needed. Don't know about accept4() issue. As I saw in Qt sources, they ifdef'ed CLOEXEC by default on file descriptors. Don't think it's acceptable :) in this particular case. So, @A

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would also like to note the following curiosity: >>> calendar.isleap("%d") False I still don't think there is anything worth fixing here, but we can consider replacing year % 4 == 0 predicate with year & 3 == 0 which will change the error raised by i

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Rafe Kettler
Rafe Kettler added the comment: I've drafted up a patch. For those of you who don't want to read the diff, it changes all references to FTP reply codes with short explanations of what they do. Also, in the docs for retrlines() and nlst() the commands LIST, NLST, and MLSD are explained. Attac

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Rafe Kettler
Changes by Rafe Kettler : -- keywords: +patch Added file: http://bugs.python.org/file19202/ftplib-patch.diff ___ Python tracker ___ __

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Rafe Kettler
Changes by Rafe Kettler : Removed file: http://bugs.python.org/file19201/ftplib-patch.rst ___ Python tracker ___ ___ Python-bugs-list mailing

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Rafe Kettler
Changes by Rafe Kettler : Added file: http://bugs.python.org/file19203/ftplib-patch.txt ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Éric Araujo
Éric Araujo added the comment: Looks good to me. Before committing, spaces after full stops should be doubled. -- nosy: +eric.araujo ___ Python tracker ___

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread Éric Araujo
Éric Araujo added the comment: I’d be in favor of type checking here, but I know I’m in the minority. I’m very much not in favor of making code less readable (“& 3”). -- ___ Python tracker __

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Rafe Kettler
Changes by Rafe Kettler : Removed file: http://bugs.python.org/file19203/ftplib-patch.txt ___ Python tracker ___ ___ Python-bugs-list mailing

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Rafe Kettler
Rafe Kettler added the comment: Double spaced after the sentence ending periods. -- Added file: http://bugs.python.org/file19204/ftplib-patch.txt ___ Python tracker ___

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: The accept() issue is the following: the socket created by accept() (in Lib/socket.py) will formally inherit its parent's `type` attribute (including any SOCK_NONBLOCK and SOCK_CLOEXEC flags). However, the underlying Linux socket is created by the accept() sy

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread shadikka
shadikka added the comment: To clarify my original point, I'm for making an explicit error message for that, definitely not for any silent failure or automatic string conversion. -- ___ Python tracker ___

[issue10075] Get session cache stats from SSLContext

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've renamed the method to session_stats() and commited the patch in r85383. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending ___ Python tracker

[issue10075] Get session cache stats from SSLContext

2010-10-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue10041] socket.makefile(mode = 'r').readline() silently removes carriage return

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: The proposed test case doesn't test a lot, IMHO. It would be better if it sent binary from one end and received unicode on the other end, or vice-versa (with explicit encoding and errors, preferably). -- ___ Python

[issue10073] calendar.isleap() not checking parameter type

2010-10-12 Thread Philip Jenvey
Philip Jenvey added the comment: Another option is to wrap the operations in a try/except. When a TypeError is raised have it throw a new TypeError with an improved error message and the original chained to it -- nosy: +pjenvey ___ Python tracker

[issue10070] 2to3 wishes for already-2to3'ed files

2010-10-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: >> I don't think this can work. You may have to write code like >> >> if sys.version_info >= (3,): >> try: >> some_code() >> except Exception, e: >> pass >> >> (i.e. not use the "as" syntax), because it otherwise won't parse on >> Python 2. Hence, o

[issue10076] Regex objects became uncopyable in 2.5

2010-10-12 Thread Michael Shields
New submission from Michael Shields : For many years now, the sre module has provided __copy__ and __deepcopy__ modules that raise an exception ("cannot copy this pattern object") by default, with an #ifdef to enable their implementations. Until Python 2.5, these were simply unused. Since th

[issue10076] Regex objects became uncopyable in 2.5

2010-10-12 Thread Michael Shields
Michael Shields added the comment: Here's the patch. I updated the test case and release notes also. I'm a Google employee, so this patch is covered by whatever usual copyright arrangement we have with the PSF. -- keywords: +patch Added file: http://bugs.python.org/file19205/copy-pat

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-12 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Thanks! I can see the problem now, but I think checking should be done like this: >>> fcntl.fcntl(c, fcntl.F_GETFD) & fcntl.FD_CLOEXEC 0 >>> fcntl.fcntl(s, fcntl.F_GETFD) & fcntl.FD_CLOEXEC 1 and with accept4() call I've got flag set: >>> fcntl.fcntl(c, fcntl

[issue3873] Unpickling is really slow

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed in r85384. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: You can check accept4() presence by adding it to the AC_CHECK_FUNCS macro in configure.in around line 2553, and add the corresponding HAVE_ACCEPT4 lines in pyconfig.h.in. Then run "autoconf" and you will have access to a HAVE_ACCEPT4 constant when accept4() e

[issue10068] global objects created in some module are not destroyed when last reference to that module is released

2010-10-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: Tricky. I think the only way to do this properly is to call _PyModule_Clear when the dict is destroyed. However, there's no good way to flag a dictionary as a "module" dict. Therefore, I propose we remove the Py_REFCNT == 1 guard in module_dealloc, and sim

[issue10068] global objects created in some module are not destroyed when last reference to that module is released

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Therefore, I propose we remove the Py_REFCNT == 1 guard in > module_dealloc, and simply leave as an open bug that modules will clear > their dictionaries on deallocation. Yes, I think it's the best solution. People can easily copy the dict if they want to k

[issue10074] dictobject.c: crash in Py_XDECREF

2010-10-12 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: On 2010-10-12, at 11:49 AM, Ned Deily wrote: > And what is libpyxpcom.dylib? Likely PyXPCOM https://developer.mozilla.org/en/PyXPCOM > As Ronald says, this is almost certainly a 3rd-party extension module problem. Ok, I've made a note for Todd (current

[issue10074] dictobject.c: crash in Py_XDECREF

2010-10-12 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- nosy: +toddw ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue10069] 2to3 crash in fix_urllib.py

2010-10-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: r85388. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-l

[issue10077] Python 3.1: site error is not logged

2010-10-12 Thread STINNER Victor
New submission from STINNER Victor : If the site module fails, the error is not logged because of a bug in initsite(). The problem is that PyFile_WriteString() does nothing if an error occurred. - Edit Lib/site.py to add "raise Exception('xxx')" at the beginning of main() - Run ./python - (

  1   2   >