[issue17477] update the bsddb module do build with db 5.x versions

2013-03-18 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +jcea -gregory.p.smith ___ Python tracker <http://bugs.python.org/issue17477> ___ ___ Python-bugs-list mailing list Unsub

[issue17443] imaplib.IMAP4_stream subprocess is opened unbuffered but ignores short reads

2013-03-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: that patch looks good for imaplib. i'll follow up on the subprocess side of things to see if the default behavior should be changed to better match what happened in 2.7 (or if not: to make sure the change in behavior is sufficiently documented and not r

[issue17477] update the bsddb module do build with db 5.x versions

2013-03-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi, I un-cc'd myself as I don't maintain this module anymore; jcea does. :) I agree with the patch. Support for anything older than 4.3 is completely pointless in 2.7 and supporting 5.x is likely required for future OS distros wanting t

[issue17192] libffi-3.0.13 import

2013-03-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: 2.7, 3.2, 3.3 and 3.4 have all be updated to ctypes v3.0.13. fwiw, I tried a build of 3.3 on Sparc Solaris 10 using snakebite (nitrogen) and ctypes builds and links but two tests fail: ctypes.test.test_bitfields.C_Test test_ints and test_shorts failed

[issue17477] update the bsddb module do build with db 5.x versions

2013-03-19 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: -gregory.p.smith ___ Python tracker <http://bugs.python.org/issue17477> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17245] ctypes libffi needs to align the x86 stack to 16 bytes

2013-03-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: I've updated libffi to v3.0.13 which contains the fixes for this in 2.7, 3.2, 3.3 and 3.4. if someone wants to apply a surgical patch to fix this problem, the one mentioned above is good as well as: https://github.com/atgreen/libffi/c

[issue17488] subprocess.Popen bufsize=0 parameter behaves differently in Python 3 than in 2

2013-03-19 Thread Gregory P. Smith
New submission from Gregory P. Smith: The subprocess module in Python 3 uses io.open(file_descriptor, mode, bufsize) to create its Popen stdout, stderr and stdin file objects. In Python 2, it used the old os.fdopen which created an old-style python 2 file object that simply wraps libc's

[issue12466] sporadic failures of test_close_fds and test_pass_fds in test_subprocess

2013-03-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi - sem_open is unrelated, nothing in subprocess needs that. -- ___ Python tracker <http://bugs.python.org/issue12

[issue12466] sporadic failures of test_close_fds and test_pass_fds in test_subprocess

2013-03-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Some way for me to reproduce this is needed. -- stage: -> test needed ___ Python tracker <http://bugs.python.org/issu

[issue17285] subprocess.check_output incorrectly state that output is always bytes

2013-03-19 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: needs patch -> commit review status: open -> closed ___ Python tracker <http://bugs.python.or

[issue12466] sporadic failures of test_close_fds and test_pass_fds in test_subprocess

2013-03-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi - subprocess uses /proc to get a list of open fd's in the child process before exec when possible. search for FD_DIR in http://hg.python.org/cpython/file/d674bbbed333/Modules/_posixsubprocess.c -- ___ P

[issue10359] ISO C cleanup

2013-03-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: It looks like someone has already done the Python-ast cleanup and I don't understand the point of the distutils test one or the libffi one (ffi has been updated but it's trivial and would still apply). -- nosy: +grego

[issue10359] ISO C cleanup

2013-03-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm not inclined to apply the patch to ffi unless someone can demonstrate that it is an actual problem. given that nobody has applied it to *upstream* libffi (since we just pulled in v3.0.13 earlier this week) I doubt it matters to anyone. everything

[issue17488] subprocess.Popen bufsize=0 parameter behaves differently in Python 3 than in 2

2013-03-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: The number of things we'll break by changing this errant behavior to be _correct_ is way less than the number of things that are already broken due to it. If the bufsize=0 default is left in place the behavior differs between Windows and POSIX plat

