[issue15000] posixsubprocess module broken on x32

2012-06-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Answering my own question I believe x32 is the new ABI being worked on as described in http://lwn.net/Articles/456731/. In that light, your patch makes sense assuming the __ILP32__ define is something gcc's cpp will always be defining when targetin

[issue15000] posixsubprocess module broken on x32

2012-06-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: for reference - https://sites.google.com/site/x32abi/ -- ___ Python tracker <http://bugs.python.org/issue15000> ___ ___ Pytho

[issue15000] _posixsubprocess module broken on x32

2012-06-05 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue15000> ___ ___ Python-bugs-

[issue8865] select.poll is not thread safe

2012-06-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue8865> ___ ___ Python-

[issue15032] Provide a select.select implemented using select.poll

2012-06-07 Thread Gregory P. Smith
New submission from Gregory P. Smith : Many random bits of the standard library were originally written using select.select. This is an ancient API that is available everywhere, but these days you'd be hard pressed to find _any_ system that does not implement the superior poll() API

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-06-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think your approach is fine. BTW for anyone who wants to chase the larger idea of dealing with all select.select use, take a look at the prototype for a select.select() implemented using poll.poll() that I just put in http://bugs.python.org/issue15032

[issue14340] Update embedded copy of expat - fix security & crash issues

2012-06-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks. I still intend to get to this. On Jun 23, 2012 1:59 AM, "Georg Brandl" wrote: > > Georg Brandl added the comment: > > Deferring for beta1 at least. > > -- > priority: rele

[issue15139] Speed up threading.Condition wakeup

2012-06-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue15139> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue15061> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2012-06-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm leaving this open as I still need to audit the write methods and commit the fix(es) for 2.7. I tried to merge the test into test_io's signals tests but I could not get that to actually work to reproduce the original problem so I kept my pro

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2012-06-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm attaching an updated patch for 2.7. It fixes read, readline, readlines and readinto and includes tests. More code auditing for other methods to fix is still needed. -- versions: -Python 3.1 Added file: http://bugs.python.org/file2614

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2012-06-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: The 3.* ubuntu arm buildbot hanging in test_io is very odd. I'm going to undo my supposedly straight forward signal.alarm(...) to signal.setitimer(...) change first to see if that is related. -- ___ P

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2012-06-25 Thread Gregory P. Smith
Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file22258/file-signal-eintr-27.diff ___ Python tracker <http://bugs.python.org/issue12268> ___ ___ Pytho

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2012-06-25 Thread Gregory P. Smith
Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file22262/test_and_fix_readers_3.2-gps02.diff ___ Python tracker <http://bugs.python.org/issue12

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2012-06-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: The uses of fwrite() and fflush() also need this EINTR treatment in 2.7. I haven't checked the write paths in 3.2 yet. Also, the fix change to 3.2's _io module needs backporting to 2.7's _io module for pe

[issue12605] Enhancements to gdb 7 debugging hooks

2012-06-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: Better debuggability FTW! This is an update to Tools/gdb/ as such I'd like to see this make it into 3.3. It doesn't touch the runtime or stdlib so I personally wouldn't consider this "adding a feature" and thus preventing its i

[issue15139] Speed up threading.Condition wakeup

2012-07-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Nope. -- ___ Python tracker <http://bugs.python.org/issue15139> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14340] Update embedded copy of expat - fix security & crash issues

2012-07-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Updated in 3.3 for beta2. I'll leave it up to release managers to decide if they want to apply these updates for future 2.7 and 3.2 releases (trivial, just be sure to keep our one local modification adding the "#define XML_HAS_SET_HASH_SALT&q

[issue14340] Update embedded copy of expat - fix security & crash issues

2012-07-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Reasons why it is a good idea to apply this change to 2.7.4 and 3.2.4: * Memory leak in poolGrow (CVE-2012-1148) * Resource leak in readfilemap.c (CVE-2012-1147) * Buffer over-read and crash in big2_toUtf8 (CVE-2009-3560) * Parser crash with special UTF-8

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-07-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: looking at this now. 2.7 commit first; then i'll forward port to 3.2/3.3. -- assignee: jackdied -> gregory.p.smith ___ Python tracker <http://bugs.python.org

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-07-15 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-07-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: Those should all be fixed as of my most recent commit. -- ___ Python tracker <http://bugs.python.org/issue14635> ___ ___ Pytho

