[issue6056] socket.setdefaulttimeout affecting multiprocessing Manager
Derek Wilson jderekwil...@gmail.com added the comment: While having multiprocessing use a timeout would be great, I didn't really have the time to fiddle with the c code. Instead of using the socket timeout, I'm modifying all the sockets created by the socket module to have no timeout (and thus to be blocking) which makes the multiprocessing module 'immune' to the socket module's default timeout. For testing, I just run the test suite twice, once with the initial default socket timeout and once with a 60 second timeout. Nothing there failed with this issue. It is worth noting, however, that when using a default socket timeout, for some reason processes that have have put data into a queue no longer block at exit waiting for the data to be consumed. I'm not sure if there is some additional cleanup code that uses sockets and might need to block? Or maybe whatever the issue was with blocking sockets is not an issue with non-blocking sockets? -- keywords: +patch Added file: http://bugs.python.org/file22376/mpsock.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6056 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12345] Add math.tau
Raymond Hettinger raymond.hettin...@gmail.com added the comment: -1 -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12346] Python 2.7.2 source code build (release) depends on mercurial
New submission from Graeme Winter xia2.supp...@gmail.com: Trying to build 2.7.2 from source on RHEL5 32 bit get errors: gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE \ -DSVNVERSION=\`LC_ALL=C svnversion .`\ \ -DHGVERSION=\`LC_ALL=C hg id -i .`\ \ -DHGTAG=\`LC_ALL=C hg id -t .`\ \ -DHGBRANCH=\`LC_ALL=C hg id -b .`\ \ -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c hg identify: option -i not recognized hg identify: option -t not recognized hg identify: option -b not recognized ./Modules/getbuildinfo.c: In function ‘Py_GetBuildInfo’: ./Modules/getbuildinfo.c:45: error: missing terminating character ./Modules/getbuildinfo.c:45: error: expected expression before ‘)’ token ./Modules/getbuildinfo.c:46: error: missing terminating character ./Modules/getbuildinfo.c:46: error: missing terminating character ./Modules/getbuildinfo.c:47: error: missing terminating character ./Modules/getbuildinfo.c:47: error: missing terminating character ./Modules/getbuildinfo.c:53: error: ‘buildinfo’ undeclared (first use in this function) ./Modules/getbuildinfo.c:53: error: (Each undeclared identifier is reported only once ./Modules/getbuildinfo.c:53: error: for each function it appears in.) ./Modules/getbuildinfo.c: In function ‘_Py_hgversion’: ./Modules/getbuildinfo.c:72: error: missing terminating character ./Modules/getbuildinfo.c:72: warning: ‘return’ with no value, in function returning non-void ./Modules/getbuildinfo.c: In function ‘_Py_hgidentifier’: ./Modules/getbuildinfo.c:79: error: missing terminating character ./Modules/getbuildinfo.c:79: error: expected expression before ‘;’ token ./Modules/getbuildinfo.c:83: error: missing terminating character ./Modules/getbuildinfo.c:83: error: expected expression before ‘;’ token make: *** [Modules/getbuildinfo.o] Error 1 gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE \ -DSVNVERSION=\`LC_ALL=C svnversion .`\ \ -DHGVERSION=\`LC_ALL=C hg id -i .`\ \ -DHGTAG=\`LC_ALL=C hg id -t .`\ \ -DHGBRANCH=\`LC_ALL=C hg id -b .`\ \ -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c hg identify: option -i not recognized hg identify: option -t not recognized hg identify: option -b not recognized ./Modules/getbuildinfo.c: In function ‘Py_GetBuildInfo’: ./Modules/getbuildinfo.c:45: error: missing terminating character ./Modules/getbuildinfo.c:45: error: expected expression before ‘)’ token ./Modules/getbuildinfo.c:46: error: missing terminating character ./Modules/getbuildinfo.c:46: error: missing terminating character ./Modules/getbuildinfo.c:47: error: missing terminating character ./Modules/getbuildinfo.c:47: error: missing terminating character ./Modules/getbuildinfo.c:53: error: ‘buildinfo’ undeclared (first use in this function) ./Modules/getbuildinfo.c:53: error: (Each undeclared identifier is reported only once ./Modules/getbuildinfo.c:53: error: for each function it appears in.) ./Modules/getbuildinfo.c: In function ‘_Py_hgversion’: ./Modules/getbuildinfo.c:72: error: missing terminating character ./Modules/getbuildinfo.c:72: warning: ‘return’ with no value, in function returning non-void ./Modules/getbuildinfo.c: In function ‘_Py_hgidentifier’: ./Modules/getbuildinfo.c:79: error: missing terminating character ./Modules/getbuildinfo.c:79: error: expected expression before ‘;’ token ./Modules/getbuildinfo.c:83: error: missing terminating character ./Modules/getbuildinfo.c:83: error: expected expression before ‘;’ token make: *** [Modules/getbuildinfo.o] Error 1 Would assume it is bad form for a release source bundle to depend on mercurial? Diffs against version of getbuildinfo.c from 2.7.1 indicate that this is a new dependency: $ find . -name 'getbuildinfo.c' | xargs diff -u --- ./Python-2.7.2/Modules/getbuildinfo.c 2011-06-11 16:46:27.0 +0100 +++ ./Python-2.7.1/Modules/getbuildinfo.c 2010-05-09 15:46:46.0 +0100 @@ -28,30 +28,15 @@ #define SVNVERSION $WCRANGE$$WCMODS?M:$ #endif -/* XXX Only unix build process has been tested */ -#ifndef HGVERSION -#define HGVERSION -#endif -#ifndef HGTAG -#define HGTAG -#endif -#ifndef HGBRANCH -#define HGBRANCH -#endif - const char * Py_GetBuildInfo(void) { -static char buildinfo[50 + sizeof(HGVERSION) + - ((sizeof(HGTAG) sizeof(HGBRANCH)) ? - sizeof(HGTAG) : sizeof(HGBRANCH))]; -const char *revision = _Py_hgversion(); +static char buildinfo[50]; +const char *revision = Py_SubversionRevision(); const char *sep = *revision ? : : ; -const char *hgid = _Py_hgidentifier(); -if (!(*hgid)) -hgid = default; +const char *branch = Py_SubversionShortBranch();
[issue12313] make install misses packaging module
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: It's not packaging-related, but other directories are also missing from LIBSUBDIRS: test/test_email test/test_email/data IMO it's not ideal to use find(1), as in theory a developer may have some directories with matching names in the source build that they don't want installed - or would that be a no-no? Ideally at least one buildbot should be set up to install and then test the new installation - I presume this error wasn't caught on the buildbots as they all test source builds? -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] A kind of 'reinitialize_command' function which can initialize a command with key-value pair should be added for Command class
Changes by higery shoulderhig...@gmail.com: -- hgrepos: +28 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12313] make install misses test dirs for packaging and email modules
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- nosy: +r.david.murray title: make install misses packaging module - make install misses test dirs for packaging and email modules ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12345] Add math.tau
Nick Coghlan ncogh...@gmail.com added the comment: The golden ratio is more commonly denoted with phi (although tau does get used sometimes). Popularity isn't the point though, it's the fact that tau *makes geometric sense* in ways that 2*pi doesn't. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12346] Python 2.7.2 source code build (release) depends on mercurial
Graeme Winter xia2.supp...@gmail.com added the comment: Some more information: It has picked up that I have mercurial installed: [gw56@ws050 Python-2.7.2_cci]$ cat config.log | grep HG ac_cv_prog_HAS_HG=found HAS_HG='found' HGBRANCH='hg id -b $(srcdir)' HGTAG='hg id -t $(srcdir)' HGVERSION='hg id -i $(srcdir)' however it happens to be rather an old version: [gw56@ws050 Python-2.7.2_cci]$ hg --version Mercurial Distributed SCM (version 0.9.3) Copyright (C) 2005, 2006 Matt Mackall m...@selenic.com This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. so does not recognise the command-line options that you are using. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12345] Add math.tau
STINNER Victor victor.stin...@haypocalc.com added the comment: I like this issue number, but I don't think that Python needs this new constant: it's trivial to add it to your own project. We have pi and e, it's enough. If we begin to add a new constant, others will ask to add much more constants, and there are million of other constants (useful or not). You may want to create a library of some other common constants. You can use float.fromhex() to have a good accuracy. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12345] Add math.tau
Antoine Pitrou pit...@free.fr added the comment: Nick, you just have to write: tau = 2 * math.pi and you're done. there are million of other constants Actually, I've heard there are an infinity of them. -- nosy: +pitrou resolution: - rejected status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12345] Add math.tau
STINNER Victor victor.stin...@haypocalc.com added the comment: Actually, I've heard there are an infinity of them. Can you prove that? -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12345] Add math.tau
Changes by Antoine Pitrou pit...@free.fr: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
Antoine Pitrou pit...@free.fr added the comment: This is not a bug. With a non-blocking socket, the handshake itself is non-blocking, so you have to be prepared to retry. Your snippet also fails under Python 2.6 for me, so this isn't a regression either. If you want to know how to do a non-blocking handshake, see e.g. http://hg.python.org/cpython/file/fd6446a88fe3/Lib/test/test_ssl.py#l632 or (using asyncore) http://hg.python.org/cpython/file/fd6446a88fe3/Lib/test/test_ftplib.py#l299 -- nosy: +pitrou resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
Jesús Cea Avión j...@jcea.es added the comment: I am not getting the error in the handshake. I am getting it when transfering data, after a few Kbytes are already transfered. This code has been working for the last 8 years, including 2.7.1. It is failing now, under 2.7.2. OpenSSL version haven't changed since 2.7.1. So, it is something working under 2.7.1 that is not working under 2.7.2. If you get an error in 2.6, I guess this is somewhat dependent of the OpenSSL version or OS. I am running Ubuntu 10.04, OpenSSL 0.9.8k-7ubuntu8. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
Jesús Cea Avión j...@jcea.es added the comment: I am talking about the code in production, not the code I pasted yesterday. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
Antoine Pitrou pit...@free.fr added the comment: I am not getting the error in the handshake. I am getting it when transfering data, after a few Kbytes are already transfered. Your traceback (and mine as well) occurs in wrap_socket() which itself calls do_handshake(). I don't understand how you could have transferred data *before* the SSL session is established. Or perhaps the test you posted doesn't reflect the actual issue? By the way, faulty non-blocking code can work out of pure luck, if the target server and Internet connection is faster than the local computer... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
Antoine Pitrou pit...@free.fr added the comment: Ah, ok, looks like your messages crossed each other. Can you try to devise another test case, then? Or, at least, explain the context and how and where it fails? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
Jesús Cea Avión j...@jcea.es added the comment: Protecting my reads retrying when getting this exception does the trick, but now my code is convoluted and never before I had to manage this directly. This worked fine in 2.7.1. Previously Python seemed to do the retry itself. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
Antoine Pitrou pit...@free.fr added the comment: Note: the only significant changes in the ssl module on branch 2.7 have been 742d73a99425 and 7f99ac53014a. Protecting my reads retrying when getting this exception does the trick, but now my code is convoluted and never before I had to manage this directly. This worked fine in 2.7.1. Previously Python seemed to do the retry itself. I'm sure it didn't. I think you were just lucky that you had enough data to satisfy the read. With non-blocking code, by definition you have to be prepared to retry. That's especially true when using SSL, because having bytes available on the socket (as signalled by select()) doesn't mean there's anything to read on the SSL layer (for example, the bytes may not form a complete SSL frame). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12345] Add math.tau
Benjamin Peterson benja...@python.org added the comment: 2011/6/16 STINNER Victor rep...@bugs.python.org: STINNER Victor victor.stin...@haypocalc.com added the comment: Actually, I've heard there are an infinity of them. Can you prove that? Don't have to. Axiom of infinity. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
Jesús Cea Avión j...@jcea.es added the comment: I have write a testcase, but adding a small delay between reads, allowing more data coming from the server, solves the issue, so this seems to be a race condition. Trying with a remote slow SSL server, I get the same error in python 2.6, so I guess I was being lucky for the last 8 years :-/. Pitrou, just confirm me that I must catch retry the exception in all my READ/WRITE, not only in the handshake. Thanks, and sorry for wasting your time. I know about this SSL details, but my code worked just fine until 2.7.2... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
STINNER Victor victor.stin...@haypocalc.com added the comment: It's maybe because Python 2.7.2 is faster/slower? :-) -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
Jesús Cea Avión j...@jcea.es added the comment: Antoine, now I am worried about writes, since my usual aproach would be something like this: select says that it is Ok to try to write buf = buf[socket.send(buf):] If now I can get a retry while writing, what is the logic?. Does Python retry automatically, internally?. Do I get a frame worth of ack and then the exception (in the next loop iteration), garanteeing nothing was written, or what?. I think SSL module documentation should write down this captchas when using non-blocking sockets. That is, that read/write can raise exceptions even if select was OK. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12341] Some additions to .hgignore
Éric Araujo mer...@netwok.org added the comment: See also #12255. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12341 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read)
Antoine Pitrou pit...@free.fr added the comment: If now I can get a retry while writing, what is the logic?. Does Python retry automatically, internally?. No, Python doesn't retry automatically. You have to call send() again with the same buffer. (if Python retried, it would make non-blocking calls blocking) Also, the args[0] of the SSL error tells you what the SSL layer is blocking on (SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE). Also, with the current setup, non-blocking write() will never succeed with a partial write. See issue12197. (that doesn't mean nothing is written on the network, though. OpenSSL may start emitting bytes and keep track internally of what remains to be sent. The OpenSSL documentation isn't very clear on that, IIRC) I think SSL module documentation should write down this captchas when using non-blocking sockets. That is, that read/write can raise exceptions even if select was OK. Agreed. Relatedly, there's issue10084 for SSL support in asyncore. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12343] ssl documentation needs comments about non-blocking behaviour
Antoine Pitrou pit...@free.fr added the comment: So let's turn this into a documentation issue, then. -- assignee: - docs@python components: +Documentation, Library (Lib) -Extension Modules nosy: +docs@python priority: critical - normal resolution: invalid - status: closed - open title: Python 2.7.2 regression: ssl.SSLError: [Errno 2] _ssl.c:503: The operation did not complete (read) - ssl documentation needs comments about non-blocking behaviour versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] A kind of 'reinitialize_command' function which can initialize a command with key-value pair should be added for Command class
Éric Araujo mer...@netwok.org added the comment: As I told in another message, we have renamed the function to get_reinitialized_command, to make it consistent with other methods’ names. Instead of adding a function, can you update the existing one? About the repository: You should not put the user in the URI. Can you fix it? The “Create Patch” button doesn’t worK. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
Changes by Éric Araujo mer...@netwok.org: -- hgrepos: +29 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
Changes by Éric Araujo mer...@netwok.org: -- keywords: +patch Added file: http://bugs.python.org/file22377/aa68d35988bb.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12347] add an extras in packaging.pypi.simple.Crawler
New submission from Tarek Ziadé ziade.ta...@gmail.com: It occurs to me that our Crawler don't allow us to specify extra locations, like easy_install or pypi We should add that and let the crawler look up to these places because the index -- messages: 138439 nosy: alexis, tarek priority: normal severity: normal status: open title: add an extras in packaging.pypi.simple.Crawler versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12197] non-blocking SSL write fails if a partial write was issued
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12197 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12346] Python 2.7.2 source code build (release) depends on mercurial
R. David Murray rdmur...@bitdance.com added the comment: It used to be that the svn version info was pulled from embedded constants in Makefile.pre.in. I agree that depending on having mercurial (and, presumably, a repo!) at build time is wrong. These constants need to be pre-computed when a release tarball is built and the mercurial dependency removed from the generated Makefile. I'm not sure how we make that work correctly in a development build, but I'm sure the release managers will figure something out. -- nosy: +benjamin.peterson, georg.brandl, r.david.murray priority: normal - release blocker stage: - needs patch versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12347] add an extras in packaging.pypi.simple.Crawler
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8240 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8222] enabling SSL_MODE_AUTO_RETRY on SSL sockets
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12328] multiprocessing's overlapped PipeConnection on Windows
sbt shibt...@gmail.com added the comment: Hmm, it seems to me that it should be done in _poll() instead. Otherwise, recv() will not be interruptible, will it? Or maybe WaitForMultipleObjects() should be changed to also wait on sigint_event if called by the main thread. Also, after looking at this again, it seems sigint_event would be better provided (at the C level) by the Python core, e.g. as _PyOS_SigintEvent. The time module already uses a similar mechanism. By setting the event in the sigint handler itself, rather than in an auxiliary HandlerRoutine callback function, it should also ensure that, when the event is set, the tripped bit in signalmodule.c has been set, meaning we wouldn't need to Sleep() anymore. (I also wonder why the event isn't auto-reset. Otherwise, there's a race condition - which is probably harmless in most cases, but still.) If it is an auto-reset event then we must worry about a non-main thread stealing the event. Maybe _PyOS_SigintEvent() should return NULL if called by a non-main thread, and be documented with a loud usage warning. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12328 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12346] Python 2.7.2 source code build (release) depends on mercurial
R. David Murray rdmur...@bitdance.com added the comment: Indeed, I just confirmed that building with a recent version of mercurial installed from the release 2.7.2 source tarball from python.org, the make results in: abort: repository . not found! abort: repository . not found! abort: repository . not found! during the build of getbuildinfo.c. Fortunately the only effect seems to be that sys._mercurial returns ('CPython, '', '') instead of the correct info. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12313] make install misses test dirs for packaging and email modules
R. David Murray rdmur...@bitdance.com added the comment: Fixing the missing dirs for email has been on my todo list for a while but obviously hasn't gotten done yet. I talked with Antoine about setting up a buildbot that tested an installed version, but I'm not sure when I'll get around to trying *that* either. And in any case, even that would not have caught the test_email omission, since rergrtest uses filename-based discovery to select the tests to run, so it would not have noticed that test_email was missing. I suppose that is a disadvantage of having regrtest recognize test packages. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
Peter Waller peter.wal...@gmail.com added the comment: Hi - Great to see this functionality coming. There is one feature of it that I would really like to see fixed, which is currently broken in setuptools/distribute - I'm sorry if this is the wrong forum for this note, but I wanted to add it to the discussion somewhere. That feature is the package_dir argument to setup(). If the sources aren't in the root directory, the package doesn't function correctly with `python setup.py develop` Here is a reference to an issue filed against distribute: https://bitbucket.org/tarek/distribute/issue/177/setuppy-develop-doesnt-support-package_dir-arg-to Is there any possibility of seeing this work correctly? A lot of packages use it, and for them, `develop` is currently broken. Apologies if this feature is implemented and I missed it, but I see no reference to package_dir in the patch, so I would be (pleasantly) surprised if it was implemented. I would be happy to provide a testcase on request. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12346] Python 2.7.2 source code build (release) depends on mercurial
R. David Murray rdmur...@bitdance.com added the comment: Ah. For subversion there was a similar check, and the values were set to blank if the subversion binary was not found. For hg it looks like we need to add additional checks on whether or not there is a repo. (We can probably assume that if there is a repo the correct version of mercurial is installed). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9302] distutils API Reference: setup() and Extension parameters' description not correct.
Éric Araujo mer...@netwok.org added the comment: FYI, in one packaging doc I added one note instead of changing each cell: http://docs.python.org/dev/library/packaging.compiler#id6 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
Éric Araujo mer...@netwok.org added the comment: Yes, this should of course be supported. Note that in packaging, packages_dir has been simplified to packages_root, which means that all modules and packages must be in the same directory. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5572] distutils ignores the LIBS configure env var
Éric Araujo mer...@netwok.org added the comment: Reclassifying as a feature request for the packaging module. The distutils docs don’t say using LIBS is supported and there aren’t many people asking for it on this bug report. -- components: +Distutils2 -Distutils nosy: +alexis, eric.araujo versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5572 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12348] case sensitivness in packaging.pypi.simple.Crawler
New submission from Tarek Ziadé ziade.ta...@gmail.com: the PyPI server deals with the package names case issue: if you get webob, it'll find WebOb. That's not true for mirrors, so we need to fallback to the global index when webob is not found under simple/webob/, and look for the name with a different case. -- messages: 138449 nosy: alexis, tarek priority: high severity: normal status: open title: case sensitivness in packaging.pypi.simple.Crawler type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12348 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9302] distutils API Reference: setup() and Extension parameters' description not correct.
ysj.ray ysj@gmail.com added the comment: FYI, in one packaging doc I added one note instead of changing each cell: http://docs.python.org/dev/library/packaging.compiler#id6 I like this solution, it seems more concise and to the point. With this the doc need only one change: --- a/Doc/distutils/apiref.rst Fri Apr 29 14:07:28 2011 +0800 +++ b/Doc/distutils/apiref.rst Thu Jun 16 23:15:12 2011 +0800 @@ -85,15 +85,15 @@ | *script_args* | Arguments to supply to the | a list of strings | || setup script | | +++-+ - | *options* | default options for the setup | a string | + | *options* | default options for the setup | a dictionary | || script | | +++-+ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9302] distutils API Reference: setup() and Extension parameters' description not correct.
Éric Araujo mer...@netwok.org added the comment: Thanks for your feedback. My patch assumes that people will understand that an argument that has a plural name (like macros) can’t be a string but a list of strings; I don’t know if relying on this inference is better than your initial patch. An alternate style that I saw somewhere is to use “[str]” to describe a list of strings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12348] case sensitivness in packaging.pypi.simple.Crawler
Tarek Ziadé ziade.ta...@gmail.com added the comment: see also http://mail.python.org/pipermail/catalog-sig/2011-June/003793.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12348 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] A kind of 'reinitialize_command' function which can initialize a command with key-value pair should be added for Command class
higery shoulderhig...@gmail.com added the comment: But can the get_reinitialized_command function reinitialize a command with a key-value pair? e.g. reinitialize_command('build_ext', inplace=1) BTW,how to set the repository URI? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] Add **kwargs to get_reinitialized_command
Éric Araujo mer...@netwok.org added the comment: But can the get_reinitialized_command function reinitialize a command with a key-value pair? No, that’s why I did not close this report but asked you if you could make a patch to update this method. BTW,how to set the repository URI? If there is no way to edit the repo, then just add another one. -- assignee: tarek - eric.araujo title: A kind of 'reinitialize_command' function which can initialize a command with key-value pair should be added for Command class - Add **kwargs to get_reinitialized_command ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12328] multiprocessing's overlapped PipeConnection on Windows
Antoine Pitrou pit...@free.fr added the comment: Hmm, it seems to me that it should be done in _poll() instead. Otherwise, recv() will not be interruptible, will it? Or maybe WaitForMultipleObjects() should be changed to also wait on sigint_event if called by the main thread. Indeed, this may be even better. If it is an auto-reset event then we must worry about a non-main thread stealing the event. Maybe _PyOS_SigintEvent() should return NULL if called by a non-main thread, and be documented with a loud usage warning. You are right, we need a manual reset *or* we must ensure that every user of _PyOS_SigintEvent only does so from the main thread. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12328 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12341] Some additions to .hgignore
Sandro Tosi sandro.t...@gmail.com added the comment: Awesome, in a 3 line patch I managed to add an error... nice :) -- Added file: http://bugs.python.org/file22378/hgignore_additions-default-v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12341 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9302] distutils API Reference: setup() and Extension parameters' description not correct.
R. David Murray rdmur...@bitdance.com added the comment: I would not read [str] as implying a list of strings, FWIW. Nor would I assume a plural option meant a list if the text says a string. But I'm just a bystander here and haven't even looked the docs you guys are updating :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9302] distutils API Reference: setup() and Extension parameters' description not correct.
Éric Araujo mer...@netwok.org added the comment: Nor would I assume a plural option meant a list if the text says a string. Especially in distutils code where we can get space-separated or comma-separated values from the command line or config files. I’m in favor of using explicit “list of strings” wording now. ysj.ray, I understand from the “Done” comments on the review page that you have an updated patch somewhere; please upload and I’ll commit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] Add **kwargs to get_reinitialized_command
higery shoulderhig...@gmail.com added the comment: No, that’s why I did not close this report but asked you if you could make a patch to update this method. OK, I think I can try to fix it later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
Changes by Éric Araujo mer...@netwok.org: -- dependencies: +Add **kwargs to get_reinitialized_command ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5572] distutils ignores the LIBS configure env var
Collin Winter coll...@gmail.com added the comment: This wasn't so much a feature request as a request for review. I had already implemented the necessary changes and provided a patch. We found this change necessary when working on Unladen Swallow. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5572 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5575] Add env vars for controlling building sqlite, hashlib and ssl
Collin Winter coll...@gmail.com added the comment: I don't know that the variables are Python-specific. We used these variables to build various Python modules statically against the versions of openssl and sqlite maintained in Google's internal third-party repository. -- assignee: collinwinter - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12341] Some additions to .hgignore
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12341 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12313] make install misses test dirs for packaging and email modules
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Perhaps not in the general case, but I found the missing test_email and test_email/data through running regrtest using an installed Python 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
Santoso Wijaya santoso.wij...@gmail.com added the comment: As for the memory at %p string, when _io.BufferedWriter prepares the byte buffer into a PyMemoryView wrapper and passes it into the raw IO object: res = PyObject_CallMethodObjArgs(self-raw, _PyIO_str_write, memobj, NULL); For some reason, memobj.__repr__ is called before being passed to the raw IO's write method. I can't reproduce this odd behavior using a dumb raw IO that extends _io.RawIOBase. Mimicking what pyserial does, however, reproduces both issues (see attached). -- Added file: http://bugs.python.org/file22379/test_bufio.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
Santoso Wijaya santoso.wij...@gmail.com added the comment: Note: Removing threading call (lock acquire, release) would remove the crash, but still triggers the memory at %p conversion of PyMemoryView. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
Changes by Santoso Wijaya santoso.wij...@gmail.com: Added file: http://bugs.python.org/file22380/test_bufio_nothreading.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12349] Typo in 3.2 What's New: WGSI / WSGI
New submission from Sandro Tosi sandro.t...@gmail.com: Following up http://mail.python.org/pipermail/docs/2011-June/004729.html, here's a patch to correct the WGSI/WSGI typo in 3.2 What's new (to be applied in 3.2 and default). -- assignee: docs@python components: Documentation files: 3.2_whatsnew_WSGI-3.2.patch keywords: patch messages: 138465 nosy: docs@python, sandro.tosi priority: low severity: normal stage: patch review status: open title: Typo in 3.2 What's New: WGSI / WSGI versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22381/3.2_whatsnew_WSGI-3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
Santoso Wijaya santoso.wij...@gmail.com added the comment: If `write(self, data)` is expected to receive `data` as a memoryview object, then it's up to pyserial to use `data.tobytes()` instead of `bytes(data)`, though this does not seem to be documented in the io module doc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12350] Improve stat_result.st_blocks and st_blksize documentation
New submission from Lars Wirzenius l...@liw.fi: Attached patch adds a few words to the os.stat documentation for the st_blocks and st_blksize fields to clarify them. -- assignee: docs@python components: Documentation files: stat_result.patch keywords: patch messages: 138467 nosy: docs@python, liw priority: normal severity: normal status: open title: Improve stat_result.st_blocks and st_blksize documentation versions: Python 2.7 Added file: http://bugs.python.org/file22382/stat_result.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12350] Improve stat_result.st_blocks and st_blksize documentation
R. David Murray rdmur...@bitdance.com added the comment: Looks good for linux. Do you have a posix reference that confirms this interpretation? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12313] make install misses test dirs for packaging and email modules
R. David Murray rdmur...@bitdance.com added the comment: Ah. I wouldn't have expected that. For my information, what was the error you got? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12351] Update URL for pycrypto project
New submission from Sandro Tosi sandro.t...@gmail.com: Following up http://mail.python.org/pipermail/docs/2011-June/004728.html, here's a patch (appliable on 2.7, 3.1, 3.2 and default) to update the pycrypto URL to its new home. -- assignee: docs@python components: Documentation files: pycrypto_new_url-2.7.patch keywords: patch messages: 138470 nosy: docs@python, sandro.tosi priority: low severity: normal stage: patch review status: open title: Update URL for pycrypto project versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22383/pycrypto_new_url-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12351 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12350] Improve stat_result.st_blocks and st_blksize documentation
Lars Wirzenius l...@liw.fi added the comment: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html says A file system-specific preferred I/O block size for this object. In some file system types, this may vary from file to file., which says essentially the same as the Linux stat(2) manpage from which I copied the extra words. The same page claims that st_blocks may use other units than 512 byte blocks, but that seems to be quite rare. GNU coreutils sources claim HP-UX and AIX PS/2 have non-512 blocks. Perhaps it would be better to indicate how to find out the block size? (Since st_blksize is not it, but that's an easy assumption to make.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses
David Watson bai...@users.sourceforge.net added the comment: On Sun 12 Jun 2011, Charles-François Natali wrote: The patches look good to me, except that instead of passing (addrlen buflen) ? buflen : addrlen as addrlen argument every time makesockaddr is called, I'd prefer if this min was done inside makesockaddr itself, i.e. perform min(addrlen, sizeof(struct sockaddr_un)) in the AF_UNIX switch case (especially since addrlen is only used for AF_UNIX). Actually, I think it should be clamped at the top of the function, since the branch for unknown address families ought to use the length as well (it doesn't, but that's a separate issue). I'm attaching new patches to do the check in makesockaddr(), which also change the length parameters from int to socklen_t, in case the OS returns a really huge value. I'm also attaching new return-unterminated patches to handle the possibility that addrlen is unsigned (socklen_t may be unsigned, and addrlen *is* now unsigned in 3.x). This entailed specifying what to do if addrlen offsetof(struct sockaddr_un, sun_path), i.e. if the address is truncated at least one byte before the start of sun_path. This may well never happen (Python's existing code would raise SystemError if it did, due to calling PyString_FromStringAndSize() with a negative length), but I've made the new patches return None if it does, as None is already returned if addrlen is 0. As another precedent of sorts, Linux currently returns None (i.e. addrlen = 0) when receiving a datagram from an unbound Unix socket, despite returning an empty string (i.e. addrlen = offsetof(..., sun_path)) for the same unbound address in other situations. (I think the decoders for other address families should also return None if addrlen is less than the size of the appropriate struct, but again, that's a separate issue.) Also, I noticed that on Linux, Python 3.x currently returns empty addresses as bytes objects rather than strings, whereas the patches I've provided make it return strings. In case this change isn't acceptable for the 3.x maintenance branches, I'm attaching return-unterminated-3.x-maint-new.diff which still returns them as bytes (on Linux only). To sum up the patch order: 2.x: linux-pass-unterminated-4spc.diff test-2.x-new.diff return-unterminated-2.x-new.diff addrlen-makesockaddr-2.x.diff (or addrlen-2.x-4spc.diff) 3.2: linux-pass-unterminated-4spc.diff test-3.x-new.diff return-unterminated-3.x-maint-new.diff addrlen-makesockaddr-3.x.diff (or addrlen-3.x-4spc.diff) default: linux-pass-unterminated-4spc.diff test-3.x-new.diff return-unterminated-3.x-trunk-new.diff addrlen-makesockaddr-3.x.diff (or addrlen-3.x-4spc.diff) -- Added file: http://bugs.python.org/file22384/addrlen-makesockaddr-2.x.diff Added file: http://bugs.python.org/file22385/addrlen-makesockaddr-3.x.diff Added file: http://bugs.python.org/file22386/return-unterminated-2.x-new.diff Added file: http://bugs.python.org/file22387/return-unterminated-3.x-maint-new.diff Added file: http://bugs.python.org/file22388/return-unterminated-3.x-trunk-new.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8372 ___If accept(), etc. return a larger addrlen than was supplied, ignore it and use the original buffer length. diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -969,13 +969,22 @@ makebdaddr(bdaddr_t *bdaddr) /*ARGSUSED*/ static PyObject * -makesockaddr(int sockfd, struct sockaddr *addr, int addrlen, int proto) +makesockaddr(int sockfd, struct sockaddr *addr, socklen_t addrlen, + socklen_t buflen, int proto) { if (addrlen == 0) { /* No address -- may be recvfrom() from known socket */ Py_INCREF(Py_None); return Py_None; } +/* buflen is the length of the buffer containing the address, and + addrlen is either the same, or is the length returned by the OS + after writing an address into the buffer. Some systems return + the length they would have written if there had been space + (e.g. when an oversized AF_UNIX address has its sun_path + truncated). */ +if (addrlen buflen) +addrlen = buflen; #ifdef __BEOS__ /* XXX: BeOS version of accept() doesn't set family correctly */ @@ -1632,6 +1641,7 @@ sock_accept(PySocketSockObject *s) sock_addr_t addrbuf; SOCKET_T newfd; socklen_t addrlen; +socklen_t buflen; PyObject *sock = NULL; PyObject *addr = NULL; PyObject *res = NULL; @@ -1639,6 +1649,7 @@ sock_accept(PySocketSockObject *s) if (!getsockaddrlen(s, addrlen)) return NULL; +buflen = addrlen; memset(addrbuf, 0, addrlen); #ifdef MS_WINDOWS @@ -1680,7 +1691,7 @@ sock_accept(PySocketSockObject *s) goto finally; } addr = makesockaddr(s-sock_fd, SAS2SA(addrbuf), -
[issue1602133] non-framework built python fails to define environ properly
John Whitney jjwhit...@gmail.com added the comment: I have also been experiencing this problem with _environ (using the latest Python - 2.7.2), and this patch works great. I'd love to see it committed so that I don't have to patch Python. -- nosy: +jjw ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12350] Improve stat_result.st_blocks and st_blksize documentation
R. David Murray rdmur...@bitdance.com added the comment: Ah, bingo. That was what was tickling at my memory but I couldn't remember what the exact issue was I was recalling. I forget what I was doing where that mattered, but as I vaguely remember it there is no portable way to find out what blocksize st_blocks is in. Or at least not one that is currently exposed from Python. I could be remembering wrong, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12350] Improve stat_result.st_blocks and st_blksize documentation
R. David Murray rdmur...@bitdance.com added the comment: Ah, found it: Issue 10016. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12350] Improve stat_result.st_blocks and st_blksize documentation
Changes by R. David Murray rdmur...@bitdance.com: -- versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9344] please add posix.getgrouplist()
R. David Murray rdmur...@bitdance.com added the comment: Actually, when it is a feature request rather than a bug fix we usually use 'accepted'. It doesn't matter a whole lot, though. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8887] pydoc str works but not pydoc str.translate
Changes by R. David Murray rdmur...@bitdance.com: -- title: “pydoc str” works but not “pydoc str.translate” - pydoc str works but not pydoc str.translate ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8887 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12313] make install misses test dirs for packaging and email modules
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: R. David Murray rdmur...@bitdance.com added the comment: Ah. I wouldn't have expected that. For my information, what was the error you got? [ 99/356] test_email test test_email crashed -- Traceback (most recent call last): File regrtest.py, line 1036, in runtest_inner ImportError: No module named 'test_email' From the full test results at https://gist.github.com/1022705/45fa6992c25197a3c9f6281fc645da94dcc5feae N.B. I have now fixed the error in my fork, you can see the change I made here: https://bitbucket.org/vinay.sajip/pythonv/compare/..mirror/cpython#chg-Makefile.pre.in Regards, Vinay Sajip -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12345] Add math.tau
Changes by Simon Baird simon.ba...@gmail.com: -- nosy: +sbaird ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later
STINNER Victor victor.stin...@haypocalc.com added the comment: Patch version 5 fixes the encode/decode flags on Windows XP. The codecs give different result on XP and Seven in some cases: Seven: - b'\x81\x00abc'.decode('cp932', 'replace') returns '\u30fb\x00abc' - '\udc80'.encode(CP_UTF8, 'strict') raises UnicodeEncodeError - b'[\xed\xb2\x80]'.decode(CP_UTF8, 'strict') raises UnicodeEncodeError - b'[\xed\xb2\x80]'.decode(CP_UTF8, 'ignore') returns '[]' - b'[\xed\xb2\x80]'.decode(CP_UTF8, 'replace') returns '[\ufffd\ufffd\ufffd]' XP: - b'\x81\x00abc'.decode('cp932', 'replace') returns '\x00\x00abc' - '\udc80'.encode(CP_UTF8, 'strict') returns b'\xed\xb2\x80' - b'[\xed\xb2\x80]'.decode(CP_UTF8, 'strict') returns '[\udc80]' These differences come from Windows codecs. -- Added file: http://bugs.python.org/file22389/mbcs5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12351] Update URL for pycrypto project
Roundup Robot devnull@devnull added the comment: New changeset 0cb49ca95109 by Benjamin Peterson in branch '2.7': update link to pycrypto (closes #12351) http://hg.python.org/cpython/rev/0cb49ca95109 New changeset 4d465cef3257 by Benjamin Peterson in branch '3.2': update link to pycrypto (closes #12351) http://hg.python.org/cpython/rev/4d465cef3257 -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12351 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What is the use of these code_page_encode() functions? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later
STINNER Victor victor.stin...@haypocalc.com added the comment: TODO: add more tests CP_UTF8: if self.vista_or_later: tests.append(('\udc80', 'strict', None)) tests.append(('\udc80', 'ignore', b'')) tests.append(('\udc80', 'replace', b'\xef\xbf\xbd')) else: tests.append(('\udc80', 'strict', b'\xed\xb2\x80')) cp1252: ('\u0141', 'strict', None), ('\u0141', 'ignore', b''), ('\u0141', 'replace', b'L'), -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12320] test_packaging failures
STINNER Victor victor.stin...@haypocalc.com added the comment: See also: http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.x/builds/1516 http://www.python.org/dev/buildbot/all/builders/sparc%20solaris10%20gcc%203.x/builds/3276 There are many OSError(22, 'Invalid argument: ...') errors on rmdir(). Example: == ERROR: test_cfg_to_args (packaging.tests.test_util.UtilTestCase) -- Traceback (most recent call last): File /home2/buildbot/slave/3.x.loewis-sun/build/Lib/packaging/tests/test_util.py, line 147, in tearDown super(UtilTestCase, self).tearDown() File /home2/buildbot/slave/3.x.loewis-sun/build/Lib/packaging/tests/support.py, line 225, in tearDown super(EnvironRestorer, self).tearDown() File /home2/buildbot/slave/3.x.loewis-sun/build/Lib/packaging/tests/support.py, line 128, in tearDown shutil.rmtree(self._basetempdir, os.name in ('nt', 'cygwin')) File /home2/buildbot/slave/3.x.loewis-sun/build/Lib/shutil.py, line 278, in rmtree rmtree(fullname, ignore_errors, onerror) File /home2/buildbot/slave/3.x.loewis-sun/build/Lib/shutil.py, line 287, in rmtree onerror(os.rmdir, path, sys.exc_info()) File /home2/buildbot/slave/3.x.loewis-sun/build/Lib/shutil.py, line 285, in rmtree os.rmdir(path) OSError: [Errno 22] Invalid argument: '/tmp/tmp2le6q5/tmpg5rur7' -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12313] make install misses test dirs for packaging and email modules
R. David Murray rdmur...@bitdance.com added the comment: OK, now I'm really confused. I tried to reproduce this by installing from my checkout into a work dir, and then running regrtest using that installed python, and discovered that test_email and its data directory got copied by the installation process. (There were test failures, so I'll have to work on that...) This is without any mention of test_email in the Makefile I used to do the 'make install'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later
STINNER Victor victor.stin...@haypocalc.com added the comment: What is the use of these code_page_encode() functions? I wrote them to be able to write tests. We can maybe use them to implement the Python code page codecs using a custom codec register function: see msg138246. Windows codecs seem to be less reliable/portable than Python builtin codecs, they behave differently depending on the Windows version. Windows codecs are maybe faster, I should (write and) run a benchmark. My main concern is to fix error handling of the Python mbcs codec. -- I am also trying to factorize the code in posixmodule.c: I would like to remove the bytes implementation of each function when a function has two implementations (bytes and Unicode) only for Windows. The idea is to decode filenames exactly as Windows do and reuse the Unicode implementation. I don't know yet how Windows do decode bytes filenames (especially how it handles undecodable bytes), I suppose that it uses MultiByteToWideChar using cp=CP_ACP and flags=0. We may patch os.fsdecode() to handle undecodable bytes like Windows does. codecs.code_page_decode() would help this specific idea, except that my current patch doesn't allow to specify directly the flags. replace and ignore error handlers don't behave as flags=0, or at least not in some cases. codecs.code_page_decode() should allow to specific an error handler *or* the flags (mutual exclusive options). Example: def fsdecode(filename): if isinstance(filename, bytes): return codecs.code_page_decode(codecs.CP_ACP, filename, flags=0) elif isinstance(filename, str): return filename else: raise TypeError() -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12313] make install misses test dirs for packaging and email modules
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: OK, now I'm really confused. I tried to reproduce this by installing from my checkout into a work dir, and then running regrtest using that installed python, and discovered that test_email and its data directory got copied by the installation process. (There were test failures, so I'll have to work on that...) This is without any mention of test_email in the Makefile I used to do the 'make install'. That does seem odd. On my pythonv fork (which follows the cpython repo pretty closely), the only current failures are test_lib2to3, test_packaging and test_sysconfig - all of which failures are already the subject of tickets on the tracker. On my system at least, test_email doesn't show up any failures. See the latest version of the test log from the Gist link I posted earlier - the comment also references the failure tickets. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12313 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] Add **kwargs to get_reinitialized_command
Changes by higery shoulderhig...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file22390/6b68c2835d6e.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] Add **kwargs to get_reinitialized_command
higery shoulderhig...@gmail.com added the comment: Not yet tested. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12320] test_packaging failures
R. David Murray rdmur...@bitdance.com added the comment: Victor, that failure was already reported in issue 12333. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9302] distutils API Reference: setup() and Extension parameters' description not correct.
ysj.ray ysj@gmail.com added the comment: I would not read [str] as implying a list of strings, FWIW. help() on distutils.extension.Extension gives the parameters description like this: .. sources: [string] .. include_dirs: [string] .. So I guess this style can be used as somewhere. I’m in favor of using explicit “list of strings” wording now. ysj.ray, I understand from the “Done” comments on the review page that you have an updated patch somewhere; please upload and I’ll commit. Ok, here is it. Thanks! -- Added file: http://bugs.python.org/file22391/issue_9302_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6056] socket.setdefaulttimeout affecting multiprocessing Manager
Derek Wilson jderekwil...@gmail.com added the comment: I was wrong about exit behavior of a process that has put to a queue -- it seems to behave as expected. i had been playing with a proxy to a queue rather than a queue (to which, if you put, the process can exit right away because the actual put happens in the process that owns the queue). I think this works as intended, but lmk. Also, I haven't really played with the tests that much, so that bit could use some review. It hasn't broken anything in any of my real world tests though. Also, have I mentioned that the multiprocessing module is amazing? Cause it is. I sort of feel like antigravity == multiprocessing ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6056 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't know yet how Windows do decode bytes filenames (especially how it handles undecodable bytes), I suppose that it uses MultiByteToWideChar using cp=CP_ACP and flags=0. It's likely, yes. But you don't need a new codec function for this. What about something like .decode('mbcs', errors='windows')? I still don't see the advantage of codecs.code_page_encode(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com