[issue43895] Unnecessary Cache of Shared Object Handles

2021-07-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset fed2fc4443235fa9669b73817827fd6da88e3417 by Ian Henriksen in branch 'main': bpo-43895: Remove an unnecessary cache of shared object handles (GH-25487) https://github.com/python/cpython/commit/fed2fc4443235fa9669b73817827fd6da88e3417

[issue44145] hmac.update is not releasing the GIL when openssl's hmac is used

2021-07-07 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

[issue43895] Unnecessary Cache of Shared Object Handles

2021-07-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith, twouters versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issu

[issue41486] Add _BlocksOutputBuffer for bz2/lzma/zlib module

2021-07-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset a9a69bb3ea1e6cf54513717212aaeae0d61b24ee by Ma Lin in branch 'main': bpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer (GH-26143) https://github.com/python/cpython/commit/a9a69bb3ea1e6cf54513717212aaeae0d61b24ee

[issue13788] os.closerange optimization

2021-07-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Code needed in a modern patch: 1) Use the system call if compile time configure detected it may be available. (if we just use syscall() rather than a libc wrapper, a configure check may not be necessary, but various #ifdefs likely are) 2) If (1) produces

[issue36991] zipfile: AttributeError on extract

2021-06-26 Thread Gregory P. Smith
Change by Gregory P. Smith : -- stage: patch review -> resolved status: pending -> closed ___ Python tracker <https://bugs.python.org/issue36991> ___ ___

[issue44458] Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules

2021-06-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: Good catch. We don't have buildbots statically linking the modules in these days, that'd be useful to prevent things like this from happening. -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue44458] Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules

2021-06-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset cf739332bd039cd2303b58663a804f784883820d by Miss Islington (bot) in branch '3.10': bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. (GH-26808) (GH-26844) https://github.com/python/cpython/commit

[issue44458] Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules

2021-06-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 92c2e91580521ba5c85aa3205a0211df5b48689b by Russell Keith-Magee in branch 'main': bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. (GH-26808) https://github.com/python/cpython/commit/92c2e91580521ba5c85aa3205a0211df5b48689b

[issue44458] Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules

2021-06-19 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker <https://bugs.python.org/issue44458> ___ ___ Python-bugs-list mailing list Un

[issue44107] HTTPServer can't close http client completely

2021-06-16 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: later -> not a bug status: open -> closed ___ Python tracker <https://bugs.python.org/issue44107> ___ ___ Pyth

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

2021-06-07 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.11 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue40120> ___ ___ Python-bugs-list mailin

[issue44334] Use bytearray in urllib.unquote_to_bytes

2021-06-07 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44334> ___ ___ Python-bugs-list mailin

[issue44334] Use bytearray in urllib.unquote_to_bytes

