[issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential)

2020-08-29 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: -2 ___ Python tracker <https://bugs.python.org/issue36533> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41642] Buildbot: workers detached every minute and "no space left on device" issue

2020-09-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: The gps-* bots have been updated. -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue41642> ___ ___

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

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

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2020-09-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: On POSIX systems, keeping the file open means you will keep a handle to the original file in the case where something moves a new file into it's place (as is normal during software package updates) or otherwise unlinks the original. That is the situ

[issue37408] [DOC] Precise that Tarfile "format" argument only concerns writing.

2020-09-19 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: backport needed -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib"

2020-09-19 Thread Gregory P. Smith
Change by Gregory P. Smith : -- stage: backport needed -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue9146> ___ ___

[issue7946] Convoy effect with I/O bound threads and New GIL

2020-10-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: It's a known issue and has been outlined very well and still comes up from time to time in real world applications, which tend to see this issue and Dave's presentation and just work around it in any way possible for their system and move on

[issue38153] Normalize hashing algorithm names

2020-10-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: looks like it, thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34706] Signature.from_callable sometimes drops subclassing

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

[issue40423] Optimization: use close_range(2) if available

2020-10-11 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue40423> ___ ___ Python-bugs-list mailin

[issue40423] Optimization: use close_range(2) if available

2020-10-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: for reference, very recent Linux kernels appear to have gained a close_range syscall. http://lkml.iu.edu/hypermail/linux/kernel/2008.0/02649.html Your diff isn't quite sufficient as is. When depending on a syscall that has a function provided by

[issue40422] Light refactor: create a common _Py_closerange API

2020-10-11 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue40422> ___ ___ Python-

[issue40422] Light refactor: create a common _Py_closerange API

2020-10-11 Thread Gregory P. Smith
Change by Gregory P. Smith : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue40422> ___ ___ Pyth

[issue40423] Optimization: use close_range(2) if available

2020-10-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: Ah, yeah ENOSYS is it. I had to do this trick in older subprocess versions for something else. Still visible here in the old 2.7 backport: https://github.com/google/python-subprocess32/blob/main/_posixsubprocess.c#L801

[issue40423] Optimization: use close_range(2) if available

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

[issue38110] Use fdwalk() within os.closerange() impl if available

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

[issue40422] Light refactor: create a common _Py_closerange API

2020-10-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: Just reuse this bpo issue. I'll mark the PRs as "skip news"; don't worry about a new news blurb entry as it's all tied to the original one. -- status: closed -> open ___ Python track

[issue40422] Light refactor: create a common _Py_closerange API

2020-10-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 64eb259cc1e42a5f74b5911a518d2c50daa8d50b by Kyle Evans in branch 'master': bpo-40422: Move _Py_*_SUPPRESS_IPH bits into _Py_closerange (GH-22672) https://github.com/python/cpython/commit/64eb259cc1e42a5f74b5911a518d2c