[issue17488] subprocess.Popen bufsize=0 parameter behaves differently in Python 3 than in 2

2013-03-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: (actually I'm not sure about the windows vs posix behavior difference, that may not be true; I don't have a windows system handy to test that on) -- ___ Python tracker <http://bugs.python.o

[issue17488] subprocess.Popen bufsize=0 parameter behaves differently in Python 3 than in 2

2013-03-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: great! fixing now. :) -- ___ Python tracker <http://bugs.python.org/issue17488> ___ ___ Python-bugs-list mailing list Unsub

[issue17488] subprocess.Popen bufsize=0 parameter behaves differently in Python 3 than in 2

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

[issue4653] Patch to fix typos in C code

2013-03-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: the pythonrun issue had already been fixed. the others were still there (valid bugs, but were unlikely to be causing problems given the codepaths). fixed. I didn't write a Misc/NEWS entry on the commit because I didn't know how to usefully desc

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-03-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Here's is an os.scandir(path='.') implementation that iterates reading the directory on the fly instead of pre-building a list. os.listdir's implementation should ultimately be replaced by this as: def listdir(path=None): if path is

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-03-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: you'll see my code already has TODOs in there for that. windows API documentation suggests that windows returns even more (stat-like) info when traversing a directory. returning a namedtuple with the relevant info from the platform at hand would be

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-03-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Your objection is noted but it is wrong. A Python program today cannot process arbitrarily large directories within a fixed amount of ram today due to os.listdir. This makes it unsuitable for file system cleanup tasks that we have run into on production

[issue12466] sporadic failures of test_close_fds and test_pass_fds in test_subprocess

2013-03-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: phew, yay. because i didn't see anything obviously wrong with the #16962 commit. also, regarding checking for EINTR on some of the close() calls. It isn't a big deal. This _posixsubprocess.c code that contains those checks is always execut

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-03-28 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +twouters ___ Python tracker <http://bugs.python.org/issue11406> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-03-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: Here's an updated patch that fixes the windows build based on twouters' comments. It goes ahead and removes the old C implementation of listdir in favor of the trivial Python wrapping of scandir. -- Added file: http://bugs.python.org

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-03-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: While i don't personally like things with iter in the name I won't object. That way the scandir name would be left available for a future version of this that yields namedtuples of directory entry details as Martin wa

