[issue41440] os.cpu_count doesn't work on VxWorks RTOS

2020-08-03 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker <https://bugs.python.org/issue41440> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue41406] subprocess: Calling Popen.communicate() after Popen.stdout.read() returns an empty string

2020-08-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: A workaround should be pass bufsize=0. There might be performance consequences. That depends on your read patterns and child process. If this is to be supported and fixed, the selectors used in POpen._communicate on the POSIX side presumably don't

[issue41355] os.link(..., follow_symlinks=False) without linkat(3)

2020-07-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for the analysis Eryk! I think you are right, changing the default to match the behavior that people have actually been experiencing on `os.link(src, dst)` makes sense. Possible suggestion: We can go one step further if anyone believes

[issue33129] Add kwarg-only option to dataclass

2020-07-22 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker <https://bugs.python.org/issue33129> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue41310] micro-optimization: increase our float parsing speed by Nx

2020-07-15 Thread Gregory P. Smith
New submission from Gregory P. Smith : See https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/ for inspiration and a reference (possibly a library to use, but if not the techniques still apply). Primarily usable when creating the float objects from the string data as is common

[issue41293] fix confusing example in hashlib docs

2020-07-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: I probably I wrote these docs (a long time ago). The examples are being used to demonstrate different uses of the APIs including calling update multiple times, different algorithms, a binary digest and a hex digest. They weren't mean to show

Roundup issue tracker 2.0.0 released (supports python 3)

2020-07-13 Thread John P. Rouillard
ions: https://sourceforge.net/p/roundup/mailman/ About Roundup = Roundup is a simple-to-use and install issue-tracking system with command-line, web and e-mail interfaces. It is based on the winning design from Ka-Ping Yee in the Software Carpentry "Track" desig

[issue22239] asyncio: nested event loop

2020-07-08 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker <https://bugs.python.org/issue22239> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue41111] Convert a few stdlib extensions to the limited C API

2020-07-05 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue38980] Compile libpython with -fno-semantic-interposition

2020-07-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: Yes this should become part of --with-optimizations when building on a platform using a compiler that (a) supports it and (b) where it matters. If this is only relevant on --enable-shared builds (not the default), i'd assume also make it conditional

[issue38980] Compile libpython with -fno-semantic-interposition

2020-07-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: and to echo others: Do not worry about LD_PRELOAD users trying to override internals. That is not a supported use case. It is always a hack. anyone using it knows this. -- ___ Python tracker <ht

[issue41151] Support for new Windows pseudoterminals in the subprocess module

2020-06-28 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +steve.dower ___ Python tracker <https://bugs.python.org/issue41151> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-28 Thread Ravi Teja P
Ravi Teja P added the comment: Hi My CLA has been approved. Can someone review the PR. -- ___ Python tracker <https://bugs.python.org/issue41004> ___ ___ Pytho

[issue35823] Use vfork() in subprocess on Linux

2020-06-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: No objections, it would be great to see this finished up and land. I've encountered a minority of users who are using a wrapped vfork-based C/C++ library for process spawning as fork+exec isn't fast enough for them

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-21 Thread Ravi Teja P
Ravi Teja P added the comment: Hi I have raised a PR for this. But my PLA is yet to be updated (I have singed it). But add the fix to the existing versions (3.8, 3.9 and 3.10), do I need to raise PR for each of those branches? -- ___ Python

[issue41058] pdb reads source files using the locale encoding

2020-06-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: The 3.7 PR is up to the release manager to decide on, it probably isn't worth merging there as this i not security related. thanks for the fix Serhiy! -- nosy: +gregory.p.smith ___ Python tracker <ht

[issue41058] pdb reads source files using the locale encoding

2020-06-21 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41067] Haiku build fix - posix module

2020-06-21 Thread Gregory P. Smith
New submission from Gregory P. Smith : This type of change might make more sense to integrate into configure.ac and pyconfig.h.in. (does haiku use autoconf?) But even if not, lets not scatter haiku ifdef HAIKU references all over the codebase. Such ifdef's to redefine things should

[issue41059] Large number of Coverity reports for parser.c

