[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

[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2016-02-08 Thread Robert P Fischer
New submission from Robert P Fischer: Changes to OS X 10.11 render GCC's Objective-C compiler useless. However, I want to compile the main part of Python in GCC (because my C++ / Fortran Cython modules use GCC). I tried to build Python (via MacPorts) using Clang for Objective-C and GC

[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2016-02-09 Thread Robert P Fischer
Robert P Fischer added the comment: I'm trying to compile the Objective-C portions of Python (the Python Launcher app) with clang, not GCC. Why does Python insist on using GCC, even when I set the OBJC env variable to clang? That seems to be a problem that the Python project CAN fix. O

[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

[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2016-02-11 Thread Robert P Fischer
Robert P Fischer added the comment: > The makefiles use CC throughout and don't look at and OBJC variable. Is > that variable a standard way to specify an ObjC compiler in makefiles? I believe that OBJC and OBJCFLAGS are standard for Autoconf/Automake: https://www.gnu.org/softwa

[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2016-02-12 Thread Robert P Fischer
Robert P Fischer added the comment: Could this be fixed on 3.5 and 3.6? On Fri, Feb 12, 2016 at 2:34 PM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > 3.4 only gets security fixes > > -- > nosy: +terry.reedy > stage: -> needs patc

[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

[issue9014] Incorrect documentation of the PyObject_HEAD macro

2015-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: We no longer describe the contents of PyObject in the docs so mentioning Py_TRACE_REFS does not seem worth it as that just changes Py_HEAD_EXTRA which adds the doubly linked list to PyObject (today). Py_TRACE_REFS isn't useful for anyone to know

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

2015-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks! Patch applied. I reworded one doc string slightly and fixed up a few lines that were longer than 80 characters. Berker's most recent comments are good ones and can be addressed in another patch. Laura, can you jump through the

[issue9858] Python and C implementations of io are out of sync

2015-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: A test has been added as part of issue9859, it is marked with @unittest.skip as the API surface does not yet match. -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue9

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

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

[issue23852] Wrong computation of max_fd on OpenBSD

2015-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: yeah, that's fine. just surround the call to getrlimit with appropriate openbsd ifdef's and a comment. it is _probably_ async signal safe given the nature of the function in most implementations even though it isn't on the official posix li

[issue9858] Python and C implementations of io are out of sync

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

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

2015-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks! i'll close this later after some buildbot runs and any post-commit reviews. -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org

[issue23994] argparse fails to detect program name when there is a slash at the end of the program's path

2015-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think this was just overlooked when implementing argparse. Most code out there is likely to get the executable name using: os.path.basename(sys.argv[0]) Which is going to do exactly what you are seeing here when sys.argv[0] ends with a /. feel free to

[issue23989] Add recommendation to use requests to the documentation, per summit

2015-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: nice and simple. that wording looks good to me. -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue23

[issue23971] dict(list) and dict.fromkeys() doesn't account for 2/3 fill ratio

2015-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: Won't we always consume the memory thanks to a memset(newtable, 0, ...) https://hg.python.org/cpython/file/df28044b7e14/Objects/dictobject.c#l654 ? (also, i'm not sure if Windows is allocates mapped pages on demand as posix systems tend to) -

[issue23971] dict(list) and dict.fromkeys() doesn't account for 2/3 fill ratio

2015-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: fwiw, as for 2.7 i personally don't think I would change its behavior around this at this point. make sure 3.5+ do something desirable. (my link to dictobject.c above is from 2.7) -- ___ Python tracker

[issue8706] accept keyword arguments on most base type methods and builtins

2015-04-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: I wouldn't make an efficiency argument against it without trying it and showing reproducible degradation in the hg.python.org/benchmarks suite. On Sun, Apr 19, 2015, 10:31 PM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: >

[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: ... Code review: In socket_eintr.5.patch I don't think the thread safety concerns about the s.settimeout() calls being done from Python code should be an issue but I'll ponder that for a bit. When you've got a socket s, why would code e

[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: diverging discussion: Go re-read the documentation on os.times(). It is plural, it isn't just CPU time. (on POSIX os.times()[4] is likely to be the system uptime in seconds as a float... it cannot be changed like the absolute clock can, it is a rel

[issue11477] Incorrect operand precedence when implementing sequences in C

2015-04-25 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith versions: +Python 3.5 -Python 3.4 ___ Python tracker <http://bugs.python.org/issue11477> ___ ___ Python-bug

[issue9951] introduce bytes.hex method (also for bytearray and memoryview)

2015-04-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: bytes.hex-1.diff looks good, i'll take care of committing this and adding a what's new entry. thanks! -- assignee: ncoghlan -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker <http:/

[issue9951] introduce bytes.hex method (also for bytearray and memoryview)

2015-04-25 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker <http://bugs.python.o

[issue9951] introduce bytes.hex method (also for bytearray and memoryview)

2015-04-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: note quite fixed, looks like some of the buildbots are having fun not compiling with this change: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/9569/steps/compile/logs/stdio investigating... -- resolution: fixed -> sta

[issue9951] introduce bytes.hex method (also for bytearray and memoryview)

2015-04-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: i missed the hg adds :) -- ___ Python tracker <http://bugs.python.org/issue9951> ___ ___ Python-bugs-list mailing list Unsub

[issue9951] introduce bytes.hex method (also for bytearray and memoryview)

2015-04-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: I see some _Py_strhex related link errors on the Windows buildbots: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/9642/steps/compile/logs/stdio -- ___ Python tracker <http://bugs.python.

[issue9951] introduce bytes.hex method (also for bytearray and memoryview)

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

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

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

[issue15339] document the threading "facts of life" in Python

2015-04-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: This seems somewhat related to the "We need to document Python's concurrency and memory model" that came out at the language summit this year. -- nosy: +gregory.p.smith ___ Python tracker <http

[issue23852] Wrong computation of max_fd on OpenBSD

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

<    29   30   31   32   33   34   35   >