[issue10399] AST Optimization: inlining of function calls

2012-07-18 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue10399> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-07-18 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue11549> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15402] Correct __sizeof__ support for struct

2012-07-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: makes sense for 3.3 as i would consider it a bug. i think it is reasonable for 2.7 and 3.2 as well, it is an actual bug that the value reported to getsizeof on struct.Struct is meaningless. -- nosy: +gregory.p.smith

[issue15468] Edit docs to hide hashlib.md5()

2012-07-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: The only edit that is needed is for md5 to be documented as unavailable when Python has been compiled in FIPS-compliant mode. Most of the world does not and will never use that mode. md5 is still a perfectly good algorithm for many uses and is required

[issue15505] unittest.installHandler incorrectly assumes SIGINT handler is set.

2012-07-30 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith keywords: +needs review nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issu

[issue15468] Edit docs to hide hashlib.md5()

2012-07-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: The always present hashes do use openssl if the openssl version hashlib was compiled against supports them. otherwise it falls back to the builtin C implementations. -- ___ Python tracker <h

[issue15578] Crash when modifying sys.modules during import

2012-08-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue15578> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2012-08-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'd also like a command line flag to override PYTHONPATH (which could also be used in combination with -E so that you could still set the PYTHONPATH while ignoring everything else). I'll file a separate feature request for that. -

[issue15716] Ability to specify the PYTHONPATH via a command line flag

2012-08-16 Thread Gregory P. Smith
New submission from Gregory P. Smith: I'd like a command line flag to override PYTHONPATH. It could also be used in combination with -E so that you could still set the PYTHONPATH while ignoring everything else from the environment. -- messages: 168429 nosy: gregory.p.smith pri

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: -1 on doing this from me. While I don't see it hurting anything when "type(query) is dict" I'd much rather encourage people to write better tests that do not take the lazy way out. Tests that get by comparing a generated string to a

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2012-08-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: easy enough to reproduce... $ ./python.exe -c 'import os, subprocess as s; os.close(0); os.close(1); s.Popen(["/bin/true"])' Traceback (most recent call last): File "", line 1, in File "/Users/gps/python/hg/defau

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2012-08-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: Yes, something along the lines of that patch is what I was thinking. BTW, this is only necessary for the errpipe_write fd. errpipe_read is for the parent process. I'm going to do it within _create_pipe so that the optimal _posixsubprocess.cloexec

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2012-08-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: F_DUPFD_CLOEXEC appears exclusive to modern Linux kernels. Any idea how wide spread support for plain F_DUPFD is? If that is "everywhere" the code I've just whipped up could lose a lot of loops... -- ___

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2012-08-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: Here's my initial fix. If fcntl(errpipe_write, F_DUPFD, 3) is widely available this could be shrunk a bit to avoid the for loop potentially calling dup a few times and tracking the wasted fds to close later. Otherwise if it isn't I'd rather

[issue15810] assertSequenceEqual should be fired when comparing sequence subclasses

2012-08-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: When we added this functionality to assertEqual we were *intentionally* conservative on when it would auto-promote to nicer equality comparison functions. It needs to behave exactly as == would in all situations. >>> (1,2,3) == [1,2,3] False

[issue15756] subprocess.poll() does not handle errno.ECHILD "No child processes"

2012-08-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks! I'll take care of getting this fix in. -- assignee: -> gregory.p.smith ___ Python tracker <http://bugs.python.org

