[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-

[issue24230] tempfile.mkdtemp() doesn't work with bytes paths

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

[issue10354] tempfile.template is broken

2015-05-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: backwards compatibility with what? i'd like to just remove tempfile.template in 3.5 as part of addressing issue24230. -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/is

[issue24230] tempfile.mkdtemp() doesn't work with bytes paths

2015-05-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: it seems a little messy to code this up the way Lib/tempfile.py is written but i'll take a stab at it tonight. Probably via parallel implementations of the methods internally rather than conditional logic throughout given how they

[issue24230] tempfile.mkdtemp() doesn't work with bytes paths

2015-05-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Attached is a patch with implementation, tests and docs. I didn't have to duplicate too much thankfully. Just figure out where to put the type conversions. Review would be nice, but I'll err on the side of getting this in before beta 1 (May 24

[issue24230] tempfile.mkdtemp() doesn't work with bytes paths

2015-05-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: code review comments addressed. -- Added file: http://bugs.python.org/file39464/issue24230-gps02.diff ___ Python tracker <http://bugs.python.org/issue24

[issue24230] tempfile.mkdtemp() doesn't work with bytes paths

2015-05-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: updated, thanks for the great reviews. -- Added file: http://bugs.python.org/file39469/issue24230-gps03.diff ___ Python tracker <http://bugs.python.org/issue24

[issue24230] tempfile.mkdtemp() doesn't work with bytes paths

2015-05-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: that should take care of it. if you see any other issues with this post commit, either raise them here or fix them directly. the reviews were helpful. -- resolution: -> fixed stage: patch review -> commit review status: open -&g

[issue27928] Add hashlib.scrypt

2016-09-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: Rather than PyArg_ParseTupleAndKeywords can you have it use argument clinic? Also, how about making all arguments other than password be keyword only so that code calling the function is more clear. Otherwise it's a bit of positional argument soup with

[issue27928] Add hashlib.scrypt

2016-09-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: If clinic doesn't support required keyword only args then don't worry about it for now. :) -- ___ Python tracker <http://bugs.python.o

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

2016-09-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: Minor edit to avoid printing the message about --with-optimizations when doing a --with-pydebug build. otherwise this patch works well on Ubuntu xenial 16.04 amd64. >From discussions in the CPython Core Sprint room today - we've agreed that we

[issue26307] no PGO for built-in modules with `make profile-opt`

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

[issue27983] "Cannot perform PGO build because llvm-profdata was not found in PATH" error upon make

2016-09-06 Thread Gregory P. Smith
New submission from Gregory P. Smith: patch in issue26307 (which should be in soon) and do the following: $ CC=clang ../3.6/configure --with-optimizations $ make profile-opt Error: Cannot perform PGO build because llvm-profdata was not found in PATH Please add it to PATH and run ./configure

[issue27983] "Cannot perform PGO build because llvm-profdata was not found in PATH" error upon make

2016-09-06 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- dependencies: +CPython build options for out-of-the box performance ___ Python tracker <http://bugs.python.org/issue27

[issue27983] "Cannot perform PGO build because llvm-profdata was not found in PATH" error upon make

2016-09-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: i meant issue26359 above, not 26307. -- ___ Python tracker <http://bugs.python.org/issue27983> ___ ___ Python-bugs-list mailin

[issue27928] Add hashlib.scrypt

2016-09-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: No, scrypt is a simple new feature. An extension module on PyPI is the appropriate place for that for 2.6 through 3.5. Wholly unrelated to PEP466. -- ___ Python tracker <http://bugs.python.org/issue27

[issue27983] "Cannot perform PGO build because llvm-profdata was not found in PATH" error upon make

2016-09-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith versions: -Python 3.6 ___ Python tracker <http://bugs.python.org/issue27983> ___ ___ Python-

[issue26307] no PGO for built-in modules with `make profile-opt`

2016-09-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: My change means that the build/ directory tree exists but won't have any files other than *.gc?? files in it after a make clean. I doubt this will bother anyone. That felt better for clean than just avoiding the removal of build/ ent

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

2016-09-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker <http://bugs.python.org/issue26359> ___ ___ Python-bugs-list mailing list Un

[issue27983] "Cannot perform PGO build because llvm-profdata was not found in PATH" error upon make

2016-09-08 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue27983> ___ ___

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

2016-09-08 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue26359> ___ ___

[issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker

2016-09-08 Thread Gregory P. Smith
New submission from Gregory P. Smith: The error message you will see when building may look something like: clang -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fprofile-instr-generate -flto Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o

[issue28032] --with-lto builds segfault in many situations

2016-09-08 Thread Gregory P. Smith
New submission from Gregory P. Smith: configure --with-optimizations is failing on the Debian --with-optimizations buildbot: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.x/builds/2448/steps/compile/logs/stdio The compiled python is segfaulting when it goes to run the

[issue28032] --with-lto builds segfault in many situations

2016-09-08 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +alecsandru.patrascu stage: -> needs patch type: -> crash ___ Python tracker <http://bugs.python.org/issue28032> ___ __

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

2016-09-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: see https://bugs.python.org/issue28032 for flaws with --with-optimizations builds. -- ___ Python tracker <http://bugs.python.org/issue26

[issue28032] --with-lto builds segfault in many situations

2016-09-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: That is effectively what this devolves to. i'm going to try "gcc and gcc > 5.4" implies --with-lto as part of --with-optimizations for now. but if that causes problems, i'll just remove the --with-lto implication from --with

[issue28032] --with-lto builds segfault in many situations

2016-09-08 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue21541] Provide configure option --with-ssl for compilation with custom openssl

2016-09-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: machyniak: Your patch appears to be missing the diff to configure.ac. -- stage: patch review -> needs patch ___ Python tracker <http://bugs.python.org/issu

[issue25969] Update lib2to3 grammar to include missing unpacking generalizations.

2016-09-08 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker <http://bugs.python.org/issue25969> ___ ___ Python-bugs-list mailing list Un

[issue28035] make buildbottest when configured --with-optimizations can cause a recompile?

2016-09-08 Thread Gregory P. Smith
New submission from Gregory P. Smith: See the logs from this build for example: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.x/builds/4 Notice how the test stdio shows it recompiling all over again. This is happening even on a "successful" test: http://buildbot.

[issue28035] make buildbottest when configured --with-optimizations can cause a recompile?

2016-09-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: having fixed this that way... I wonder why we bother having the buildbottest target depend on a compilation target at all. buildbots always do a separate compile and test phase, we should really use a make target that assumes the compile phase has finished

[issue28039] x86 Tiger buildbot needs __future__ with_statement

2016-09-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: Why do we even have a Tiger buildbot in 2016? MacOS X Tiger 10.4 was released in 2005. It is 11 years old. Support for it from Apple ended 7 years ago in 2009. -- ___ Python tracker <http://bugs.python.

[issue26700] Make digest_size a class variable

2016-09-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: I agree that adding a .default_digest_size attribute to the constructors in the hashlib module would be good... the challenge is in actually doing it. Today they are not classes, they are built-in functions that come from one of two possible extension

[issue25969] Update lib2to3 grammar to include missing unpacking generalizations.

2016-09-09 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- keywords: +patch Added file: http://bugs.python.org/file44518/issue25969-gps01.diff ___ Python tracker <http://bugs.python.org/issue25

[issue25969] Update lib2to3 grammar to include missing unpacking generalizations.

2016-09-09 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- versions: -Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue25969> ___ ___ Python-bugs-list mailin

[issue25969] Update lib2to3 grammar to include missing unpacking generalizations.

2016-09-09 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

[issue25969] Update lib2to3 grammar to include missing unpacking generalizations.

2016-09-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: Haha whoops, that'd be my debugging. I'll remove it this weekend if nobody else has gotten to it. On Sat, Sep 10, 2016, 9:44 AM Xiang Zhang wrote: > > Xiang Zhang added the comment: > > Gregory, the change adds a print in: > http

[issue28086] test.test_getargs2.TupleSubclass test failure

2016-09-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm marking this as a deferred blocker as i believe we want this resolved before we exit the betas. -- nosy: +gregory.p.smith priority: normal -> deferred blocker ___ Python tracker <http://bugs

[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: This shouldn't be happening and makes no sense. It looks like the assert statement was removed at import code compilation time given the pdb trace with it from a zip file vs with it outside of a zip file: >>> pdb.run('mod.test(False

[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: from the zip: >>> dis.dis(mod.test) 3 0 LOAD_GLOBAL 0 (print) 2 LOAD_FAST0 (val) 4 CALL_FUNCTION1 6 POP_TOP 8 LOAD_CONST

[issue8844] Condition.wait() doesn't raise KeyboardInterrupt

2016-09-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: As a data point confirming that: we tried backporting the much nicer non-polling condition implementation (https://github.com/python/cpython/commit/15801a1d52c25fa2a19d649ea2671080f138fca1.patch) to our Python 2.7 interpreter at work but ran into actual

[issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called

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

[issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called

2016-10-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks! I didn't apply the fix to 3.5 (or earlier - those are closed) as it could arguably be seen as adding a new API and there are valid workarounds by asserting on the list of calls directly. -- resolution: -> fixed stage: -> co

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

2016-10-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: we talented! -- ___ Python tracker <http://bugs.python.org/issue27122> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28637] Python startup performance regression

2016-11-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: re: Ethan's question - I think the enum use should be restored in re. I realize issue28082 (yay palindrome number) is not an urgent change but we created IntEnum for the purpose of more identifiable integer constants. So a microbenchmark of "

[issue28032] --with-lto builds segfault in many situations

2016-11-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: The configure flag has been renamed to --enable-optimizations in the following commits for 3,5, 3.6, default, & 2.7 branches (everywhere it exists): remote: notified python-check...@python.org of incoming changeset c0ea81315fb6 remote: notified python-c

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

2016-11-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: per comments in issue28032 the new configure flag has been renamed from --with-optimizations to --enable-optimizations in all branches it was added to: remote: notified python-check...@python.org of incoming changeset c0ea81315fb6 remote: notified python

[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks for the patch. I reworked it slightly including the test. warning in 3.6, gone in 3.7. i still need to update the 3.7 docs to remove it. -- ___ Python tracker <http://bugs.python.org/issue20

[issue28032] --with-lto builds segfault in many situations

2016-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: doc references fixed. thanks! remote: notified python-check...@python.org of incoming changeset a5e2add2c37b remote: notified python-check...@python.org of incoming changeset 6ae0e6d435de remote: notified python-check...@python.org of incoming changeset

[issue28032] --with-lto builds segfault in many situations

2016-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: This is no longer a release blocker as --with-lto is not enabled by default by --enable-optimizations since my commits in September. Regarding --with-lto itself segfaulting... Fixing compiler+linker toolchains is beyond what CPython itself should do. But

[issue10414] Python does not work on an IPv6 only host

2016-11-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: Reopening to expand upon this issue which is still a large problem: If you run on an IPv6-only Linux host, the following standard library tests all fail: test_asynchat, test_asyncio, test_asyncore, test_docxmlrpc, test_epoll, test_httpservers, test_logging

<    28   29   30   31   32   33