[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- title: Python 2.7.4 Breaks ZipFile Extraction -> Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.pyth

[issue16427] Faster hash implementation

2013-04-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: > > Note that the patch uses type punning through a union > > What is the standard and portable way to cast an array of bytes to size_t? I'd expect just casting the pointer type before dereferencing: unsigned char *p; ... hash = (

[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-10 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- priority: high -> release blocker ___ Python tracker <http://bugs.python.org/issue17656> ___ ___ Python-bugs-list mai

[issue17666] Extra gzip headers breaks _read_gzip_header

2013-04-10 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +benjamin.peterson, larry priority: normal -> release blocker ___ Python tracker <http://bugs.python.org/issu

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

2013-04-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: consensus here appears to be "bad idea... don't do this." -- nosy: +gregory.p.smith priority: high -> normal resolution: -> wont fix stage: -> committed/rejected status: open -> closed __

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

2013-04-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: okay, but i don't personally find any of these to be good ideas as "codecs" given they don't have anything to do with translating between bytes<->unicode. -- resolution: wont fix -> stage: committed/reject

[issue17826] Setting a side_effect on mock from create_autospec doesn't work

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

[issue17192] libffi-3.0.13 import

2013-04-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: it _looks_ like the libffi updates i put in 3.2, 3.3 and default (3.4) are messed up with some changes missing in 3.2 and more missing in 3.3 and 3.4. (i'm comparing vs upstream 3.0.13 <-> 2.7 <-> 3.2 <-> 3.3 <-> 3.4). i blame

[issue17192] libffi-3.0.13 import

2013-04-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: I've got this and all of the fixes necessary for 3.3, default and 2.7 in my local repositories. odd thing in the 3.2 patch: it is entirely unclear to me if the issue 10309 fix needs to be kept. i included it as it was missing from 3.2 after pre

[issue17192] libffi-3.0.13 import

2013-04-30 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue17192> ___ ___ Python-bugs-

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: Actually I'm thinking this duck may only have a beak. Instead of a bunch of fields of None I'd prefer just not having that attribute defined on the object. I consider the os specific "stat-like" info from reading a directory to be so

[issue1662581] the re module can perform poorly: O(2**n) versus O(n**2)

2013-05-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: The recommendation for anyone using regular expressions on hostile input is to (a) don't do that. (b) use a better regexp without this possible behavior and (c) use something like re2 (there's a Python binding at https://github.com/axiak/pyre2)

[issue17980] CVE-2013-2099 ssl.match_hostname() trips over crafted wildcard names

2013-05-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: Indeed, doing this _without a regexp_ is preferred. :) -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue17

[issue18035] telnetlib incorrectly assumes that select.error has an errno attribute

2013-05-22 Thread Gregory P. Smith
New submission from Gregory P. Smith: In Python 2.7.3 through 2.7.5 the telnetlib select.poll based implementation assumes that select.error has an errno attribute when handling errors. it does not. select.error is not an EnvironmentError derived exception. http://hg.python.org/cpython/file

[issue18035] telnetlib incorrectly assumes that select.error has an errno attribute

2013-05-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: As this is only on the select.poll code path, a workaround for code that isn't going to hit select.select file descriptor limits is to set their telnetlib.Telnet instance _has_poll attribute to False before using it. my_telnet = telnetlib.T

[issue22904] make profile-opt fails to update _sysconfigdata.py during the rebuild

2014-11-19 Thread Gregory P. Smith
New submission from Gregory P. Smith: 1) Checkout a 3.4 tree. Mine was at revision d244e1770f1b. 2) ./configure 3) make -j14 profile-opt 4) ./python -m test.regrtest -v test_distutils FAIL: test_sysconfig_module (distutils.tests.test_sysconfig.SysconfigTestCase

[issue22904] make profile-opt fails to update _sysconfigdata.py during the rebuild

2014-11-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Should _sysconfigdata.py contain these flags for reference, implying that it is this test or distutils.sysconfig implementation which is really wrong? -- ___ Python tracker <http://bugs.python.org/issue22

[issue22904] make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS

2014-11-19 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- title: make profile-opt fails to update _sysconfigdata.py during the rebuild -> make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS ___ Python tracker <http://bugs.python.org/issu

[issue22904] make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS

2014-11-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: attaching a proposed workaround in the unittest. -- keywords: +patch Added file: http://bugs.python.org/file37231/issue22904-test-workaround-gps01.diff ___ Python tracker <http://bugs.python.org/issue22

[issue22910] test_pydoc test_synopsis_sourceless is a flaky test

2014-11-20 Thread Gregory P. Smith
New submission from Gregory P. Smith: When running a parallel make -j12 test, test_pydoc fails reasonably often with: test test_pydoc failed -- Traceback (most recent call last): File "/.../Lib/test/test_pydoc.py", line 556, in test_synopsis_sourceless synopsis = pydo

[issue22910] test_pydoc test_synopsis_sourceless is a flaky test

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

[issue22910] test_pydoc test_synopsis_sourceless is a flaky test

2014-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: I suspect flakiness is due to parallel test execution. Is some other test possibly executing at the same time removing __pycache__ directories or .pyc files to recreate them (test_compileall?)? If the test were adjusted to point to a .py file of its own

[issue20123] pydoc.synopsis fails to load binary modules

2014-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi - tracking the new issue koobs reported in http://bugs.python.org/issue22910 -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue20

[issue23056] tarfile raises an exception when reading an empty tar in streaming mode

2014-12-15 Thread Gregory P. Smith
New submission from Gregory P. Smith: $ cat >test.py < info = f.next() File "/usr/lib/python2.7/tarfile.py", line 2319, in next self.fileobj.seek(self.offset) File "/usr/lib/python2.7/tarfile.py", line 555, in seek raise StreamError("s

[issue23157] Lib/test/time_hashlib.py doesn't work

2015-01-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: removing it would also be fine, it's not like it gets used anymore. the fixes were trivial. done. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http:

[issue23234] refactor subprocess: use new OSError exceptions, factorize stdin.write() code

2015-01-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks for the cleanup refactoring! -- ___ Python tracker <http://bugs.python.org/issue23234> ___ ___ Python-bugs-list mailin

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: -gregory.p.smith ___ Python tracker <http://bugs.python.org/issue3566> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23223] subprocess32 unable to be installed via pip

2015-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: I can apply this to subprocess32 but it is going to look much more like: +#ifndef MS_WINDOWS /* WTF is anyone compiling on Windows? Shouldn't work! */ +# define HAVE_UNISTD_H 1 +#endif +#ifdef HAVE_UNISTD_H #include +#endif The real question is w

[issue23223] subprocess32 unable to be installed via pip

2015-01-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker <http://bugs.python.org/issue23223> ___ ___ Python-bugs-list mailing list Un

[issue1060] zipfile cannot handle files larger than 2GB (inside archive)

2015-01-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: gregory.p.smith -> ___ Python tracker <http://bugs.python.org/issue1060> ___ ___ Python-bugs-list mailing list Un

[issue23306] zlib.crc32 raises OverflowError at argument-parsing time on large strings

2015-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: This bug prevents zipfile's writestr() from writing large data (longer than UINT_MAX) to a 64-bit zip file. The zlib.crc32 function which, as written, cannot accept input with a size larger than an unsigned int. https://hg.python.org/cpython

[issue23342] run() - unified high-level interface for subprocess

2015-01-28 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue23342> ___ ___ Python-

[issue23342] run() - unified high-level interface for subprocess

2015-01-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: A 1) Opting not to capture by default is good. Let people explicitly request that. A 2) "check" seems like a reasonable parameter name for the "should i raise if rc != 0" bool. I don't have any other good bikeshed name suggestio