2020-06-21 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +christian.heimes ___ Python tracker <https://bugs.python.org/issue41059> ___ ___ Python-bugs-list mailing list Unsub

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-21 Thread Ravi Teja P
Change by Ravi Teja P : -- nosy: +rvteja92 nosy_count: 4.0 -> 5.0 pull_requests: +20204 pull_request: https://github.com/python/cpython/pull/21033 ___ Python tracker <https://bugs.python.org/issu

[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +20187 pull_request: https://github.com/python/cpython/pull/21013 ___ Python tracker <https://bugs.python.org/issue41

[issue41059] Large number of Coverity reports for parser.c

2020-06-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- components: +Interpreter Core ___ Python tracker <https://bugs.python.org/issue41059> ___ ___ Python-bugs-list mailing list Unsub

[issue41059] Large number of Coverity reports for parser.c

2020-06-20 Thread Gregory P. Smith
New submission from Gregory P. Smith : Here's an example: *** CID 1464688: Control flow issues (DEADCODE) /Parser/parser.c: 24243 in _tmp_147_rule() 24237 && 24238 (z = disjunction_rule(p)) // disjunction 24239 ) 24240

[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: those were the three in the email (20 of 106), i need to figure out how to login to coverity again to see the rest. -- ___ Python tracker <https://bugs.python.org/issue41

[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +20185 pull_request: https://github.com/python/cpython/pull/21011 ___ Python tracker <https://bugs.python.org/issue41

[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +20183 pull_request: https://github.com/python/cpython/pull/21009 ___ Python tracker <https://bugs.python.org/issue41

[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +20181 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21007 ___ Python tracker <https://bugs.python.org/issu

[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-20 Thread Gregory P. Smith
New submission from Gregory P. Smith : *** CID 1464693: Null pointer dereferences (REVERSE_INULL) /Modules/_zoneinfo.c: 1625 in parse_abbr() 1619 ptr++; 1620

[issue40133] Provide additional matchers for unittest.mock

2020-06-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: I suggest waiting to see what I come up with as a proposal for what part(s) of this makes sense in the stdlib and why. I've closed the PR. Nothing is going to be added to mock without your agreement. This issue is not a high priority for me, but leaving

[issue40971] Documentation still mentions 'u' string formatting option

2020-06-13 Thread Gordon P. Hemsley
New submission from Gordon P. Hemsley : https://docs.python.org/3/library/stdtypes.html#old-string-formatting still lists the 'u' string formatting option, described as "Obsolete type – it is identical to 'd'." and linking to PEP 237. However, testing indicates that Python 3 does n

[issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn

2020-06-12 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.10, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue37193> ___ ___ Python-bugs-list m

[issue40955] subprocess_fork_exec leaks memory when extra_groups are supplied

2020-06-12 Thread Gregory P. Smith
Change by Gregory P. Smith : -- title: subprocess_fork_exec leaks memory -> subprocess_fork_exec leaks memory when extra_groups are supplied ___ Python tracker <https://bugs.python.org/issu

[issue35823] Use vfork() in subprocess on Linux

2020-06-08 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.10 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue35823> ___ ___ Python-bugs-list mailin

[issue25782] CPython hangs on error __context__ set to the error itself

2020-05-30 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: -gregory.p.smith ___ Python tracker <https://bugs.python.org/issue25782> ___ ___ Python-bugs-list mailing list Unsub

[issue40818] Run sys.__interactivehook__ for asyncio REPLs

2020-05-29 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker <https://bugs.python.org/issue40818> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: I expect the best decision to be to get rid of tempfile.tempdir entirely. That would need be its own issue with a deprecation period involved. A process global that alters behavior of all calls into a module that don't explicitly opt-out is a bad API

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'd feel fine doing that for 3.9 given 3.9.0 is only in beta and this changes no public APIs. For 3.8 and 3.7 i wouldn't. Be sure to update the versionchanged in the docs if you choose to do it for 3.9

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: We consider it closer to new feature as it changes existing behavior in a way that people cannot _depend_ on being present in older Python releases as it'd only appear in a bugfix release, so most people could never write code depending on it while

[issue40791] hmac.compare_digest could try harder to be constant-time.

2020-05-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: Christian - Devin could likely use some help with the build/ifdef plumbing required for (2) to use CRYPTO_memcmp from Modules/_operator.c when OpenSSL is available. -- assignee: -> christian.heimes ___ Pyt

[issue40133] Provide additional matchers for unittest.mock

2020-05-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: I disagree. Many of these do belong in the stdlib and we don't need a python-ideas bike shedding 300 message thread about something so trivial. We've been using these internally at Google for years. Its on my plate to identify which ones to accept

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: Could you please turn that into a Github PR? -- ___ Python tracker <https://bugs.python.org/issue40701> ___ ___ Python-bug

[issue40746] test_gdb failing on Raspbian on 3.9, regression from 3.8

2020-05-23 Thread Gregory P. Smith
New submission from Gregory P. Smith : https://buildbot.python.org/all/#/builders/727 test_tuples (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of tuples ... ok test_bt (test.test_gdb.PyBtTests) Verify that the "py-bt" command works ... FAIL Stderr: Python Excepti

[issue40743] [CMake] It's 2020, where is CMake?

2020-05-23 Thread pmp-p
pmp-p added the comment: Hi, I'm always curious about others experiences : why would you need cross-platform building for any of the officially supported platforms ? Also on some random unsupported platforms that require cross-compilation like maybe android, wasm or other uncommon posix

[issue40710] Malfunctioning of '\r'

2020-05-21 Thread pmp-p
pmp-p added the comment: Hi, i can't reproduce on standard terminals, what is your OS version and terminal application ( also please state value of $TERM ) -- nosy: +pmpp ___ Python tracker <https://bugs.python.org/issue40

[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2020-05-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 6a5d3ff67644af42b1a781be2eacb2e82913441c by Gregory P. Smith in branch 'master': bpo-40636: Clarify the zip built-in docstring. (GH-20118) https://github.com/python/cpython/commit/6a5d3ff67644af42b1a781be2eacb2e82913441c

[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2020-05-15 Thread Gregory P. Smith
New submission from Gregory P. Smith : PEP 618 https://www.python.org/dev/peps/pep-0618 discussions are still on going. This issue is being filed to track an implementation, assuming the PEP is accepted and one is decided upon. I'm filing it now, as I can at least use the issue

[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2020-05-15 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +19422 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20118 ___ Python tracker <https://bugs.python.org/issu

[issue39946] Remove _PyThreadState_GetFrame

2020-05-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks! We use this function internally in some VM traceback grabbing code but the best solution looks to just be for us to adopt the patch to 3.9 on our interpreter until we're running on 3.9. -- nosy: +gregory.p.smith

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-05-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 18f1c60a1625d341a905c7e07367c32c08f222df by Miro Hrončok in branch 'master': bpo-40360: Add a What's New entry for lib2to3 pending deprecation (GH-19898) https://github.com/python/cpython/commit/18f1c60a1625d341a905c7e07367c32c08f222df

[issue40482] _hashlib: register Python names as OpenSSL aliases

2020-05-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: Adding aliases in openssl is presumably process global right? Is that wise given it'd mean other openssl using c/c++ code in the process would now see the same aliases and could behave differently when used with python vs without? On Sun, May 3, 2020, 3:55

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think what we're doing with the documentation update is fine. We can add a warning on stderr to the tool in 3.11. But I don't expect people will be using the tool _from_ the latest CPython 3.x by then. 2to3 is already included with Python 2.7

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 503de7149d03bdcc671dcbbb5b64f761bb192b4d by Carl Meyer in branch 'master': bpo-40360: Deprecate lib2to3 module in light of PEP 617 (GH-19663) https://github.com/python/cpython/commit/503de7149d03bdcc671dcbbb5b64f761bb192b4d

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Okay,the pending deprecation is in. Keeping open as a reminder to turn that into a real DeprecationWarning in 3.10 after the 3.9 branch is cut. We'll then want to track reminding us to remove it in 3.12

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-21 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +18969 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19645 ___ Python tracker <https://bugs.python.org/issu

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-21 Thread Gregory P. Smith
Change by Gregory P. Smith : -- components: +2to3 (2.x to 3.x conversion tool) stage: -> needs patch ___ Python tracker <https://bugs.python.org/issu

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-21 Thread Gregory P. Smith
New submission from Gregory P. Smith : Based on the PEP 617 acceptance thread on python-dev, lib2to3 is eventually going to run into trouble parsing modern syntax a few releases from now. It would be better off maintained outside of the standard library. It gets used by a lot of things

[issue40313] bytes.hex(sep, bytes_per_sep) is many times slower than manually inserting the separators

2020-04-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker <https://bugs.python.org/issue40313> ___ ___ Python-bugs-list mailing list Un

[issue35967] Better platform.processor support

2020-04-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: raspbian failure https://buildbot.python.org/all/#/builders/645/builds/31 -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue35

[issue40255] Fixing Copy on Writes from reference counting

2020-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Marking everything as immortal/eternal after you've loaded your common code & data but before you do your forking is thenorm for this kind of serving system. You already presumably have a defined lifetime for the processes so they'll likely be set to

[issue40280] Consider supporting emscripten/webassembly as a build target

2020-04-14 Thread pmp-p
pmp-p added the comment: you can add * https://github.com/pmp-p/pydk/tree/master/sources.em/Python-3.8.0b4.patchset -- Python 3.8.x (wasm not asm.js, clang-10+ required) demo https://pmp-p.github.io/python-next/test.html CPython can already run in the browser with very little patching

[issue40255] Fixing Copy on Writes from reference counting

2020-04-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for sharing! It's good to have a patch implementing for others who might need it to try out. We experimented with an implementation of this on CPython 2.7 that we called Eternal Refcounts for YouTube many years ago. For the same reason (saving

[issue40220] Modules/gcmodule.c:434: update_refs: Assertion "gc_get_refs(gc) != 0" failed

2020-04-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: bad buildbot hardware. i've taken that bot offline. -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> crash ___ Python tracker <https://bugs.python

[issue40220] Modules/gcmodule.c:434: update_refs: Assertion "gc_get_refs(gc) != 0" failed

2020-04-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: While I did a general apt update on that worker, I suspect I may have knocked the heatsink loose over the weekend while dealing with an upcoming bot sitting behind it on the shelf. That'd explain why it is alternately crashing and making mystery results

Roundup issue tracker 2.0.0beta0 release

2020-04-06 Thread John P. Rouillard
run:: python demo.py Release info and download page: https://pypi.org/project/roundup Source and documentation is available at the website: http://roundup-tracker.org/ Mailing lists - the place to ask questions: https://sourceforge.net/p/roundup/mailman/ About Roundup ===

[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-05 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker <https://bugs.python.org/issue40174> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue40120] Undefined C behavior going beyond end of struct via a [1] arrays.

2020-04-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: PyBytesObject could become a struct that contains a single opaque internal struct. there is some code out there that references PyBytesObjects internals by field name but my searches across a broad swath of code so far seem to suggest that is so rare

[issue40120] Undefined C behavior going beyond end of struct via a [1] arrays.

2020-04-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: agreed, being opaque seems ideal. -- ___ Python tracker <https://bugs.python.org/issue40120> ___ ___ Python-bugs-list mailin

[issue36541] Make lib2to3 grammar better match Python, support the := walrus

2020-04-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: Support for `:=` is in, are we still lacking `f(**not x)` support? -- ___ Python tracker <https://bugs.python.org/issue36

[issue36541] Make lib2to3 grammar better match Python, support the := walrus

2020-04-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: master/3.9 changeset: https://github.com/python/cpython/commit/3c3aa4516c70753de06bb142b6793d01330fcf0f 3.8 changeset: https://github.com/python/cpython/commit/1098671e4e5ec1513247f05598158eaa3428c5be

[issue36541] Make lib2to3 grammar better match Python, support the := walrus

2020-04-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 96c5f5a3a3fabf43e8114d0dbc30bed409da1ba6 by Tim Hatch in branch '3.7': [3.7] bpo-36541: lib2to3: Support named assignment expressions (GH-12702) (GH-19317) https://github.com/python/cpython/commit/96c5f5a3a3fabf43e8114d0dbc30bed409da1ba6

[issue40120] Undefined C behavior going beyond end of struct via a [1] arrays.

2020-04-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: updates: - extern "C" is indeed really only about linking so it has no bearing. What I'm hearing from talking to our C++ compiler team is unfortunately sad: The C++ standard does not support flexible array member syntax on purpose becaus

[issue40120] Undefined C behavior going beyond end of struct via a [1] arrays.

2020-03-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: Isn't the only actual way for a C .h file to be compatible with C++ via extern "C" { } which all of our non-meta include files appear to have already? -- ___ Python tracker <https://bugs.python.o

[issue40120] Undefined C behavior going beyond end of struct via a [1] arrays.

2020-03-31 Thread Gregory P. Smith
Change by Gregory P. Smith : -- title: Undefined C behavior going beyond end of struct via a char[1]. -> Undefined C behavior going beyond end of struct via a [1] arrays. ___ Python tracker <https://bugs.python.org/issu

[issue40120] Undefined C behavior going beyond end of struct via a [1] arrays.

2020-03-31 Thread Gregory P. Smith
Change by Gregory P. Smith : -- stage: patch review -> needs patch ___ Python tracker <https://bugs.python.org/issue40120> ___ ___ Python-bugs-list mai

[issue40120] Undefined C behavior going beyond end of struct via a char[1].

2020-03-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: """ The [1] thing is used in more places: PyObject *f_localsplus[1]; in PyFrameObject PyObject *ob_item[1]; in PyTupleObject void *elements[1]; in asdl_seq and int elements[1];` in asdl_int_seq digit ob_digit[1]; in PyLongObject Py_ssi

[issue40120] Undefined C behavior going beyond end of struct via a char[1].

2020-03-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: >From the PR comment thread (as I opened that first): """Well, there was no other choice in ISO C89 than using char ob_sval[1];, no? Is char ob_sval[]; supported by the C compiler supported by CPython? Like Visual Studio, GCC, clang

[issue40120] Undefined C behavior going beyond end of struct via a char[1].

2020-03-30 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue40120> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40120] Undefined C behavior going beyond end of struct via a char[1].

2020-03-30 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +18592 pull_request: https://github.com/python/cpython/pull/19232 ___ Python tracker <https://bugs.python.org/issue40

[issue40120] Undefined C behavior going beyond end of struct via a char[1].

2020-03-30 Thread Gregory P. Smith
New submission from Gregory P. Smith : The correct C99 way to do this is using a char[]. PyBytesObject and unicode's struct encoding_map both do this. Unclear to me if we should backport this to earlier versions or not (because PyBytesObject may be exposed?) Probably, but I also doubt

[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: marking as a 2.7 release blocker just to get benjamin's RM attention before the final 2.7. -- assignee: gregory.p.smith -> benjamin.peterson nosy: +benjamin.peterson priority: high -> release blocker stage: resolved -> patch review statu

[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: If anyone cares about 2.7, the *final* release is coming up in a few weeks. They'll need to figure out what it looks like there and get a 2.7 PR reviewed by the release manager. -- resolution: -> fixed stage: patch review -> resolved

[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for the PR Ashwin! -- assignee: -> gregory.p.smith ___ Python tracker <https://bugs.python.org/issue38576> ___ _

[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2020-03-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 9165addc22d05e776a54319a8531ebd0b2fe01ef by Ashwin Ramaswami in branch 'master': bpo-38576: Disallow control characters in hostnames in http.client (GH-18995) https://github.com/python/cpython/commit/9165addc22d05e776a54319a8531ebd0b2fe01ef

[issue39857] subprocess.run: add an extra_env kwarg to complement existing env kwarg

2020-03-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think those dict unpacking and merging options are sufficient that adding an extra_env= parameter would merely complicate the already over complex API. Thanks for the suggestions folks! -- resolution: -> rejected stage: -> resolved

[issue39892] Enable DeprecationWarnings by default when not explicit in unittest.main()

2020-03-07 Thread Gregory P. Smith
New submission from Gregory P. Smith : Recurring theme: The stdlib has the issue of DeprecationWarning being added to APIs we are changing or removing a few versions in the future yet we perceive that many people never actually bother to try checking their code for deprecation warnings

[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-03-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI - I updated the ubsan buildbot to clang 9 so this one shows up in there now: /var/lib/buildbot/workers/clang-ubsan/3.x.gps-clang-ubsan.clang-ubsan/build/Modules/_struct.c:487:28: runtime error: load of value 116, which is not a valid value for type

[issue13487] inspect.getmodule fails when module imports change sys.modules

2020-03-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: If anyone else has a way to reproduce this issue, please run your tests with a 3.7/3.8/3.9 interpreter with the fix I committed applied and report back if you still see this failure on that line. I believe this to be fixed based on my own testing so I am

[issue13487] inspect.getmodule fails when module imports change sys.modules

2020-03-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Testing by changing list(sys.modules.items()) to sys.modules.copy().items() internally with a large integration test that was reliably flaky on this line before shows that the .copy().items() worked. The test is reliable again. So I've gone ahead

[issue13487] inspect.getmodule fails when module imports change sys.modules

2020-03-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 85cf1d514b84dc9a4bcb40e20a12e1d82ff19f20 by Gregory P. Smith in branch 'master': bpo-13487: Use sys.modules.copy() in inspect.getmodule() for thread safety. (GH-18786) https://github.com/python/cpython/commit

[issue13487] inspect.getmodule fails when module imports change sys.modules

2020-03-04 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +18143 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/18786 ___ Python tracker <https://bugs.python.org/issu

[issue13487] inspect.getmodule fails when module imports change sys.modules

2020-03-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Serhiy: Why is dict.copy() not thread safe? if what you say of list(dict) being safe, iterating over that and looking up the keys would work. But all of this is entirely non-obvious to the reader of the code. all of these _look_ like they should be safe

[issue13487] inspect.getmodule fails when module imports change sys.modules

2020-03-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi - we just had a test run into this (in a flaky manner - definitely a race condition) at work: ``` ... for f in inspect.stack(context=0) File "/inspect.py", line 1499, in stack return getouterframes(sys._getframe(1), conte

[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-03-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: fwiw oss-fuzz also finds this on struct (via ubsan) https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20949 struct.unpack('?', ' ') -- ___ Python tracker <https://bugs.python.org/issue39

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

2020-03-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: I _doubt_ there is code expecting the default year when unspecified to actually be 1900. Change that default to any old year with a leap year (1904?) and it'll still (a) stand out as a special year that can be looked up should it wind up being _used_

[issue39794] Add --without-decimal-contextvar option to use just threads in decimal

2020-03-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: While i don't think this was needed in 3.7 and 3.8, you kept the default behavior the same so I don't think it is a problem. If someone builds an interpreter with this configure flag, does it break compatibility with anything that code may have started

[issue32630] Migrate decimal to use PEP 567 context variables

2020-03-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI - this appears to have caused a regression - https://bugs.python.org/issue39776 -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue32

[issue39769] compileall.compile_dir(..., ddir="") omits the intermediate package paths when prepending the prefix

2020-03-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: if anyone needs this on their older 3.6 or 3.5 trees, the 3.7/3.8 patch is a trivial backport. -- stage: patch review -> commit review status: open -> closed ___ Python tracker <https://bugs.p

[issue39769] compileall.compile_dir(..., ddir="") omits the intermediate package paths when prepending the prefix

2020-03-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 7c64726ced3d6b5d04537386d6a9ca6d179c3be4 by Gregory P. Smith in branch '3.7': [3.7] bpo-39769: Fix compileall ddir for subpkgs. (GH-18676) (GH-18718) (GH-18725) https://github.com/python/cpython/commit

[issue39769] compileall.compile_dir(..., ddir="") omits the intermediate package paths when prepending the prefix

2020-03-01 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +18082 pull_request: https://github.com/python/cpython/pull/18725 ___ Python tracker <https://bugs.python.org/issue39

[issue39769] compileall.compile_dir(..., ddir="") omits the intermediate package paths when prepending the prefix

2020-03-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset ce720d3e0674d6ac6f1b950c20a89be4cfde7853 by Gregory P. Smith in branch '3.8': bpo-39769: Fix compileall ddir for subpkgs. (GH-18676) (GH-18718) https://github.com/python/cpython/commit/ce720d3e0674d6ac6f1b950c20a89be4cfde7853

<    3   4   5   6   7   8   9   10   11   12   >