[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read

2012-09-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi - i suspect Python 3.2 and the backport of that to 2.x http://code.google.com/p/python-subprocess32/ do not have this issue. but you didn't give enough information in the bug report for me to know which pipe and which read call you're talkin

[issue15918] subprocess.Popen reads errpipe_read incorrectly, can result in short read

2012-09-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: Yeah, sounds like _eintr_retry_call alone isn't appropriate here in 2.7. I'll fix it. In practice I doubt this matters much as this error string is likely to be less than one page (depends on pathnames involved) but it is still technically in

[issue15756] subprocess.poll() does not handle errno.ECHILD "No child processes"

2012-09-29 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue15756> ___ ___ Python-bugs-

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-09-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: This was fixed in April. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2012-09-29 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- priority: normal -> high ___ Python tracker <http://bugs.python.org/issue12268> ___ ___ Python-bugs-list mailing list Unsubscri

[issue2489] Patch for bugs in pty.py

2012-09-29 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue2489> ___ ___ Python-bugs-list

[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-10-04 Thread Gregory P. Smith
New submission from Gregory P. Smith: Ben Leslie writes this on python-dev: Hi all, I have a Python program where I have many threads each calling Popen, and I was hitting some trouble. I've been seeing this on 3.2.3, however I believe the same issue is still potentially a problem on

[issue16140] subprocess.Popen the os.close calls in _execute_child can raise an EBADF exception

2012-10-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: What you've described makes sense. The file descriptors are indeed conditionally wrapped in file objects using io.open which could lead to a double close in the error case in a threaded application. yuck. 1) The code needs to check if the fd was wr

[issue16134] Add support for RTMP schemes to urlparse

2012-10-05 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue16134> ___ ___ Python-

[issue16113] Add SHA-3 (Keccak) support

2012-10-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: don't worry about optimization settings in python itself for now. the canonical optimized version will be in a future openssl version. now that it has been declared the standard it will get a *lot* more attention in the next few years. as it is, we

[issue16059] Serialize MD5 computation-state and resume later

2012-10-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: Unless someone supplies a patch that works inter-operably across all platforms using public APIs in openssl and with the internals of all of python's builtin non-openssl hash functions including unitests for all of the above... This isn't g

[issue16178] atexit._run_exitfuncs should be a public API

2012-10-09 Thread Gregory P. Smith
New submission from Gregory P. Smith: The atexit module's _run_exitfuncs() function needs to be a public API. In Python 2.x it was exposed through a disgusting hack as "sys.exitfunc()" that the atexit module monkeypatched into place at import time. This monkeypatching wa

[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-10-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: replacing repr(args[0]) with repr(executable) in the identified python should be sufficient for this bug as originally reported. BUT it goes deeper: I just ran into this error in a different case. It also happens when cwd is passed and the chdir(cwd

[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-10-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm keeping this open until I backport this to subprocess32 for use on Python 2. -- stage: needs patch -> commit review ___ Python tracker <http://bugs.python.org

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2012-10-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: I wouldn't blame android for this; I doubt Android claims to support whatever standard you are holding it to. It seems simple enough for us to make the default configurable (a public module level constant that anyone can override in their code

[issue15032] Provide a select.select implemented using select.poll

2012-10-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: indeed, i don't know that there is any point to this idea. i'm all for just getting rid of all uses of select in the stdlib and making them poll only in 3.4 unless someone can point to a modern system that does not su

[issue16286] Optimize a==b and a!=b for bytes and str

2012-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: something to include in your statistics is the lengths of the already hashed data being compared. i expect there to be a minimum length before this optimization is useful. -- nosy: +gregory.p.smith ___ Python

[issue16327] subprocess.Popen leaks file descriptors on os.fork() failure

2012-10-25 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker <http://bugs.python.org/issue16327> ___ ___ Python-bugs-list mailing list Un

[issue16327] subprocess.Popen leaks file descriptors on os.fork() failure

2012-10-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: python 3 already catches all exceptions and handles closing of p2cwrite, c2pread and errread here. i don't know which branch this patch is against. Regardless, it makes sense that the other fd's, if created by us, also need to be cleaned up.

[issue16327] subprocess.Popen leaks file descriptors on os.fork() failure

2012-10-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: Stubbing _execute_child out for a test is easiest. No need to craft ways to cause an actual fork failure. -- ___ Python tracker <http://bugs.python.org/issue16

[issue20979] Calling getdents()/readdir64() repeatedly while closing descriptors provides unexpected behaviour.

2014-03-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: A Python test that reproduces this would be nice to have though I realize it isn't something necessarily useful to run as part of a unittest suite given this one would rely on OS kernel implementation details and chances of race conditions occu

[issue21216] getaddrinfo is wrongly considered thread safe on linux

2014-04-14 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.org/issu

[issue21216] getaddrinfo is wrongly considered thread safe on linux

2014-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Can you attach some python code that reproduces this for you? According to both of the references below it doesn't sound like this is supposed to be a problem. http://pubs.opengroup.org/onlinepubs/9699919799/functions/freeaddrinfo.html claims

[issue20307] Android's failure to expose SYS_* system call constants causes _posixsubprocess cross-compilation to fail

2014-04-14 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.5 ___ Python tracker <http://bugs.python.or

[issue20318] subprocess.Popen can hang in threaded applications in Python 2

2014-04-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: I added a pointer to subprocess32 in the 2.7 subprocess docs in dd52365c8721. -- resolution: -> wont fix stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue16991] Add OrderedDict written in C

2014-04-15 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue16991> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21291] subprocess Popen objects are not thread safe w.r.t. wait() and returncode being set

2014-04-17 Thread Gregory P. Smith
New submission from Gregory P. Smith: Executing the supplied test code you either get: sys.version = 3.4.0+ (3.4:635817da596d, Apr 17 2014, 14:30:34) [GCC 4.6.3] Results with : r0= None, expected None r1= None, expected None ri0 = None, expected None ri1 = -9

[issue21291] subprocess Popen objects are not thread safe w.r.t. wait() and returncode being set

2014-04-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: Attaching a proposed fix for this issue. It should make the wait() and poll() methods thread safe. I need to turn the reproducer code into an actual test case and add more test cases for coverage of all code paths being touched. I haven't examine

[issue21253] Difflib.compare() crashes on mostly different sequences

2014-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: It appears to devolve into linear recursion in this case, one per each item in one of the sequences being searched for a match, so even using a stack seems wrong as it'd still be linear (though it would prevent the recursion depth problem). The m

[issue21253] unittest assertSequenceEqual can lead to Difflib.compare() crashing on mostly different sequences

2014-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: that seems reasonable. unittest's assertSequenceEqual is using this to attempt to display a useful error message as to what the delta was; it should try harder to avoid difflib corner cases. At the very least, unittest should recover from a difflib fa

[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: See also http://bugs.python.org/issue21288 to consider one fix/oversite/addition to the existing API as part of this process. (discuss that there) by default: use the exact same API as 3.4 if it is suitable for PEP 466 and 2.7.7's needs. the above iss

[issue21307] PEP 466: backport hashlib changes

2014-04-18 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue21307> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21308] PEP 466: backport ssl changes

2014-04-18 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue21308> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21291] subprocess Popen objects are not thread safe w.r.t. wait() and returncode being set

2014-04-22 Thread Gregory P. Smith
Changes by Gregory P. Smith : Added file: http://bugs.python.org/file35007/issue21291-patch-with-test-gps01.diff ___ Python tracker <http://bugs.python.org/issue21

[issue21291] subprocess Popen objects are not thread safe w.r.t. wait() and returncode being set

2014-04-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: This fix is also present in subprocess32 3.2.6 on PyPI for use on Python 2. -- resolution: -> fixed stage: -> commit review status: open -> closed type: -> behavior ___ Python tracker <http://

[issue5404] Cross-compiling Python

2014-04-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: I haven't tried a cross compile in ages. If nothing else I don't think this issue should be closed until we have at least one buildbot setup to cross compile it and run it on the target platform. That's on my long "todo for python"

[issue21380] timezone support in strftime methods broken

2014-04-28 Thread Michael P. Soulier
New submission from Michael P. Soulier: msoulier@cappuccino:~$ python Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from datetime import datet

[issue21353] document Popen.args attribute

2014-04-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: yes. this was overlooked. thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue6839] zipfile can't extract file

2014-04-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: Don't use print (to stdout) or sys.stderr directly. There are already many other uses of warnings.warn within the zipfile module. Be consistent with those. Existing zipfile warnings seem to favor lazily importing warnings when its needed rather t

[issue6839] zipfile can't extract file

2014-04-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: The bug was that BadZipFile was being raised when it shouldn't be so I wouldn't worry about documenting the behavior change other than in the Misc/NEWS entry that the ultimate commiter writes up. --

[issue21332] subprocess bufsize=1 docs are misleading

2014-04-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for the report, diagnosis and patch! Your change looks good to me. I'll commit it soon. -- assignee: -> gregory.p.smith ___ Python tracker <http://bugs.python.org

[issue14315] zipfile.ZipFile() unable to open zip File with a short extra header

2014-05-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: This was never an enhancement. zipfile was failing to properly deal with real world data that other zip file tools on the planet were perfectly happy to deal with. That's a bug. Fixed. Practicality beats purity. Be lenient in what you accept.

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-05-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: Are you aware that the subprocess module does use /proc/self/fd in Python 3.2 and later? The fd closing is not done from Python code. See Modules/_posixsubprocess.c - http://hg.python.org/cpython/file/53fa2c9523d4/Modules/_posixsubprocess.c

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-05-31 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: -gps ___ Python tracker <http://bugs.python.org/issue21618> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-05-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: regardless, the current C code for this does limit itself to the sysconf(_SC_OPEN_MAX) max_fd from module import time when closing fds found in /proc/self/fd so this code does still have a bug in that fds higher than that will remain unclosed (at which

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-05-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: There appear to be a two bugs here, depending on which platform subprocess is being used on. 1) on systems where it uses /prod/self/fd, /dev/fd or similar: It should not pay attention to end_fd at all. It knows the list of actual open fds and should use

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-06-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: Here's a patch with a unittest that reproduces the problem with fixes to stop using any end_fds. The max fd is only ever used in the absolute fallback situation where no way to get a list of open fd's is available. In that case it is obtained fr

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-06-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: Backported to subprocess32 in https://code.google.com/p/python-subprocess32/source/detail?r=1c27bfe7e98f78e6aaa746b5c0a4d902a956e2a5 -- resolution: -> fixed stage: patch review -> commit review status: open -> closed versions: +P