[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-13 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue41972> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: FWIW I think your numbers look good, a small needle cut-off is likely a good idea. -- ___ Python tracker <https://bugs.python.org/issue41

[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: Another potential algorithm to consider in large needle situations is a Rabin-Karp rolling hash string search. If used, it's the kind of algorithm that I'd probably bail out to an alternate method on if a run of Rabin-Karp started having a high

[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: I assume a rolling hash is linear at best, even if you do add some skip ahead checks. -- ___ Python tracker <https://bugs.python.org/issue41

[issue36179] _hashopenssl has reference leaks in OOM case

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

[issue38693] Use f-strings instead of str.format within importlib

2020-10-19 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/issue38693> ___ ___ Python-bugs-list m

[issue38693] Use f-strings instead of str.format within importlib

2020-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Status: Waiting until after the importlib.metadata and importlib.resources backports drop support for both Python 2.7 and 3.5 as keeping them in sync would be a pain for maintainers (per jaraco on our sprint importlib-any chat today

[issue40423] Optimization: use close_range(2) if available

2020-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks Kyle! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

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

2020-10-19 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: gregory.p.smith -> stage: patch review -> ___ Python tracker <https://bugs.python.org/issue40360> ___ ___ Pyth

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

2020-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: status: lib2to3 PendingDeprecationWarning shipped in 3.9. Since we don't have a specific release planned for the final deprecation, I'll leave this issue open while we figure that out. Once we do, we should promote this to a regular Deprecat

[issue41586] Allow to set pipe size on subprocess.Popen.

2020-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 23c0fb8edd16fe6d796df2853a5369fd783e05b7 by Ruben Vorderman in branch 'master': bpo-41586: Add pipesize parameter to subprocess & F_GETPIPE_SZ and F_SETPIPE_SZ to fcntl. (GH-21921) https://github.com/python/

[issue41586] Allow to set pipe size on subprocess.Popen.

2020-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks Ruben! -- resolution: -> fixed stage: patch review -> commit review status: open -> closed type: -> enhancement ___ Python tracker <https://bugs.python

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

2020-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Parsing support for `f(**mapping)` support is indeed still missing. as lib2to3 is pending deprecation at this point, i'm not going to work on this. anyone is welcome to pick it up. modifying the lib2to3 grammar, and any related code, and adding a

[issue40133] Provide additional matchers for unittest.mock

2020-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: based on the reaction from those who own mock at this point, i'm going to close this. shipping more handy mock matchers with mock makes sense to me as they belong together. but i'm not willing to argue it if anyone thinks it'll be a mai

[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

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

[issue27898] regexp performance degradation between 2.7.6 and 2.7.12

2020-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: 2.7 is end of life. if you have regular expression performance issues with something in 3, please open a new issue. -- nosy: +gregory.p.smith resolution: -> wont fix stage: -> resolved status: pending -&g

[issue1260171] subprocess: more general (non-buffering) communication

2020-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: since the time this was filed, subprocess has evolved a lot and third party options for child process have appeared as well as modern things like: https://docs.python.org/3/library/asyncio-subprocess.html (stdlib) https://trio.readthedocs.io/en/stable

[issue40380] OS-related test failures on Linux in Python 3.8.2

2020-10-19 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38456] Reduce the time test_subprocess takes to complete.

2020-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: the slowest tests on Linux today (with number of seconds prepended on my system that runs the suite serially in 34 seconds on a debug build): 3.01 test_check_output_stdout_arg (test.test_subprocess.ProcessTestCaseNoPoll) ... ok 3.01

[issue38456] Reduce the time test_subprocess takes to complete.

2020-10-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi - handy command to get that python -m test.regrtest -v test_subprocess | ts '.%s' then process that using whatever you want to compute deltas and sort. i fed the output of that into: ``` #!/usr/bin/python3 """Parse `python

[issue41586] Allow to set pipe size on subprocess.Popen.

2020-10-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: this caused a variety of buildbot failures. investigating. -- resolution: fixed -> status: closed -> open ___ Python tracker <https://bugs.python.org/i

[issue41586] Allow to set pipe size on subprocess.Popen.

2020-10-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +21793 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/22839 ___ Python tracker <https://bugs.python.org/issu

[issue41586] Allow to set pipe size on subprocess.Popen.

2020-10-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 786addd9d07b6c712b8ea9ee06e1f9f41c1b67a1 by Gregory P. Smith in branch 'master': bpo-41586: Attempt to make the pipesize tests more robust. (GH-22839) https://github.com/python/cpython/commit/786addd9d07b6c712b8ea9ee06e1f9

[issue41586] Allow to set pipe size on subprocess.Popen.

2020-10-20 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

[issue42097] Python 3.7.9 logging/threading/fork hang

2020-10-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: If you use os.fork() or any of the multiprocessing start methods that call os.fork() with a process involving threads, this is expected behavior. os.fork() cannot be used in processes that have threads without potential for deadlock. Specifically, make

[issue35823] Use vfork() in subprocess on Linux

2020-10-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 976da903a746a5455998e9ca45fbc4d3ad3479d8 by Alexey Izbyshev in branch 'master': bpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe (GH-11671) https://github.com/python/cpyt

[issue35823] Use vfork() in subprocess on Linux

2020-10-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: now waiting to see how happy all of the buildbots are... We currently have a `__linux__` check in the code deciding VFORK_USABLE. >From what I can tell, vfork probably also works on macOS (darwin). Lets let this run for a bit on Linux and it can b

[issue35823] Use vfork() in subprocess on Linux

2020-10-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: > * To avoid repeating long parameter lists in several functions, we can move > them to a struct. The downside is that we'd need to convert child_exec() to > use that struct all over the place. I don't have a strong preference here. A

[issue35823] Use vfork() in subprocess on Linux

2020-10-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thank you for taking this on! I'm calling it fixed for now as the buildbots are looking happy with it. If issues with it arise we can address them. -- resolution: -> fixed stage: commit review -> resolved status: ope

[issue35823] Use vfork() in subprocess on Linux

2020-10-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 473db47747bb8bc986d88ad81799bcbd88153ac5 by Alexey Izbyshev in branch 'master': bpo-35823: subprocess: Fix handling of pthread_sigmask() errors (GH-22944) https://github.com/python/cpython/commit/473db47747bb8bc986d88ad81799bc

[issue35823] Use vfork() in subprocess on Linux

2020-10-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: regarding excluding the setsid() case: I was being conservative as I couldn't find a reference of what was and wasn't allowed after vfork. I found one thing suggesting that on macOS setsid() was not safe after vfork(). But that appeared to b

[issue35823] Use vfork() in subprocess on Linux

2020-10-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +21863 pull_request: https://github.com/python/cpython/pull/22945 ___ Python tracker <https://bugs.python.org/issue35

[issue42096] zipfile.is_zipfile incorrectly identifying a gzipped file as a zip archive

2020-10-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: for what it's worth: false positives are always going to be possible in any such "magic" check as is_zipfile is. we don't check the start of the file because zip files are defined by their end of file central directory which contains l

[issue35823] Use vfork() in subprocess on Linux

2020-10-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset be3c3a0e468237430ad7d19a33c60d306199a7f2 by Gregory P. Smith in branch 'master': bpo-35823: Allow setsid() after vfork() on Linux. (GH-22945) https://github.com/python/cpython/commit/be3c3a0e468237430ad7d19a33c60d

[issue35823] Use vfork() in subprocess on Linux

2020-10-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Nice links. LOL, yes, musl source was going to be my next stop if the larger libc sources proved impossible for a mere mortal to reason about. :) regarding macOS, agreed. If someone needs vfork() to work there, I believe it could be made to. Options

[issue35823] Use vfork() in subprocess on Linux

2020-10-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Performance improvement measured on a 1.4Ghz quad aarch64 A57 (nvidia jetson nano): #define VFORK_USABLE 1 test_subprocess: 36.5 seconds #undef VFORK_USABLE test_subprocess: 45 seconds Nice. I really didn't expect a 20% speedup on its testsuite

[issue42146] subprocess.Popen() leaks cwd in case of uid/gid overflow

2020-10-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset c0590c0033e86f98cdf5f2ca6898656f98ab4053 by Alexey Izbyshev in branch 'master': bpo-42146: Fix memory leak in subprocess.Popen() in case of uid/gid overflow (GH-22966) https://github.com/python/cpyt

[issue42096] zipfile.is_zipfile incorrectly identifying a gzipped file as a zip archive

2020-10-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: ZipFile.open() is not the code for opening a zip file. :) That's the code for opening a file embedded within an already constructed mode='r' archive as done the ZipFile.__init__() constructor. By the time you've gotten to the open() m

[issue42096] zipfile.is_zipfile incorrectly identifying a gzipped file as a zip archive

2020-10-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: The first four bytes of the file do not identify a zip file. A zip file is identified by the end of file central directory. Which you then must read entries of to determine where the start of the archive may be... often not at position zero

[issue42185] class body bytecode uses less efficient *_NAME opcodes

2020-10-28 Thread Gregory P. Smith
New submission from Gregory P. Smith : The opcodes generated for the closure defining a class body looks like they might be suboptimal. It seems stuck using the generic LOAD_NAME and STORE_NAME opcodes rather than the LOAD_GLOBAL and STORE_FAST and friends as one would expect and as happens

[issue42146] subprocess.Popen() leaks cwd in case of uid/gid overflow

2020-10-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset d3b4e068077dd26927ae7485bd0303e09d962c02 by Alexey Izbyshev in branch 'master': bpo-42146: Unify cleanup in subprocess_fork_exec() (GH-22970) https://github.com/python/cpython/commit/d3b4e068077dd26927ae7485bd0303

[issue42146] subprocess.Popen() leaks cwd in case of uid/gid overflow

2020-10-31 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

[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2020-11-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: at a glance, it looks like the PR needs updating. -- ___ Python tracker <https://bugs.python.org/issue13501> ___ ___ Pytho

[issue41877] Check against misspellings of assert etc. in mock

2020-11-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue41877> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41877] Check against misspellings of assert etc. in mock

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

[issue24651] Mock.assert* API is in user namespace

2020-11-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue24651> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24651] Mock.assert* API is in user namespace

2020-11-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.10 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue24651> ___ ___ Python-bugs-list mailin

[issue41877] Check against misspellings of assert etc. in mock

2020-11-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 4662fa9bfe4a849fe87bfb321d8ef0956c89a772 by vabr-g in branch 'master': bpo-41877 Check for asert, aseert, assrt in mocks (GH-23165) https://github.com/python/cpython/commit/4662fa9bfe4a849fe87bfb321d8ef0

[issue41877] Check against misspellings of assert etc. in mock

2020-11-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for the patch! I'm leaving this open as dealing with the other aspect: * Wrong attribute names around asserts: autospect/auto_spec -> autospec, set_spec -> spec_set is still a possibility. (given you also found a number of those in ou

[issue14903] dictobject infinite loop in module set-up

2020-11-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: I suspect so. If any modern supported python 3.x version runs into an issue like this I think opening a fresh bugreport is good. Closing as not reproducable / obsolete. -- resolution: -> out of date stage: test needed -> resolved status

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

2020-11-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: my bad :) -- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35560] format(float(123), "00") causes segfault in debug builds