2021-06-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: fwiw this sort of thing may be reasonable to backport to 3.9 as it is more than just a performance enhancement but also a resource consumption bug and should result in no behavior change. """ In case of form contain very large data ( in my

[issue43776] Popen with shell=True yield mangled repr output

2021-06-02 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

[issue43776] Popen with shell=True yield mangled repr output

2021-06-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 5a8ddcc4524dca3880d7fc2818814ffae1cfb8a2 by Gregory P. Smith in branch '3.9': [3.9] bpo-43776: Remove list call from args in Popen repr (GH-25338) (GH-26510) https://github.com/python/cpython/commit/5a8ddcc4524dca3880d7fc2818814ffae1cfb8a2

[issue43776] Popen with shell=True yield mangled repr output

2021-06-02 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +25106 pull_request: https://github.com/python/cpython/pull/26510 ___ Python tracker <https://bugs.python.org/issue43

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-06-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset e60ab843cbb016fb6ff8b4f418641ac05a9b2fcc by Gregory P. Smith in branch 'main': bpo-44022: Improve the regression test. (GH-26503) https://github.com/python/cpython/commit/e60ab843cbb016fb6ff8b4f418641ac05a9b2fcc

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-06-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: Great catch! The new PR should address that. -- ___ Python tracker <https://bugs.python.org/issue44022> ___ ___ Python-bug

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-06-02 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +25099 pull_request: https://github.com/python/cpython/pull/26503 ___ Python tracker <https://bugs.python.org/issue44

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-06-01 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

[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

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

[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset d8fd8c8568cbc2f53c1abeda3596a89a46f0e3d7 by Ken Jin in branch 'main': bpo-42392: [docs] Add deprecated-removed loop labels for asyncio (GH-26357) https://github.com/python/cpython/commit/d8fd8c8568cbc2f53c1abeda3596a89a46f0e3d7

[issue37439] Add random.binomialvariate()

2021-05-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: A presumed optimal version of this is already available in numpy. https://numpy.org/doc/stable/reference/random/generated/numpy.random.Generator.binomial.html https://github.com/numpy/numpy/blob/2232a473f8713f532c8164c8cf616f7bd05f54a7/numpy/random

[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- title: remove the deprecated 'loop' parameter asyncio API -> [document removal of] the deprecated 'loop' parameter asyncio API in 3.10 ___ Python tracker <https://bugs.python.org/issu

[issue42392] remove the deprecated 'loop' parameter asyncio API

2021-05-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker <https://bugs.python.org/issu

[issue42392] remove the deprecated 'loop' parameter asyncio API

2021-05-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: There appear to be no versionchanged:: 3.10 in the asyncio docs on the APIs that formerly accepted a loop= parameter linking people to information on when that went away (3.10) and why. Specifically I'm talking about https://docs.python.org/3.10/library

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: Lets get equivalent whatsnew text into the 3.8 and 3.9 and 3.10 branches before closing it. -- ___ Python tracker <https://bugs.python.org/issue43

[issue42443] Provide Thread creation hook support

2021-05-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: > > * IMO it should be called after profiling and tracing hook, so non-trivial > > hooks can be profiled and traced. > Makes sense, Done. I updated the PR do this. (if your "Done" indicated you had done this somewhere, it appe

[issue44174] Unclear meaning of _Private__names in enum docs.

2021-05-18 Thread Gregory P. Smith
New submission from Gregory P. Smith : https://docs.python.org/3/library/enum.html#private-names """ _Private__names Private names will be normal attributes in Python 3.10 instead of either an error or a member (depending on if the name ends with an underscore). Using the

[issue22891] code removal from urllib.parse.urlsplit()

2021-05-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: There are still a lot of cleanliness and even logical issues lurking within urllib.parse. But this bug is dated and other changes have happened since. I'm closing it as out of date. Open new issues for specific action items. -- nosy

[issue37901] 21 tests fail when run on an IPv6-only host

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

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2021-05-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm making progress on https://bugs.python.org/issue37901 and related IPv6-only issues, the changes of which tend to shake out improper uses of 127.0.0.1 hardcoded. I'm closing this issue as there aren't specific needs that the rest won't cover

[issue40339] Instead of skipping, IPV6 test(s) fail on a non-IPV6 machine

2021-05-18 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Test suite fails when Ipv6 is unavailable ___ Python tracker <https://bugs.python

[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2021-05-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks! -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43650] MemoryError on zip.read in shutil._unpack_zipfile

2021-05-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks for the patch! -- resolution: remind -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43650] MemoryError on zip.read in shutil._unpack_zipfile

2021-05-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 7a588621c2854bcef6ce9eeb54349b84ac078c45 by Miss Islington (bot) in branch '3.10': bpo-43650: Fix MemoryError on zip.read in shutil._unpack_zipfile for large files (GH-25058) (GH-26190) https://github.com/python/cpython/commit

[issue44107] HTTPServer can't close http client completely

2021-05-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: Python is calling close() after the HTTP/1.0 request. This isn't a bug on the CPython side. -- nosy: +gregory.p.smith resolution: remind -> not a bug stage: -> resolved status: open -> closed _

[issue43650] MemoryError on zip.read in shutil._unpack_zipfile

2021-05-17 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith type: crash -> resource usage versions: +Python 3.10, Python 3.11 -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/i

