[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

[issue45145] Case of headers in urllib.request.Request

2021-09-08 Thread E . M . P . Höller
New submission from E. M. P. Höller : urllib.request.Request internally .capitalize()s header names before adding them, as can be seen here: https://github.com/python/cpython/blob/3.9/Lib/urllib/request.py#L399 Since HTTP headers are case-insensitive, but dicts are not, this ensures that

[issue36132] Python cannot access hci_channel field in sockaddr_hci

2019-02-27 Thread Andrew P. Lentvorski, Jr.
New submission from Andrew P. Lentvorski, Jr. : On Linux, sockaddr_hci is: struct sockaddr_hci { sa_family_t hci_family; unsigned short hci_dev; unsigned short hci_channel; }; Unfortunately, it seems like python does not allow any way to initialize hci_channel

[issue36132] Python cannot access hci_channel field in sockaddr_hci

2019-02-27 Thread Andrew P. Lentvorski, Jr.
Andrew P. Lentvorski, Jr. added the comment: It's up to you how you folks want to deal with this, but classifying it as a "bug" for those versions in bugfix is likely acceptable. You already have to call bind with a tuple, so as long as it is *optional* to add an extra fiel

[issue20783] bytearray init fails when \x00 is present

2014-02-26 Thread Andrew P. Lentvorski, Jr.
New submission from Andrew P. Lentvorski, Jr.: The byte array init fails when \x00 is present This fails: ggRAM = bytearray(RAM_SIZE_BYTES, '\x00'*RAM_SIZE_BYTES) However, this works: ggRAM = bytearray(RAM_SIZE_BYTES) ggRAM[:] = '\x00'*RAM_SIZE_BYTES -- componen

[issue20783] bytearray init fails when \x00 is present

2014-02-26 Thread Andrew P. Lentvorski, Jr.
Andrew P. Lentvorski, Jr. added the comment: Ayup, I are an idiot. Sorry. ggRAM = bytearray('\x00'*RAM_SIZE_BYTES) Works fine. -- status: open -> closed ___ Python tracker <http://bugs.pytho

[issue20783] bytearray init fails when \x00 is present

2014-02-26 Thread Andrew P. Lentvorski, Jr.
Changes by Andrew P. Lentvorski, Jr. : -- resolution: -> invalid ___ Python tracker <http://bugs.python.org/issue20783> ___ ___ Python-bugs-list mai

[issue20803] struct.pack_into writes 0x00 for pad bytes

2014-02-28 Thread Andrew P. Lentvorski, Jr.
New submission from Andrew P. Lentvorski, Jr.: This code did something unexpected to me: >>> a = bytearray('1234') >>> a bytearray(b'1234') >>> struct.pack_into('xBxB', a, 0, 0x59, 0x5A) >>> a bytearray(b'\x00Y\x00Z')

<    30   31   32   33   34   35