[issue20611] socket.create_connection() doesn't handle EINTR properly

2014-06-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: Something like the patch i'm attaching to socketmodule.c is what I would prefer. I haven't looked at or tried tests for it yet. -- assignee: -> gregory.p.smith keywords: +patch Added file: http://bugs.python.org/file35465/issue20611-

[issue20611] socket.create_connection() doesn't handle EINTR properly

2014-06-03 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- versions: +Python 3.5 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue20611> ___ ___ Python-bugs-list mailin

[issue20611] socket.create_connection() doesn't handle EINTR properly

2014-06-03 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- stage: -> test needed ___ Python tracker <http://bugs.python.org/issue20611> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue14903] dictobject infinite loop in module set-up

2014-06-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Can you provide specific details of exactly which python package from which distro is installed on the machines? Are the machines hardware or VMs? if they are VMs, what version of what VM system and what hardware are the VMs running on? I'm asking be

[issue16353] add function to os module for getting path to default shell

2012-11-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: > That is, shouldn't we look up `pwd.getpwuid(os.getuid()).pw_shell` ? > (but only when os.getuid() == os.geteuid()?) No, you can't use the users shell from the pwd module. That can be any crazy program. Not a functional /bin/sh for use in

[issue16409] urlretrieve regression: first call returns block size as 0