[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2021-05-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: Questionable as to if this counts as a bug or not, but I agree it is counter-intuitive given the purpose of actually checking the .is_private property of an address. So updating the behavior makes sense, but I'll be conservative w.r.t. behavior changes

[issue39950] Add pathlib.Path.hardlink_to()

2021-05-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset b913f47e87f788e705716ae037ee9f68b4265e69 by Miss Islington (bot) in branch '3.10': bpo-39950: Fix deprecation warning in test for `pathlib.Path.link_to()` (GH-26155) (GH-26178) https://github.com/python/cpython/commit

[issue44145] hmac.update is not releasing the GIL when openssl's hmac is used

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

[issue44145] hmac.update is not releasing the GIL when openssl's hmac is used

2021-05-16 Thread Gregory P. Smith
New submission from Gregory P. Smith : This prevents parallel hmac computations. see michaelforney's comment left on https://github.com/python/cpython/pull/20129 where the problem was introduced when adding support for using OpenSSL's HMAC implementations. easy fix. PR coming. We don't

[issue38768] [feature request] Add lldb equivalent to Tools/gdb

2021-05-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: This would be useful beyond macOS. Clang/LLVM is the compiler toolchain of choice for a lot of the world these days. Including lldb. gdb cannot be assumed to be available or even work everywhere. This would be a great thing to have

[issue44002] Use functools.lru_cache in urllib.parse instead of 1996 custom caching

2021-05-11 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

[issue43743] BlockingIOError: [Errno 11] Resource temporarily unavailable: on GPFS.

2021-05-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: The logic for bailing out to a slow copy is currently: https://github.com/python/cpython/blob/main/Lib/shutil.py#L158 that condition appears to not be happening in Alexei's test. Suggesting that either at least one sendfile call succeeded and thus offset

[issue44091] traceback & inspect modules should verify that the .py source file matches the one that the running process is using

2021-05-09 Thread Gregory P. Smith
New submission from Gregory P. Smith : A long-standing wart in Python is that once a module is loaded, when rendering a traceback and including source lines, we do not verify if the source file we're loading is the same as the one representing the code we are running. It could have been

[issue44023] "tarfile" library will lead to "write any content to any file on the host".

2021-05-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: TL;DR - A tar file being extracted doesn't check to see if it is overwriting an existing file, which could be a symlink to elsewhere leading to elsewhere's contents being clobbered assuming the elsewhere file exists. doing an unlink before opening

[issue44058] 'master' refs in 3.10 version of .azure-pipelines

2021-05-07 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> pablogsal nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue44058> ___ ___ Python-bugs-list mai

[issue35663] webbrowser.py firefox bug [python3, windows 10]

2021-05-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: Others are reporting this works. if that is not true on the most recent python 3.9 release, please reopen with more detailed reproduction instructions. -- nosy: +gregory.p.smith resolution: -> works for me stage: -> needs patch status

[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: without inspecting the code: I wonder if this is related to the same change as https://bugs.python.org/issue44061 ? -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +3.10regression, 3.8regression, 3.9regression priority: normal -> high ___ Python tracker <https://bugs.python.org/issu

[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue44070> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +steve.dower ___ Python tracker <https://bugs.python.org/issue44070> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: There is no less intrusive fix as far as I can see. I believe we're down to either stick with what we've done, or do nothing. It doesn't have to be the same choice in all release branches, being more conservative with changes the older the stable branch

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: httplib.py is a Python 2 concept. Python 2 is end of life. bugs.python.org no longer tracks issues with its code. I don't doubt that Python 2.7 has bugs. As a matter of policy, we don't care - https://www.python.org/doc/sunset-python-2/. Python 3.6

[issue44059] Support SerenityOS Browser in webbrowser module

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks for the PR! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: FWIW, if we were to add a parameter, I'd lean towards a name of "invalid_url_characters = None" defaulting to using what's in our private _UNSAFE_URL_BYTES_TO_REMOVE global when None but otherwise letting the user specify a sequence of

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: Of note: If we had chosen to raise a ValueError (or similar) for these characters by default, the cloud-init code would also fail to behave as intended today (based on what I see in https://github.com/canonical/cloud-init/commit

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: We try to not add a new parameter in a bugfix release as that can be difficult to use. That said, adding a new bool keyword only parameter to control this behavior seems feasible. Unfortunately you already have to deal with the existence of 3.9.5 having

[issue44059] Support SerenityOS Browser in webbrowser module

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset fbefdaf92e40134c43142c182f7c5bfe406e4c2b by Miss Islington (bot) in branch '3.10': bpo-44059: Register the SerenityOS Browser in the webbrowser module (GH-25947) (GH-25950) https://github.com/python/cpython/commit

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: If anyone wants a CVE for it, that's up to them. This bug is in the CPython http.client module which is what urllib uses for http/https. I'd rate it low severity. A malicious server can hold a http connection from this library open as a network traffic

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: For completeness reference, the 'main' branch after the master->main rename also got fixed to check it early the same was as the release branches via: https://github.com/python/cpython/commit/985ac016373403e8ad41f8d563c4355ffa8d49ff our robot updat

[issue43743] BlockingIOError: [Errno 11] Resource temporarily unavailable: on GPFS.

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: I don't believe CPython should be working around a bug in specific Linux kernel versions in the standard library unless they are extremely pernicious and not considered to be a bug and thus ever be fixed in the OS kernel. As the sendfile system call

[issue44059] Support SerenityOS Browser in webbrowser module

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: Quite a humorous long list of historical browsers still in the webbrowser module. This can join the list. The PR should automerge after the CI runs complete. -- assignee: -> gregory.p.smith nosy: +gregory.p.sm

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: (obviously we're missing any tests for use of Path objects in this situation) -- stage: -> needs patch type: crash -> behavior ___ Python tracker <https://bugs.python.org/i

[issue43105] [Windows] Can't import extension modules resolved via relative paths in sys.path

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: This caused a regression described in https://bugs.python.org/issue44061 -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue43

[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: https://bugs.python.org/issue43105 and https://github.com/python/cpython/pull/25121 caused this regression. -- assignee: -> steve.dower keywords: +3.8regression, 3.9regression nosy: +gregory.p.smith, lukasz.langa, steve.dower priority: nor

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 60ba0b68470a584103e28958d91e93a6db37ec92 by Miss Islington (bot) in branch '3.10': bpo-44022: Fix http client infinite line reading (DoS) after a HTTP 100 Continue (GH-25916) (GH-25931) https://github.com/python/cpython/commit

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks guangli dong (leveryd)! This is in and the 3.10-3.6 PRs should automerge (thru 3.9) after the CI runs, or be merged by the release managers (3.6-3.8). -- resolution: -> fixed stage: patch review -> commit review status: open -&g

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: Mike: There may be multiple ways to read that WHATWG recommendation? The linked to section is about implementing a state machine for parsing a URL into parts safely. But that may not imply that anything that passed through that state machine should

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: The bug: Our http client can get stuck infinitely reading len(line) < 64k lines after receiving a '100 Continue' http response. So yes, this could lead to our client being a bandwidth sink for anyone in control of a server. Clear issue: That's a den

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith title: "urllib" will result to deny of service -> urllib http client possible infinite loop on a 100 Continue response versions: +Python 3.10, Python

[issue44050] Exceptions in a subinterpreter are changed by another subinterpreter

2021-05-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> eric.snow nosy: +eric.snow ___ Python tracker <https://bugs.python.org/issue44050> ___ ___ Python-bugs-list mai

[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil

2021-05-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- dependencies: +unaligned memory access in the _sha3 extension ___ Python tracker <https://bugs.python.org/issue44043> ___ ___

[issue36515] unaligned memory access in the _sha3 extension

2021-05-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +24594 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25927 ___ Python tracker <https://bugs.python.org/issu

[issue36515] unaligned memory access in the _sha3 extension

2021-05-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: that patch looks fine, i'll turn it into a PR. -- assignee: christian.heimes -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issu

[issue36515] unaligned memory access in the _sha3 extension

2021-05-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> christian.heimes versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issu

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks Florian! Indeed, I'm glad you have tests for this. (I expect anyone writing their own validation code will have such tests) Making urlsplit raise an exception where it never has before has other consequences: In CPython's own test suite

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Both Django and Botocore issues appear to be in the category of: "depending on invalid data being passed through our urlsplit API so that they could look for it later" Not much sympathy. We never guaranteed we'd pass invalid data through

[issue43883] Making urlparse WHATWG conformant

2021-05-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: FWIW rather than implementing our own URL parsing at all... wrapping a library extracted from a compatible-license major browser (Chromium or Firefox) and keeping it updated would avoid disparities. Unfortunately, I'm not sure how feasible this really

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: That makes sense. It seems like we're missing information signature() would need to be able to differentiate between when it should default to follow .__wrapped__ vs when it shouldn't. Neither default can satisfy everyone

[issue44003] functools.lru_cache omits __defaults__ attribute from wrapped function

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: rejecting. code trying to make direct use of __defaults__ is likely better off using inspect.signature(). there might be an issue with inspect in some cases (https://bugs.python.org/issue41232) but I do not believe that is true for lru_cache wrapped

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: Even if we shouldn't blindly propagate defaults (wrong in some wrapping scenarios), there is still a problem here as noted in Thor's opening message. A bug exists between functools.wraps and inspect.signature. The signature reported is wrong. why

[issue44003] functools.lru_cache omits __defaults__ attribute from wrapped function

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: Oh, I didn't realize mutating those would actually change the code runtime behavior. But it makes sense, those are needed before the code object is entered. Yeah that is different, and suggests making this the default is not actually desired

[issue44003] functools.lru_cache omits __defaults__ attribute from wrapped function

2021-05-01 Thread Gregory P. Smith
Change by Gregory P. Smith : -- type: behavior -> enhancement versions: -Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44003> ___ _

[issue44003] functools.lru_cache omits __defaults__ attribute from wrapped function

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: https://bugs.python.org/issue41232 covers the more general case of suggesting changing update_wrapper's behavior. That would alleviate the need to fix the pure python implementation within my own PR

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm working on a more specialized case of this for functools.lru_cache in bpo-issue44003. But I believe this issue also makes sense. It is basically suggesting that __defaults__ and __kwdefaults__ should be included in the default set of assigned

[issue44003] functools.lru_cache omits __defaults__ attribute from wrapped function

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: An inner function can't know if somebody else might want to inspect it. This is a decorator that does not change anything about the argument signature of the wrapped function, carrying over the reference to meta-information about that by default seems

[issue44003] functools.lru_cache omits __defaults__ attribute from wrapped function

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: __defaults__ and __kwdefaults__ get used for code introspection. Just as __annotations__ does. __annotations__ is already available on the lru_cache wrapped function. All of those seem to go together from a runtime inspection point of view

[issue44003] functools.lru_cache omits __defaults__ attribute from wrapped function

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

[issue44003] functools.lru_cache omits __defaults__ attribute from wrapped function

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: the pure python functools.lru_cache doesn't get this right either. here's a desirable testcase for this bug: ``` def test_lru_defaults_bug44003(self): @self.module.lru_cache(maxsize=None) def func(arg='ARG', *, kw='KW

[issue44003] functools.lru_cache omits __defaults__ attribute from wrapped function

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: That was anecdotal evidence: ``` Python 3.9.1 (v3.9.1:1e5d33e9b9, Dec 7 2020, 12:10:52) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>

[issue44002] Use functools.lru_cache in urllib.parse instead of 1996 custom caching

2021-05-01 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +24486 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25798 ___ Python tracker <https://bugs.python.org/issu

[issue44003] functools.lru_cache omits __defaults__ attribute from wrapped function

2021-05-01 Thread Gregory P. Smith
New submission from Gregory P. Smith : When the C implementation of functools.lru_cache was added in bpo/issue14373, it appears to have omitted setting `.__defaults__` on its wrapped function. ``` Python 3.10.0a7+ (heads/master-dirty:823fbf4e0e, May 1 2021, 11:10:30) [Clang 12.0.0 (clang

[issue44002] Use functools.lru_cache in urllib.parse instead of 1996 custom caching

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: Yeah, the Quoter class seems a little odd... Past notes of some the caching performance around the character quoting for quote() can be found in https://bugs.python.org/issue1285086 circa 2005-2010. -- nosy: -rhettinger

[issue44002] Use functools.lru_cache in urllib.parse instead of 1996 custom caching

2021-05-01 Thread Gregory P. Smith
New submission from Gregory P. Smith : `urllib.parse` has custom caching code for both `urlsplit()` and `quote()`. From 1996. https://github.com/python/cpython/commit/3fd32ecd9232fcb041b9f1f7a19a1e7e65cf11a0 https://github.com/python/cpython/commit/74495409861b357d9925937d6576229c74e2550d

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think there's still a flaw in the fixes implemented in 3.10 and 3.9 so far. We're closer, but probably not quite good enough yet. why? We aren't stripping the newlines+tab early enough. I think we need to do the stripping *right after

[issue41486] Add _BlocksOutputBuffer for bz2/lzma/zlib module

2021-04-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 251ffa9d2b16b091046720628deb6a7906c35d29 by Ma Lin in branch 'master': bpo-41486: Fix initial buffer size can't > UINT32_MAX in zlib module (GH-25738) https://github.com/python/cpython/commit/251ffa9d2b16b091046720628deb6a7906c35

[issue41486] Add _BlocksOutputBuffer for bz2/lzma/zlib module

2021-04-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: Renaming to OutputBuffer sounds like a good idea. On Thu, Apr 29, 2021, 7:55 PM Ma Lin wrote: > > Ma Lin added the comment: > > Found a backward incompatible behavior. > > Before the patch, in 64-bit build, zlib module allow

<    1   2   3   4   5   6   7   8   9   10   >