2020-11-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: This bug was introduced into the Python 3.6.8 "bugfix" release. https://github.com/python/cpython/pull/23231 will fix it if anyone needs that on modern 3.6. -- nosy: +gregory.p.smith versions: +

[issue42329] typing classes do not have __name__ attributes in 3.7+

2020-11-11 Thread Gregory P. Smith
New submission from Gregory P. Smith : Python 3.7-3.10a1: ``` >>> List.__name__ Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/typing.py", line 760, in __getattr__ raise AttributeError(attr) AttributeError: __name__ >

[issue42329] typing classes do not have __name__ attributes in 3.7+

2020-11-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: Not a big deal if we don't, I just found it odd so I figured I'd pose the question. That it's been in three releases and only just now come up is pretty telling that isn't critical. The code in question was trying to identify public func

[issue42329] typing classes do not have __name__ attributes in 3.7+

2020-11-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: working as intended, they aren't classes. -- resolution: -> rejected stage: needs patch -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue42353] Proposal: re.prefixmatch method (alias for re.match)

2020-11-13 Thread Gregory P. Smith
New submission from Gregory P. Smith : A well known anti-pattern in Python is use of re.match when you meant to use re.search. re.fullmatch was added in 3.4 via https://bugs.python.org/issue16203 for similar reasons. re.prefixmatch would be similar: we want the re.match behavior, but want

[issue42353] Proposal: re.prefixmatch method (alias for re.match)

2020-11-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: My point is that re.match is a common bug when people really want re.search. re.prefixmatch makes it explicit and non-confusing and thus unlikely to be used wrong or misunderstood when read or reviewed. The term "match" when talking abo

[issue42367] Restore os.makedirs ability to apply mode to all directories created

2020-11-16 Thread Gregory P. Smith
New submission from Gregory P. Smith : os.makedirs used to pass its mode argument on down recursively so that every level of directory it created would have the specified permissions. That was removed in Python 3.7 as https://bugs.python.org/issue19930 as if it were a mis-feature. Maybe it

[issue19930] os.makedirs('dir1/dir2', 0) always fails

2020-11-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: This API change was not strictly a bugfix, it removed a feature existing code was relying on. https://bugs.python.org/issue42367 opened to reconcile the two. -- nosy: +gregory.p.smith ___ Python tracker <ht

[issue42367] Restore os.makedirs ability to apply mode to all directories created

2020-11-16 Thread Gregory P. Smith
Change by Gregory P. Smith : -- type: behavior -> enhancement ___ Python tracker <https://bugs.python.org/issue42367> ___ ___ Python-bugs-list mailing list Un

[issue42367] Restore os.makedirs ability to apply mode to all directories created

2020-11-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: For consistency, pathlib.Path.mkdir should also gain this option. -- ___ Python tracker <https://bugs.python.org/issue42

[issue40550] Popen.terminate fails with ProcessLookupError under certain conditions

2020-11-21 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issu

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

2020-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 31729366e2bc09632e78f3896dbce0ae64914f28 by Devin Jeanpierre in branch 'master': bpo-40791: Make compare_digest more constant-time. (GH-20444) https://github.com/python/cpython/commit/31729366e2bc09632e78f3896dbce0

[issue41655] New Node may not be visited in lib2to3.refactor.RefactoringTool.traverse_by

2020-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: I expect your overall logic is sound in the PR. But this is a public API change, and while we've typically exempted lib2to3 from needing to concern itself about deprecations and API changes by leaving it undocumented and explicitly promising not to

[issue41655] New Node may not be visited in lib2to3.refactor.RefactoringTool.traverse_by

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

[issue40550] Popen.terminate fails with ProcessLookupError under certain conditions

2020-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 01a202ab6b0ded546e47073db6498262086c52e9 by Filipe LaĆ­ns in branch 'master': bpo-40550: Fix time-of-check/time-of-action issue in subprocess.Popen.send_signal. (GH-20010) https://github.com/python/cpyt

[issue40550] Popen.terminate fails with ProcessLookupError under certain conditions

2020-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for the patch! PRs are in or on their way in for 3.10 and 3.9. The 3.8 auto-backport failed, if anyone wants it on a future 3.8.x please follow up with a manual cherry pick to make a PR for the 3.8 branch. -- resolution: -> fixed st

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2020-11-21 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue36906> ___ ___ Python-bugs-list mailin

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2020-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: (assigning to me as I want to help remi.lapeyre's .dedent() method PR move forward) -- assignee: -> gregory.p.smith ___ Python tracker <https://bugs.python.org

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2020-11-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: I expect several phases here: (1) add a .dedent() method to str (and bytes?) - behaviors to consider mirroring are textwrap.dedent() and inspect.cleandoc(). Given their utility and similarities, it makes sense to offer both behaviors; behavior could be

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-11-22 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +22357 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23467 ___ Python tracker <https://bugs.python.org/issu

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-11-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: It was a mere oversight that this didn't handle text= the same as universal_newlines=. I made a PR to keep their behavior consistent and match the documentation. -- ___ Python tracker <https://bugs.py

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

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

[issue42443] Provide Thread creation hook support

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

[issue42443] Provide Thread creation hook support

2020-11-23 Thread Gregory P. Smith
Change by Gregory P. Smith : -- components: +Library (Lib) ___ Python tracker <https://bugs.python.org/issue42443> ___ ___ Python-bugs-list mailing list Unsub

[issue42468] subprocess.CompletedProcess: Add boolean value

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

[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: My concern with this as an API change is if anyone is returning or passing a CompletedProcess instance around it may well be used in a context where None is a potential value. Existing code in that situation would ordinarily be doing a bare `if cp:` test

[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for the suggestion though ThatXliner. It is good for us to keep these things in mind for future API designs. That __bool__ exists and could be meaningful in some contexts is often overlooked. -- resolution: -> rejected st

[issue41200] Add pickle.loads fuzz test

2020-11-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: Given that pickle is documented as: """ Warning The pickle module is not secure. Only unpickle data you trust. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling. """ htt

[issue13781] gzip module does the wrong thing with an os.fdopen()'ed fileobj

2012-01-13 Thread Gregory P. Smith
New submission from Gregory P. Smith : gzip.GzipFile accepts a fileobj parameter with an open file object. Unfortunately gzip requires a filename be embedded in the gzip file and the gzip module code uses fileobj.name to get that. This results in the fake "" name from posixmodu

[issue6721] Locks in python standard library should be sanitized on fork

2012-01-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: A new lock type will NOT solve this. It is ALWAYS okay to clear all thread/threading module locks after a fork. They are and always have been process-local by definition so they are also by definition 100% invalid to any child process. Anyone who has

[issue13788] os.closerange optimization

2012-01-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: Reopening. Comments added to the code review. This issue is independent of the subprocess module issue in #8052. The _posixsubprocess.c has its own fd closing loop. http://hg.python.org/cpython/file/050c07b31192/Modules/_posixsubprocess.c#l118

<    12   13   14   15   16   17   18   19   20   21   >