2012-11-08 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue16409> ___ ___ Python-

[issue16409] urlretrieve regression: first call returns block size as 0

2012-11-10 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue16409> ___ ___ Python-bugs-

[issue16427] Faster hash implementation

2012-11-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: yes please! Any reason you're using an unsigned int in your loop instead of a Py_uhash_t? -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/is

[issue14621] Hash function is not randomized properly

2012-11-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: People have been posting micro-benchmarks (often run wrong) rather than actual useful benchmarks. Running our real world benchmarks would be more interesting. -- nosy: +gregory.p.smith ___ Python tracker <h

[issue812369] module shutdown procedure based on GC

2012-11-10 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: gregory.p.smith -> ___ Python tracker <http://bugs.python.org/issue812369> ___ ___ Python-bugs-list mailing list Un

[issue8865] select.poll is not thread safe

2012-11-10 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: gregory.p.smith -> ___ Python tracker <http://bugs.python.org/issue8865> ___ ___ Python-bugs-list mailing list Un

[issue9535] Pending signals are inherited by child processes

2012-11-10 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue9535> ___ ___ Python-bugs-list

[issue14396] Popen wait() doesn't handle spurious wakeups

2012-11-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: regardless of knowing how to reproduce this system call behavior, the changes necessary to handle robustly it are easy enough. fixed. 3.3+ already handled it if a timeout was specified (new feature). I only had to fix the default no timeout case

[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2012-11-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi - I agree with your comments about the test and assertRaises. This code is old, there's a lot that could be improved in there. I chose to maintain a style equivalent to the existing surrounding code. Feel free to clean th

<    22   23   24   25   26   27   28   29   30   31   >