[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

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

2015-12-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: fundamentally: this shouldn't work anyways. You are calling wait() from a signal handler. That is a blocking operation. You cannot do that from a signal handler. os.waitpid(p.pid, 1) is os.waitpid(p.pid, os.WNOHANG) which is a non-blocking operation

[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid(pid, os.WNOHANG) does not

2015-12-27 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> wont fix status: open -> closed title: Popen.wait() hangs with SIGINT when os.waitpid() does not -> Popen.wait() hangs when called from a signal handler when os.waitpid(pid, os.WNOHANG)

[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2015-12-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think it still applies. os.waitpid even in blocking mode could hang at the whim of the OS. you aren't guaranteed that your child process has died and the OS is ready to return a status code. -- ___ P

[issue26083] ValueError: insecure string pickle in subprocess.Popen on Python 2

2016-01-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: I strongly recommend people use https://pypi.python.org/pypi/subprocess32/ instead of Python 2.7's subprocess module whenever possible. That said, the fix is pretty easy. -- assignee: -> gregory

[issue26083] ValueError: insecure string pickle in subprocess.Popen on Python 2

2016-01-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: note: this was not a security issue nor was it a crash. an exception was being raised anyways from the forked child prior to the exec(), this bug just caused that to be swallowed and this ValueError raised instead. -- resolution: -> fixed st

[issue19251] bitwise ops for bytes of equal length

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

[issue26154] Add private _PyThreadState_FastGet() to get the current thread state

2016-01-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Overall +1 to this private API. I like the UncheckedGet name better than FastGet but don't really care what the name is so long as it keeps this property: It must be non-blocking and safe to call from a signal handler. Returning NULL in the even

[issue21949] Document the Py_SIZE() macro.

2016-01-22 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: out of date -> fixed ___ Python tracker <http://bugs.python.org/issue21949> ___ ___ Python-bugs-list mai

[issue22847] Improve method cache efficiency

2016-02-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm reopening this and assigning it to benjamin as the 2.7 release manager. This change is valuable to apply to 2.7.x as well. It is very simple and is a clear performance improvement for realistic workloads. No API change. When you profile Pytho

[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-08 Thread Gregory P. Smith
New submission from Gregory P. Smith: The implementation of string interning uses a dict [1]. It would consume less memory and be a bit simpler if it used a set. Identifier strings in a program are interned. If you have a large program with a lot of code, this makes for a large dictionary

[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: Here's an example patch against 2.7 by nnorwitz that we're currently testing. -- keywords: +needs review, patch Added file: http://bugs.python.org/file41863/interned_set_27.diff ___ Python trac

[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: Because it was only called from within an "#ifdef __INSURE__" which we weren't using. I called it an "example" patch for a reason. Updating that function to deal with the set instead of dict seems wise. Ironically... a few days

[issue26398] cgi.escape() Can Lead To XSS and HTML Vulnerabilities

2016-02-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: As pointed out, this is working as intended and is documented as such. That it isn't what you want is why Python 3 has html.escape() instead. -- resolution: -> duplicate status: open -> closed superseder: -> cgi.escape C

[issue26460] datetime.strptime without a year fails on Feb 29

2016-02-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: Python's time.strptime() behavior is consistent with that of glibc 2.19: === strptime_c.c === #define _XOPEN_SOURCE #include #include #include #include int main(void) { struct tm tm; char buf[255]; memset(&tm, 0, sizeof(

[issue26460] datetime.strptime without a year fails on Feb 29

2016-02-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: time.strptime() is "working" (not raising an exception) as it appears not to validate the day of the month when a year is not specified, yet the return value from either of these APIs is a date which has no concept of an ambiguous year.

[issue26484] Broken table in /2.7/library/sets.html#set-objects

2016-03-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks for reporting this! -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-03-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Piping up from the peanut gallery here: If your use case is not doing release builds for production use, i.e. "casual use", don't bother with either PGO or LTO. It won't matter. Your final build that you Q&A ship should absolut

[issue26314] interned strings are stored in a dict, a set would use less memory

2016-03-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: updated patch: Don't Py_CLEAR the dummy sentinel value in PySet_Fini. The interned set uses it. Otherwise it causes problems when re-initializing after a Fini as happens in processes the setup and tear down an embedded interpreter multiple

[issue26314] interned strings are stored in a dict, a set would use less memory

2016-03-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: The space for the strings is a fixed cost, the structure used to store them for efficient lookup is the only overhead that can be trimmed and is all in one contiguous allocation. regardless, i agree, this isn't a large savings. priority low, feel fr

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2016-03-30 Thread Gregory P. Smith
New submission from Gregory P. Smith: time.localtime(float("NaN")) raises a ValueError on x86_64 using the few compilers I have tested it with. (this makes sense) >>> time.localtime(float("NaN")) Traceback (most recent call last): File "", line 1, in

[issue26714] telnetlib.Telnet should act as a context manager

2016-04-08 Thread Gregory P. Smith
New submission from Gregory P. Smith: Telnet instances should support the context manager protocol so they can be used in with statements. >>> import telnetlib >>> with telnetlib.Telnet('192.168.86.7') as tn: ... pass ... Traceback (most recent call

[issue26714] telnetlib.Telnet should act as a context manager

2016-04-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: hah, i should've tested this in an up to date client. :) -- ___ Python tracker <http://bugs.python.org/issue26714> ___ ___

[issue26359] CPython build options for out-of-the box performance

2016-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: --with-optimizations seems fine. As does having the final thing the Makefile prints out when run from a configuration that did not specify any of --with-pgo, --with-lto, --with-pydebug, or --with-optimizations be to echo message reminding people to

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-04-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: What i committed for 3.5 and 3.6 matches lto-cpython3-v04.patch which just adds --with-lto support. 2.7 still needs to be patched. For reference: Using ubuntu's gcc 5.2.1 i was seeing a 2-3% performance increase in the resulting LTO binary vs a

[issue26787] test_distutils fails when configured --with-lto

2016-04-16 Thread Gregory P. Smith
New submission from Gregory P. Smith: When configured using './configure --with-lto' (added in issue25702) and doing a 'make profile-opt' build, test_distutils fails: == FAIL: test_sys

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-04-16 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- dependencies: +test_distutils fails when configured --with-lto ___ Python tracker <http://bugs.python.org/issue25702> ___ ___

[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2016-04-16 Thread Gregory P. Smith
New submission from Gregory P. Smith: cpython/build35.lto$ ./python ../3.5/Lib/test/test_gdb.py GDB version 7.10: GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10 ... == FAIL: test_tuples (__main__.PrettyPrintTests) Verify the pretty

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-04-16 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- dependencies: +test_gdb fails all tests on a profile-opt build configured --with-lto ___ Python tracker <http://bugs.python.org/issue25

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: CPython should not attempt make a judgement about the safety of a particular function. We can only document if something has known issues. We should only include things in the stdlib which are either (a) standard or (b) widely used regardless of being

[issue26798] add BLAKE2 to hashlib

2016-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: Confirm that the CC license is valid/acceptable with Van L. first. That's why I pointed at the Apache 2 code, already a known good license. :) On Mon, Apr 18, 2016, 2:51 PM Christian Heimes wrote: > > Christian Heimes added the comment: > >

[issue19251] bitwise ops for bytes of equal length

2016-04-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: I have wanted bytes/bytearray bit operations (be sure to include the in place operators for bytearray) when using micropython where it is normal to be operating on binary data. that said, i'd need someone from micropython to chime in as to if the

[issue26862] SYS_getdents64 does not need to be defined on android API 21

2016-04-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: I have no problem just removing the #ifdef as Android API 21 is now old enough (Lollipop / 5.0) that anyone building Python 3.6 for use on Android is probably fine with it. If there is a #define that can be used to test the android api level at compile

[issue16385] evaluating literal dict with repeated keys gives no warnings/errors

2016-05-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: Raising an error on duplicates also has precedent: >>> dict(a=3, b=4, a=5) File "", line 1 SyntaxError: keyword argument repeated -- nosy: +gregory.p.smith ___ Python tracker <http://bugs

[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-05-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'd there any good reason 2.7 needs this? They are available via pypi as extensions. (Read: I vote no) On Sat, May 7, 2016, 3:15 AM Larry Hastings wrote: > > Larry Hastings added the comment: > > Christian: any interest in proposing this f

[issue27050] Demote run() below the high level APIs in subprocess docs

2016-05-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: FWIW i consider the whole subprocess module doc to be pretty unapproachable and in need of refactoring. Your suggestions sound like good ones. We should sit down and make it sane at pycon. -- nosy: +gregory.p.smith

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm not against adding a new name if it makes glorious sense, but we should not remove the old names from unittest as that causes unnecessary pain (based on past experience). assertCountEqual does make sense in terms of the "equivalent to" co

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: assertUnorderedSequenceEqual would make more sense to me given the natural relation to assertSequenceEqual. We aren't dealing with sets (though sets are valid sequences) as this method specifically does not require sequence items to be hashable. Expli

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: assertSequenceEqualUnordered also works R. David. I was going to suggest that as well but edited it out to keep my suggestion simpler. :) I don't like the assertMultisetEqual suggestion as this is most notably an api having nothing to do with

[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith -gps ___ Python tracker <http://bugs.python.org/issue27122> ___ ___ Python-bugs-list mailing list Unsub

[issue10197] subprocess.getoutput fails on win32

2015-02-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: A side effect of the changes made within are that getstatusoutput() on POSIX systems now returns a different value for status. The old implementation present in Python 2 and Python 3.3 before this patch returned the raw waitpid() status result as the status

[issue10197] subprocess.getoutput fails on win32

2015-02-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: http://bugs.python.org/issue23508 to track the fall out of that. -- ___ Python tracker <http://bugs.python.org/issue10

[issue23567] os.stat() tuple access vs named attribute access int vs float

2015-03-02 Thread Gregory P. Smith
New submission from Gregory P. Smith: Python 2.7.6 (default, Mar 22 2014, 22:59:56) >>> import os, stat >>> os.stat('/') posix.stat_result(st_mode=16877, st_ino=2, st_dev=64513L, st_nlink=29, st_uid=0, st_gid=0, st_size=4096, st_atime=1425341751, st_mtime=1424

[issue23567] os.stat() tuple access vs named attribute access int vs float

2015-03-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: I missed that because i was looking for it to be called out under 2.7 os.stat() docs rather than under 2.7's os.stat_float_times() which is a method nobody is likely to read the documentation for as floats have been the default since 2.5. The 2.7 doc

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

2015-03-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: Haha, yes, that description and patch look correct. Thanks! Fortunately this bug is low impact as this was just a sanity check and the calling code from subprocess.py was already passing the correct data in. An ideal regression test: An explicit unittest

[issue22341] Python 3 crc32 documentation clarifications

2015-03-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: I do not object to the removal of the & 0xfff from the stdlib library code if these functions have actually been fixed to always return unsigned now. (double check the behavior, and if good, just do it!) But I think the docs should still mention

[issue23723] Provide a way to disable bytecode staleness checks

2015-03-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: This would avoid the need to modify an interpreter to have this optimization. In this mode the potentially expensive stat() call is avoided. No need to ensure that the pyc file's embedded timestamp matches the py file's timestamp. The only u

[issue23723] Provide a way to disable bytecode staleness checks

2015-03-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: We already use zipimport for most production deployments. It works well. We've modified our own zipimport to ignore timestamps as keeping them in sync between pyc and py files in the zip files own timestamps is painful. Unfortunately the stdlib zipi

[issue23734] zipimport should not check pyc timestamps against zipped py files

2015-03-21 Thread Gregory P. Smith
New submission from Gregory P. Smith: The zipimport module checks the timestamp of a pyc file loaded from the zip file against the timestamp of a corresponding py file in the zip if any. This seems pointless. By the time someone has created a zip file for zipimport they should have

[issue23731] Implement PEP 488

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

[issue23058] argparse silently ignores arguments

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

[issue23058] argparse silently ignores arguments

2015-03-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +nailor, r.david.murray versions: +Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.org/issue23058> ___ ___

[issue19511] lib2to3 Grammar file is no longer a Python 3 superset

2015-04-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: This is blocking Python auto formatters from working properly on Python 3 syntax code. For example: https://github.com/google/yapf/issues/61 -- assignee: -> gregory.p.smith nosy: +gregory.p.smith priority: low ->

[issue19511] lib2to3 Grammar file is no longer a Python 3 superset

2015-04-01 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue19511> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19511] lib2to3 Grammar file is no longer a Python 3 superset

2015-04-01 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- versions: -Python 2.7 ___ Python tracker <http://bugs.python.org/issue19511> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23852] Wrong FD_DIR file name on OpenBSD

2015-04-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm not going to bother setting up a VM with an esoteric OS in it myself, if someone knows the past and current state of various OpenBSD versions and what to do there, feel free to commit OpenBSD conditional compilation bits as you see fit to make th

[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: You may not be, but I am. :). Jeff is aware of PEP 475. Thanks for the awesome work on the real cleanup of this stuff in 3.5. Sanity at last. -- ___ Python tracker <http://bugs.python.org/issue23

[issue19511] lib2to3 Grammar file is no longer a Python 3 superset

2015-04-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: This was fixed in 3.4.1: https://hg.python.org/cpython/log/094615256a54/Lib/lib2to3/Grammar.txt i'm leaving this open to update the devguide. -- ___ Python tracker <http://bugs.python.org/is

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

2015-04-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: i'm moving this to the more recent issue as i like the patch in that one better. -- superseder: -> Fix EINTR Socket Module issues in 2.7 ___ Python tracker <http://bugs.python.org

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

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

[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: I like the socketmodule.c part of socket_eintr.1.patch, but it appears to still have the issue haypo describes in https://bugs.python.org/issue20611#msg240194 where connect() cannot be called more than once. The kernel carries on with the connect without

[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith keywords: +needs review stage: -> patch review type: -> behavior ___ Python tracker <http://bugs.python.or

[issue10838] subprocess __all__ is incomplete

2015-04-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: the things left to to before closing this are to rename mswindows and MAXFD as those shouldn't be exported... and to wait for the windows buildbots to tell me if i missed adding anything to the intentionally_excluded list in the uni

[issue10838] subprocess __all__ is incomplete

2015-04-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: Done. MAXFD was already gone in 3.5 (yay). -- assignee: -> gregory.p.smith resolution: -> fixed stage: needs patch -> commit review status: open -> closed type: -> behavior versions: +Python

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

2015-04-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm at pycon as well, we can get this taken care of here. :) -- ___ Python tracker <http://bugs.python.org/issue23342> ___ ___

[issue17630] Create a pure Python zipfile/tarfile importer

2015-04-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: Based on our hallway pow-wow at PyCon 2015 sprints day #1... I audited the zipfile module to confirm our suspicions about it being "large". In current Python 3.5 head's zipfile.py module here are the things it depends directly upon fro

[issue17630] Create a pure Python zipfile/tarfile importer

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

[issue23852] Wrong computation of max_fd on OpenBSD

2015-04-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: getrlimit() is not an async-signal-safe function according to http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html so you cannot call it from safe_get_max_fd(). having the getrlimit call done prior to the fork and using the value

[issue21148] avoid needless pointers initialization in small tuple creation

2015-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Running the https://hg.python.org/benchmarks suite against this change (edited to not have the warning about PyTupleObject* vs PyObject* types) I see no repeatably significant benefits and one that is consistently a few percent slower no matter how many

[issue9859] Add tests to verify API match of modules with 2 implementations

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

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

2015-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi - i didn't update the 2.7 docs. just 3.4 and 3.5. if some committer wants to, feel free. -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/is

[issue22046] ZipFile.read() should mention that it might throw NotImplementedError

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

[issue9014] Incorrect documentation of the PyObject_HEAD macro

2015-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: i used wiggin15's patch to start with. I'm now looking at akuchling's patch and will incorporate any additional things it adds (I missed that earlier). -- assignee: docs@python -> gregory.p.smith nosy

<    27   28   29   30   31   32   33   >