[issue23342] run() - unified high-level interface for subprocess

2015-01-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: Ethan: check_output combines them when stdout=subprocess.STDOUT is passed ( https://docs.python.org/3.5/library/subprocess.html#subprocess.STDOUT). Never pass stdout=PIPE or stderr= PIPE to call() or check*() methods as that will lead to a deadlock when a pipe

[issue23390] make profile-opt: test_distutils failure

2015-02-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: Likely a dupe of http://bugs.python.org/issue22904 which is why i set the buildbot up. :) I like your patch here better than my non-fixing poor hack in the other issue. I hadn't noticed CFLAGS_NODIST b

[issue22904] make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS

2015-02-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: see also issue23390 -- superseder: -> make profile-opt: test_distutils failure ___ Python tracker <http://bugs.python.org/issu

[issue22904] make profile-opt includes -fprofile* flags in _sysconfigdata CFLAGS

2015-02-03 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/issue22904> ___ ___ Python-bugs-

[issue23390] make profile-opt: test_distutils failure

2015-02-04 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker <http://bugs.python.org/issue23390> ___ ___ Python-bugs-list mailing list Un

[issue23390] make profile-opt: test_distutils failure

2015-02-04 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue23390> ___ ___ Python-bugs-

[issue24318] Make profile-opt the default Make target?

2015-05-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: Also FWIW, I setup a buildbot earlier this year building in profile-opt mode. -- ___ Python tracker <http://bugs.python.org/issue24

[issue24318] Make profile-opt the default Make target?

2015-05-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: The Makefile's default "make all" target is meant for developers and iterative development. make profile-opt is not. If anything, this issue should document it somewhere if we even have docs on how to make "release" builds of

[issue24601] bytes and unicode splitlines() methods differ on what is a line break

2015-07-09 Thread Gregory P. Smith
New submission from Gregory P. Smith: for bytes, \v (0x0b) is not considered a line break. for unicode, it is. this traces back to the Objects/stringlib/ code where unicode defers to the decision made by Objects/unicodeobject.c's ascii_linebreak table which contains 7 line breaks in

[issue24601] bytes and unicode splitlines() methods differ on what is a line break

2015-07-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: hah, i should've searched the tracker first. looks like the other open issues cover this. -- resolution: -> duplicate status: open -> closed superseder: -> str.splitlines splitting on non-\r\n characters versions: +Python 2.7, Pyth

[issue22233] http.client splits headers on non-\r\n characters

2015-07-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: The obvious fix seems to be to not use splitlines but explicitly split on the allowed characters for ASCII based protocols and formats that only want \r and \n to be considered. I don't think we can rightfully change the unicode splitlines beh

[issue22232] str.splitlines splitting on non-\r\n characters

2015-07-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: If this isn't already mentioned in 2 to 3 porting notes it is worth highlighting there. code which uses a str in python 2 and still uses a str in python 3 is now splitting on many more characters. That seems to be the source of bugs like issue

[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: i'm updating the title to be more accurate. turning it on by default is likely not desirable as the makefile is primarily used by developers who are iterating on changes. but having it use a good workload (regrtest) and work with llvm and os x are

[issue24862] subprocess.Popen behaves incorrect when moved in process tree

2015-09-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: My gut feeling is to say "don't do that" when it comes to passing subprocess instances between processes (ie: pickling and unpickling them) and expecting them to work as if nothing had changed... You already acknowledge that this is a stran

[issue25083] Python can sometimes create incorrect .pyc files

2015-09-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: we'll need a test case .pyc where this happens. -- ___ Python tracker <http://bugs.python.org/issue25083> ___ ___ Pytho

[issue25083] Python can sometimes create incorrect .pyc files

2015-09-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: Inspecting the 2.7 code: https://hg.python.org/cpython/file/2.7/Python/import.c#l761 following that down to https://hg.python.org/cpython/file/2.7/Python/marshal.c#l1126 it looks like it does the right thing on EOF error (from either getc or from fread

[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue25106> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: attaching an updated patch. fwiw, in my own quick tests i'm not seeing a performance difference on the benchmark suite. but i am not trying to run it in such an isolated quiet machine locked freq. environment. it is still a good idea regardless. _

[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Testing this on a host with a fixed frequency and mostx background tasks disabled I cannot reproduce the speedups you list. I see no significant change on most of them and a 6% slowdown on json_load and a 1-4% slowdown on regex_v8 (not sure if those are in

[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2015-10-18 Thread Gregory P. Smith
New submission from Gregory P. Smith: https://docs.python.org/3/c-api/structures.html#c.PyMemberDef T_STRING members are turned into str objects in Python. The documentation needs updating to mention which codec the char * bytes are treated as. Solving this issue involves code inspection and

[issue21709] logging.__init__ assumes that __file__ is always set

2015-10-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: I applied the same _srcfile setting cleanup to 2.7 as we ran into this at work with an embedded python stdlib. __file__ was set to something by the embedded importer, but to something different than the path seen on the actual code objects which appear to

[issue25481] PermissionError in subprocess.check_output() when an inaccessible directory on the path

2015-10-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: Definitely a bug. The path search should silently skip directories it can't access. On Tue, Oct 27, 2015, 7:05 AM R. David Murray wrote: > > R. David Murray added the comment: > > So, two interesting questions: does this in fact match the

[issue23564] Patch fixing sanity check for ordered fd sequence in _posixsubprocess.c

2015-11-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: Hisham, could you sign the Python contributor agreement? https://www.python.org/psf/contrib/contrib-form/ thanks! -- ___ Python tracker <http://bugs.python.org/issue23

[issue17131] subprocess.Popen.terminate can raise exception on Posix

2015-11-15 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> duplicate status: open -> closed superseder: -> subprocess.Popen.send_signal doesn't check whether the process has terminated ___ Python tracker <http://bugs.pyth

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

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

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2015-11-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: I chose to go with the "there should not be an error" approach similar to how Python deals with multiple file closes. Both are technically programming errors but the point of Python is make life easier. Reasoning? I don't want someone to

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2015-11-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm unassigning as i won't be figuring out how to hackishly fix this again. The best solution is a complete rewrite of zipimport. this remains a known issue: if you use zipimport, do not allow the zip file to change out from underneath your runni

[issue23564] Patch fixing sanity check for ordered fd sequence in _posixsubprocess.c

2015-11-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: heh, you're right. it's a trivial obvious fix for the mistake in the existing implementation. writing a test and committing. the other option would be to get rid of the sanity check entirely or change it not to use the odd "require a so

[issue23564] Patch fixing sanity check for ordered fd sequence in _posixsubprocess.c

2015-11-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: I didn't bother adding the fix to 3.4, it isn't high value. -- resolution: -> fixed status: open -> closed versions: +Python 3.5, Python 3.6 ___ Python tracker <http://bugs.py

[issue19217] Calling assertEquals for moderately long list takes too long

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

[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-11-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: Reopen this if you find a reproducible way for this patch to prove useful. -- resolution: -> rejected status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX

2015-12-11 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue22012> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX

2015-12-11 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- components: +Library (Lib) ___ Python tracker <http://bugs.python.org/issue22012> ___ ___ Python-bugs-list mailing list Unsub

[issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX

2015-12-11 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- versions: +Python 3.6 ___ Python tracker <http://bugs.python.org/issue22012> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25829] Mixing multiprocessing pool and subprocess may create zombie process, and cause program to hang.

2015-12-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: I wouldn't _assume_ that there was a good design reason for that in multiprocessing... it already mixed threads and fork() without realizing that you cannot safely do that. -- nosy: +gregory.p.smith

[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError

2015-12-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: _args_from_interpreter_flags really deserves its own unittest using a stubbed out sys.flags. if someone wants to go ahead with the test provided in the existing patch here or write one of those, feel free. As is, i've committed a patch logically equiv

[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError

2015-12-13 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue20954> ___ ___ Python-bugs-

[issue19284] subprocess._args_from_interpreter_flags() mishandles -R

2015-12-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: ironically this change would've been a lot simpler had it simply deleted hash_randomization from the set of sys.flags considered by _args_from_interpreter_flags(). -R is always enabled in Python 3.4. it cannot be disabled. it isn't even docum

[issue24840] implement bool conversion for enums to prevent odd edge case

2015-12-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: This change breaks existing code that is relying on the behavior of the enum API as shipped in 3.4 and 3.5. Please do NOT do this. Worse, you've landed this change in a "stable" release of the enum34 "backport" module (1.1.1) des

[issue24840] implement bool conversion for enums to prevent odd edge case

2015-12-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: lets collect some examples of where it causes problems (someone ran into the problem at work which is why i hunted down this bugs.python.org issue) before deciding. If it stays in, it needs a mention in both Misc/NEWS and What's New as it will require

[issue25960] Popen.wait() hangs with SIGINT when os.waitpid() does not

2015-12-27 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker <http://bugs.python.org/issue25960> ___ ___ Python-bugs-list mailing list Un

[issue25960] Popen.wait() hangs with SIGINT when os.waitpid() does not

2015-12-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: This appears due to Popen._waitpid_lock. It is not being released when the signal fires and the while loop containing the with self._waitpid_lock repeats. This also reproduces when using subprocess32

<    28   29   30   31   32   33   34   35   >