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

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: As Eric said. Please see the socket.makefile doc: “Return a file object associated with the socket. The exact returned type depends on the arguments given to makefile(). These arguments are interpreted the same way as by the built-in open() function.” (http

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

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, sorry for closing, then. You are right, this is a genuine issue. -- ___ Python tracker <http://bugs.python.org/issue10

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: There are a couple of things I don't understand: +* :class:`~email.generator.Generator` will convert message bodies that + have a :mailheader:`ContentTransferEncoding` of 8bit and a known charset to + instead have a :mailheader:`CotnentTransferEncodin

[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wanted to go forward with this and so I've committed the patch in r85321. If you're concerned about the lack of support for IP addresses, you can open a new issue (and even provide a patch!). Thank you. -- resolution: -> fixed stage:

[issue10040] GZipFile failure on large files

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can you show a snippet of the code (or descrive it in detail) that "processes" the GzipFile? Right now it's not obvious which operations you are doing. -- components: +Library (Lib) -Windows nosy: +pitrou stage: unit test needed ->

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

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is the API addition I would suggest for the http.client module: Add two new keyword arguments `context` and `check_hostname` to HTTPSConnection; `context` would allow to pass a SSLContext instance for certificate checking and other options (default None

[issue10048] urllib.request documentation confusing

2010-10-08 Thread Antoine Pitrou
New submission from Antoine Pitrou : The urllib.request documentation intermingles old 2.x urllib (FancyURLopener, etc.) with urllib2-inherited (*Handler, build_opener, etc.) primitives without making any distinction. This makes it rather confusing for the reader to figure out which ones to

[issue10050] urllib.request still has old 2.x urllib primitives

2010-10-08 Thread Antoine Pitrou
New submission from Antoine Pitrou : 3.x urllib.request still has a lot of stuff inherited from 2.x urllib: URLopener, FancyURLopener, the urlretrieve implementation (perhaps others?). Ideally, urlretrieve should be reimplemented using urlopen or build_opener, and the other stuff deprecated

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

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: @contextlib.contextmanager def null(): yield Do we really need to add this to the stdlib? Previous proposals to add an "identity function" or "no-op function" have always be refused. This one seems even less useful.

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

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > @Antoine: it is true that a null context manager can be easily > defined, but it does requires a separate generator definition, often > repeated in different modules. This is markedly less elegant than > just using contextlib.null() in an expr

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Generator converts 8bit bodies into 7bit bodies by applying an > appropriate 7bit CTE. The reason it does this is that the output of > Generator will often be passed to some other Python library function > (most often smtplib) that can only

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Even if smtplib accepted bytes (it currently does not), That sounds like a critical failure. -- ___ Python tracker <http://bugs.python.org/iss

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

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a preliminary patch for http.client. I think it would be good to have local tests using a custom HTTPS server, too. -- keywords: +patch Added file: http://bugs.python.org/file19162/httpcli.patch ___ Python

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The important point is that we have to use the same encoding to decode > and encode command line arguments. I don't think I agree with this. It's only important when you run a Python interpreter using subprocess, but the point of using subp

[issue4388] test_cmd_line fails on MacOS X

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, this can be now reproduced under Linux by forcing different locale and filesystem encodings: $ PYTHONFSENCODING=utf8 LANG=ISO-8859-1 ./python -m test.regrtest test_cmd_line [1/1] test_cmd_line test test_cmd_line failed -- Traceback (most

[issue1051] certificate in Lib/test/test_ssl.py expires in February 2013

2010-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Cert generation script committed in r85327. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine: Python cannot possibly know whether a command line argument > is meant as a file name or as some other text, and what encoding the > receiving application will apply to it (if any). I understand. But practicality seems to suggest that, mo

[issue812369] module shutdown procedure based on GC

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch is obviously against 2.x (there are some PyString_Check's on module names, for example). It should be regenerated against 3.x. Also, it would be nice if a test could be devised to check that the shutdown procedure works as expected (I'

[issue10056] Can't build tkinter with libtk 8.6

2010-10-09 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is only with 3.1. Following patch allows building: Index: setup.py === --- setup.py(révision 85336) +++ setup.py(copie de travail) @@ -1450,7 +1450,7 @@ # The versions with

[issue10056] Can't build tkinter with libtk 8.6

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed in r85337. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue10056> ___ __

[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: I backported the patch to 2.7 (r85335) and to 3.1 (r85338). Hopefully things will be ok now. -- ___ Python tracker <http://bugs.python.org/issue8

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > -1. Environment variables are typically set in a text editor or on > the command line, so they will typically have the locale's encoding. Fair enough. > If the mere existence of the fsname encoding leads to that much > confusion, I think I

[issue9992] Command line arguments are not correctly decodediflocale and fileystem encodingsaredifferent

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > For the command line, it would mean that we > introduced a new encoding: "command line encoding", which will be utf-8 on > OSX. Or more generally "environment encoding", if it's also used for env vars. This could

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

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is another patch for http.client containing more tests, including with a mismatching cert. Comments welcome. -- Added file: http://bugs.python.org/file19178/httpcli2.patch ___ Python tracker <h

[issue10055] C99 code in _json.c

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed in 3.2 (r85342), 3.1 (r85343) and 2.7 (r85344). Thank you! -- nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.1, Python 3.2 ___ Pytho

[issue9992] Command line arguments are not correctly decodediflocale and fileystem encodingsaredifferent

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Please no. We run into problems because we have two inconsistent > encodings, and now you propose to introduce another one, allowing > for even more inconsistencies??? It would not really be a "third encoding", since it would replace the

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

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Any chance on folding the HTTPSServer class into http.server? Its API and implementation would first have to be cleaned up. I'd prefer if it were the subject of a separate issue. -- ___ Python tracke

[issue10062] Python 3.2 does not build on systems which do not have sem_timedwait

2010-10-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: What happens if you comment out "# define USE_SEMAPHORES" in Python/thread_pthread.h? -- nosy: +pitrou ___ Python tracker <http://bugs.python.o

[issue10062] Python 3.2 does not build on systems which do not have sem_timedwait

2010-10-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: What about this patch? Index: Python/thread_pthread.h === --- Python/thread_pthread.h (révision 85348) +++ Python/thread_pthread.h (copie de travail) @@ -64,7 +64,8 @@ /* Whether or not

[issue10054] select extension does not build on platforms where uintptr_t is provided in inttypes.h

2010-10-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 3.1 branch does not have this problem because that patch was not > applied to release31-maint. Is this intentional? I don't remember, I suppose it feared it could be an incompatible change or perhaps cause build problems. Anyway, I committed yo

[issue10062] Python 3.2 does not build on systems which do not have sem_timedwait

2010-10-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed in r85352, thanks. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-10-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed to 3.x in r85353. -- ___ Python tracker <http://bugs.python.org/issue9437> ___ ___ Python-bugs-list mailing list Unsub

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-10-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Backported to 2.7 in r85358. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending ___ Python tracker <http://bugs.python.o

[issue9992] Command line arguments are not correctly decodediflocale and fileystem encodingsaredifferent

2010-10-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le dimanche 10 octobre 2010 à 18:23 +, Martin v. Löwis a écrit : > Martin v. Löwis added the comment: > > > For the command line arguments and environment variables, we don't have a > > lot > > of choices: locale or filesys

[issue10045] poor cStringIO.StringO seek performance

2010-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > This should be fixed as a regression. As far as I understand, this is not a regression. I don't think the cStringIO code has changed in years. -- ___ Python tracker <http://bugs.python.org

[issue10045] poor cStringIO.StringO seek performance

2010-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Ok, reading more carefully, it's not a regression. But it's certainly > a bug, and should be fixed. Right. The patch looks straightforward, but I'm not familiar with the cStringIO code.

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: There are now failures on the FreeBSD 7.2 buildbot: == ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Apparently, the error message is: gcc: ${LDFLAGS}: No such file or directory -- ___ Python tracker <http://bugs.python.org/issue9

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: The cause for the failure seems to be a bug in the dreaded _parse_makefile(). When you give it a Makefile such as: LDFLAGS=-foo PY_LDFLAGS=-bar LDSHARED=$(CC) -shared ${LDFLAGS} $(PY_LDFLAGS) It outputs the following variables: {'CC': ''

[issue9992] Command line arguments are not correctly decodediflocale and fileystem encodingsaredifferent

2010-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > However, I completely fail to see the advantage that the > PYTHONFSENCODING variable has over the LANG variable. If it's > possible to set PTHONFSENCODING in some application, it surely > is also possible to set LANG (or LC_CTYPE), no? Set

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

2010-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch which also adds 'cafile' and 'capath' keyword arguments to urlopen(). -- stage: needs patch -> patch review Added file: http://bugs.python.org/file19185/httpcli+urllib.patch ___

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

2010-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a new patch with doc updates for urllib.request. -- Added file: http://bugs.python.org/file19186/httpcli+urllib2.patch ___ Python tracker <http://bugs.python.org/issue9

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

2010-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: This patch should fix the test hanging issues witnessed on some machines. -- Added file: http://bugs.python.org/file19187/httpcli+urllib3.patch ___ Python tracker <http://bugs.python.org/issue9

[issue9991] xmlrpc client ssl check faulty

2010-10-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +orsenthil ___ Python tracker <http://bugs.python.org/issue9991> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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, p

[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 initializati

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

2010-10-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue10073> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10072] ftplib documentation is unclear

2010-10-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola ___ Python tracker <http://bugs.python.org/issue10072> ___ ___ 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

[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. -

[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 <http://bugs.python.org/issue10063> ___ ___ Python-bugs-list mailin

[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 <http://bugs.python.org/issue9003> ___ ___ Python-bugs-list mailin

[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

[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 a

[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 <http:

[issue10075] Get session cache stats from SSLContext

2010-10-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue10075> ___ ___ Python-bugs-list mailing list Unsubscri

[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, prefe

[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 <http://bugs.python.o

[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 wh

[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

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

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed in r85408. I believe this fixes, at last, the whole issue people were complaining about. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -P

[issue10080] Py_Initialize crashes when stdout has been redirected with freopen

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think freopen() is the right solution, since it might open another (different) file descriptor under the hood; but Python always uses file descriptor 1 when creating sys.stderr. I would suggest instead something such as (untested): int tmpfd;

[issue10084] SSL support for asyncore

2010-10-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : It might be useful to make public the SSL support for asyncore which is currently implemented in various tests. -- assignee: giampaolo.rodola components: Library (Lib) messages: 118519 nosy: giampaolo.rodola, pitrou priority: normal severity: normal

[issue10084] SSL support for asyncore

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: (I'm posting this issue after having read this message: http://mail.python.org/pipermail/python-list/2010-October/1257689.html where the poster is clearly confused about SSL support for asyncore) -- ___ P

[issue10085] Memory allocation for primitive types

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't see any actual problem here. If you want help understanding Python's semantics, please post to comp.lang.python. -- nosy: +pitrou resolution: -> invalid status: open -> closed ___ Pytho

[issue10086] test_sysconfig failure with site-packages

2010-10-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> tarek components: +Distutils -Tests nosy: +eric.araujo, tarek stage: -> needs patch ___ Python tracker <http://bugs.python.org/i

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, don't you want to handle SIGILL and SIGBUS too? -- ___ Python tracker <http://bugs.python.org/issue8863> ___ ___

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

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you very much! I've committed the patch in r85420 (3.2) and r85421 (3.1). -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyth

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > You would be wise to avoid using heap storage once you're in the crash > handler. From a security standpoint, if something has managed to > damage the heap (which is not uncommon in a crash), you should not > attempt to allocate or free hea

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I am then confused by this in the initial comment: > > > It calls indirectly PyUnicode_EncodeUTF8() and so call > > PyBytes_FromStringAndSize() which allocates memory on the heap. > > I've not studied the patch though, so this

[issue10080] Py_Initialize crashes when stdout has been redirected with freopen

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Also, dup2 is not available on Windows (at least not from what I've > read). MSDN says dup2 is deprecated but you can use _dup2 instead: http://msdn.microsoft.com/en-us/library/8syseb29%28v=VS.80%29.aspx > From my understanding, freopen() is

[issue9772] test_pep277 failure on AMD64 debian parallel buildbot

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, the error message is (when interpreted as utf-8): == FAIL: test_listdir (test.test_pep277.UnicodeFileTests

[issue9774] test_smtpnet fails with "[110] Connection timed out" on AMD64 debian parallel buildbot

2010-10-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue9774> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9774] test_smtpnet fails with "[110] Connection timed out" on AMD64 debian parallel buildbot

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've commited a patch in r85423 to skip test_smtpnet when the connection to gmail fails (which it probably does because of a firewall somewhere). -- nosy: +pitrou ___ Python tracker <http://bugs.py

[issue9773] test_tarfile fails because of inaccurate mtime on AMD64 debian parallel buildbot

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, when compiling on this buildbot, there's the following error message: make: Warning: File `Makefile' has modification time 4.7 s in the future which seems to hint that the filesystem on the buildbot is slightly misbehaving, o

[issue9774] test_smtpnet fails with "[110] Connection timed out" on AMD64 debian parallel buildbot

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Backported to 3.1 (r85424) and 2.7 (r85425). -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > However, since the Makefile now explicitly appends PY_LDFLAGS to > LDSHARED, we could also stop doing so in ./configure. I've committed a patch which does just this (in r85422). Hopefully it won'

[issue10089] Add support for arbitrary -X options

2010-10-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : It can be useful to enable or disable global Python features based on command-line flags. The -X is supposed to allow implementation-specific options but it is currently disabled for CPython. This patch allows to use -X for arbitrary options in CPython

[issue10080] Py_Initialize crashes when stdout has been redirected with freopen

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the information. I'm afraid I can't be of any more help, since I'm not a Windows developer. I hope someone else can chime in. -- nosy: +brian.curtin, tim.golden ___ Python

[issue10093] Warn when files are not explicitly closed

2010-10-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : This patch outputs a warning on file deallocation when it hasn't been explicitly closed by the programmer. Printing the warning by default is probably not desirable, but using the patch for "-X" options in issue10089 would allow to switch on

[issue10093] Warn when files are not explicitly closed

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, python-dev discussion was here: http://mail.python.org/pipermail/python-dev/2010-September/104247.html The rough consensus seems to be that there should be a command-line option to enable it, but to enable it by default with pydebug

[issue10089] Add support for arbitrary -X options

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: See issue10093 for a possible use case. -- ___ Python tracker <http://bugs.python.org/issue10089> ___ ___ Python-bugs-list m

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > For some reason does another trip through BEGIN_SELECT_LOOP() macro Indeed: if (!timeout) +#ifdef HAVE_ACCEPT4 +/* inherit socket flags and use accept4 call */ +flags = s->sock_type & (SOCK_CLOEXEC | SOCK_NONBLOCK); +

[issue10093] Warn when files are not explicitly closed

2010-10-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file19224/deallocwarn.patch ___ Python tracker <http://bugs.python.org/issue10093> ___ ___ Python-bug

[issue10093] Warn when files are not explicitly closed

2010-10-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file19225/deallocwarn.patch ___ Python tracker <http://bugs.python.org/issue10093> ___ ___ Python-bug

[issue10093] Warn when files are not explicitly closed

2010-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If the warnings are emitted as usual with the warnings module, you can > use -W to control this. Right. Perhaps we can add a new warning category (e.g. ResourceWarning), or simply reuse RuntimeW

[issue9992] Command-line arguments are not correctly decoded if locale and fileystem encodings are different

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I think that we should accept that b'\xff' can be decoded as '\xff' and > that's all. What do you plan to do to fix this failure? ==

[issue10098] intermittent failure in test_os

2010-10-14 Thread Antoine Pitrou
New submission from Antoine Pitrou : The Windows 7 buildbot sometimes shows a failure in test_os: test test_os failed -- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_os.py", line 1080, in test_CTRL_BREAK_EVEN

[issue10093] Warn when files are not explicitly closed

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: There is a slight issue with warnings, and that's the filtering by module/location. Since these warnings will occur in destructors, they can appear at any point without being related to the code being executed. The "default" filtering method (

[issue10093] Warn when files are not explicitly closed

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Does this work also for sockets? Not with the current implementation. I guess this could be added, but then I would have to make the warning method ("_dealloc_warn") public on IO classes. -- ___ P

[issue10093] Warn when files are not explicitly closed

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is an updated patch using warnings (RuntimeWarning for now) and also warning about unclosed sockets. -- Added file: http://bugs.python.org/file19231/deallocwarn2.patch ___ Python tracker <h

[issue7516] Flag "-3" is silently ignored when running "regrtest.py -j2"

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed in r85471. -- nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 2.6 ___ Python tracker <http://bugs.python.o

[issue8998] add crypto routines to stdlib

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I've been in touch with the copyright holders of pyOpenSSL and they > all were positive about contributing the code to the PSF under a > contributor agreement. > So how should we go about this ? Open a new ticket ? I would like to see public

[issue8998] add crypto routines to stdlib

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > This sounds a bit ridiculous. Why not add the crypto routines directly > > to the stdlib? > > To make those routines available to a broader audience and to > get more user feedback. Sure. But it can be any standalone package, not

[issue8998] add crypto routines to stdlib

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The APIs should probably be discussed on the Python crypto or > pyOpenSSL list and the discussion about its integration into the > stdlib on either the python-dev or the stdlib list. If the target goal is stdlib inclusion, the APIs should be dis

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed in r85480, thanks! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue10104] test_socket failures on Debian unstable

2010-10-14 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is following r85480 (issue #7523). It seems the Debian unstable system on one of the buildbots has SOCK_NONBLOCK and SOCK_CLOEXEC, but doesn't support creating sockets using these

[issue10104] test_socket failures on Debian unstable

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the research. Given that it only happens on Debian unstable, and it only happens if you explicitly use SOCK_{CLOEXEC,NONBLOCK}, I would vote for not adding a workaround until some supported OS also exhibits the issue

[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Er, this patch is horrible. You should fix the generic bug, not workaround it on your particular environment. The test still fails with NO_PROXY: $ NO_PROXY=1 ./python -m test.regrtest test_urllib [1/1] test_urllib Warning -- os.environ was modified by

[issue10094] test_urllib.py fails in py3k r85440 with RuntimeError

2010-10-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed in r85489, please backport. -- versions: -Python 3.2 ___ Python tracker <http://bugs.python.org/issue10094> ___ ___ Pytho

<    15   16   17   18   19   20   21   22   23   24   >