[issue35276] Document thread safety

2020-08-24 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- nosy: +sir-sigurd ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41630] Visual Studio does not build the curses and curses.panel module

2020-08-24 Thread Maarten
Change by Maarten : -- keywords: +patch pull_requests: +21060 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21950 ___ Python tracker ___

[issue41630] Visual Studio does not build the curses and curses.panel module

2020-08-24 Thread Maarten
New submission from Maarten : When building python using Visual Studio, the curses and curses.module, are not getting built. -- components: Build, Library (Lib) messages: 375871 nosy: maarten priority: normal severity: normal status: open title: Visual Studio does not build the curses

[issue41534] argparse : allow_abbrev behavior between 3.7 and 3.8

2020-08-24 Thread paul j3
paul j3 added the comment: In your first example: In [29]: parser = argparse39.ArgumentParser(allow_abbrev=True) In [30]: parser.add_argument('-o'); In [32]: parser.parse_known_args(['-o','test'])

[issue41598] Adding support for rounding modes to builtin round

2020-08-24 Thread Steven D'Aprano
Steven D'Aprano added the comment: Okay Marco, I'm changing the title to reflect the new API (support for rounding modes rather than new round functions) and pushed the version to 3.10, since 3.9 is in feature freeze (no new features). This will probably need to be discussed on

[issue41513] High accuracy math.hypot()

2020-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Done! Thank you. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41513] High accuracy math.hypot()

2020-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 8e19c8be87017f6bef8e4c936b1e6ddacb558ad2 by Raymond Hettinger in branch 'master': bpo-41513: More accurate hypot() (GH-21916) https://github.com/python/cpython/commit/8e19c8be87017f6bef8e4c936b1e6ddacb558ad2 --

[issue41513] High accuracy math.hypot()

2020-08-24 Thread Tim Peters
Tim Peters added the comment: Do it! It's elegant and practical :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41513] High accuracy math.hypot()

2020-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: All the review comments have been addressed. I think it is a good as it can get. Any objections to committing the PR? -- ___ Python tracker

[issue41628] All unittest.mock autospec-generated methods are coroutine functions

2020-08-24 Thread Tom Most
Tom Most added the comment: Note that this can interact poorly with AsyncMock, introduced in Python 3.8, because it causes a mock generated from a mock produces an object with async methods rather than regular ones. In Python 3.7 chaining mocks like this would produce regular methods. (This

[issue41629] __class__ not set defining 'X' as . Was __classcell__ propagated to type.__new__?

2020-08-24 Thread mike bayer
New submission from mike bayer : This is likely related or a dupe of https://bugs.python.org/issue29270, but the error message is different. I'm posting this to confirm it's the same issue, or not, and to at least provide a google result for people who also see this error as 29270 seems to

[issue41628] All unittest.mock autospec-generated methods are coroutine functions

2020-08-24 Thread Tom Most
New submission from Tom Most : Given a class: class Foo: def bar(self): pass And an autospec'd mock of it: foo_mock = mock.create_autospec(spec=Foo) The result of `asyncio.iscoroutinefunction()` differs: asyncio.iscoroutinefunction(Foo.bar)# -> False

[issue41616] Global variable in whole project and Relative imports problem

2020-08-24 Thread Guido van Rossum
Change by Guido van Rossum : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39010] ProactorEventLoop raises unhandled ConnectionResetError

2020-08-24 Thread Steve Dower
Steve Dower added the comment: Any input from the asyncio experts? I don't have an issue with handling the exception in this case, and hopefully when someone is up to the task of dealing with the range of edge cases throughout this loop implementation, hopefully they can get the ordering of

[issue41627] Relocate user site packages on Windows 32-bit

2020-08-24 Thread Steve Dower
New submission from Steve Dower : Currently, the user site packages on Windows is %APPDATA%\Python\PythonXY. This can cause conflicts between the 32-bit and 64-bit versions of the runtime. We should switch the pattern to Python{sys.winver}, which is XY or XY-32, the same as elsewhere. This

[issue38533] v3.7.5 py script run ok with python.exe but not pythonw.exe (python silent console not working)

2020-08-24 Thread Steve Dower
Steve Dower added the comment: Assuming the fix for this was released, given lack of other information. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue41376] site.getusersitepackages() incorrectly claims that PYTHONNOUSERSITE is respected

2020-08-24 Thread Steve Dower
Change by Steve Dower : -- versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41513] High accuracy math.hypot()

2020-08-24 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file49424/hypot_flow.pdf ___ Python tracker ___ ___ Python-bugs-list

[issue13828] Further improve casefold documentation

2020-08-24 Thread Jim Jewett
Jim Jewett added the comment: Unicode probably won't make the correction, because of backwards compatibility. I do support the sentence suggested in Thorsten's most recent reply. Is expanding ligatures the only other normalization it does? Ideally, we should also mention that it shifts to

[issue41625] Add splice() to the os module

2020-08-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I don't recall the subtle differences between sendfile() and splice(). Basically, splice() is specialized for pipes: splice() only works if one of the file descriptors refer to a pipe. So you can use for e.g. socket-to-pipe or pipe-to-file without

[issue41617] __builtin_bswap16 is used without checking it is supported

2020-08-24 Thread STINNER Victor
STINNER Victor added the comment: > Older clang versions don't have __builtin_bswap16, According to https://github.com/nodejs/node/pull/7644 it's available in clang 3.2 but not in clang 3.0. I wrote PR 21949 to fix the issue: it only uses __has_builtin() if __clang__ is defined, it's

[issue41617] __builtin_bswap16 is used without checking it is supported

2020-08-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +21059 pull_request: https://github.com/python/cpython/pull/21949 ___ Python tracker ___

[issue41626] port shebang of tools from python2 to python3

2020-08-24 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +21058 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21948 ___ Python tracker ___

[issue41626] port shebang of tools from python2 to python3

2020-08-24 Thread hai shi
New submission from hai shi : After the EOL of python2, the shebang of tools should be ported from python2 to python3. some files like: https://github.com/python/cpython/blob/master/Objects/typeslots.py#L1 -- messages: 375855 nosy: shihai1991 priority: normal severity: normal

[issue38378] os.sendfile() has improperly named parameter

2020-08-24 Thread STINNER Victor
STINNER Victor added the comment: Well, since os.sendfile(in=fd) raises a syntax error, I don't think that it's really a backward incompatible change in practice. -- ___ Python tracker

[issue38378] os.sendfile() has improperly named parameter

2020-08-24 Thread STINNER Victor
STINNER Victor added the comment: I would prefer "2. Make "out" and "in" positional-only parameters". It would be a minor incompatible change, but it would make os.sendfile() more consistent with other functions like os.write() which only has positional-only parameters. -- nosy:

[issue41625] Add splice() to the os module

2020-08-24 Thread STINNER Victor
STINNER Victor added the comment: I don't recall the subtle differences between sendfile() and splice(). I recall that in early Linux versions, one was limited to sockets, and only on one side. But later, it became possible to pass two sockets, or one file on disk and one socket, etc.

[issue41625] Add splice() to the os module

2020-08-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +21057 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21947 ___ Python tracker

[issue41625] Add splice() to the os module

2020-08-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- assignee: -> pablogsal components: +Library (Lib) versions: +Python 3.10 ___ Python tracker ___

[issue41625] Add splice() to the os module

2020-08-24 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : The splice system call moves data between two file descriptors without copying between kernel address space and user address space. This can be a very useful addition for libraries implementing low-level file management. -- messages:

[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-08-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +21056 pull_request: https://github.com/python/cpython/pull/21946 ___ Python tracker ___

[issue31526] Allow setting timestamp in gzip-compressed tarfiles

2020-08-24 Thread Maarten
Maarten added the comment: My previous comment should have contained: Because I noticed the timestamp was not included in the CRC, ... -- ___ Python tracker ___

[issue31526] Allow setting timestamp in gzip-compressed tarfiles

2020-08-24 Thread Maarten
Maarten added the comment: I have the same issue. The timestamp is inserted here: https://github.com/python/cpython/blob/802726acf6048338394a6a4750835c2cdd6a947b/Lib/tarfile.py#L419-L420 Because I noticed the timestamp was not included in the timestamp, I could zero it by doing: ``` with

[issue41534] argparse : allow_abbrev behavior between 3.7 and 3.8

2020-08-24 Thread r1kk3r
r1kk3r added the comment: Another issue: parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument('-verbose', type=int, required=True, dest="bla", help="bla") known_args, rest_of_args = parser.parse_known_args(["-v", "-verbose=2"]) With python 3.8.5 test.py: error: argument

[issue13828] Further improve casefold documentation

2020-08-24 Thread Thorsten
Thorsten added the comment: I see. I found the documents. That's an issue. That usage is incorrect. It is still valid to upper case "ß" to SS since "ẞ" is fairly new as an official German character, but the other way around is not valid. As such the current sentence in documentation also

[issue41624] typing.Coroutine documentation

2020-08-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. This seems to be a reasonable suggestion. Would you like to open a PR for this? -- keywords: +easy, newcomer friendly nosy: +xtreak ___ Python tracker

[issue41623] What's the by-design behavior when os.fork() is invoked in an asyncio loop?

2020-08-24 Thread Guido van Rossum
Guido van Rossum added the comment: As you,can tell from thencode this by design. The child,must create a new event loop explicitly,ifmitmwants to use asyncio, and all,existing Futures are off limits. Fork is dangerous. Don't use unless you understand it. -- nosy: +gvanrossum

[issue13828] Further improve casefold documentation

2020-08-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Correctness of casefolding is defined by the Unicode standard, which currently states that "ß" folds to "ss". -- ___ Python tracker ___

[issue41621] defaultdict miss behave when using default_factory passed as kwargs

2020-08-24 Thread Dennis Sweeney
Dennis Sweeney added the comment: PR 21945 changes the signature: - defaultdict(default_factory[, ...]) + defaultdict(default_factory=None, /, [...]) -- ___ Python tracker

[issue13828] Further improve casefold documentation

2020-08-24 Thread Thorsten
Thorsten added the comment: German example in casefolding is plain incorrect. #Casefolding is similar to lowercasing but more aggressive because it is #intended to remove all case distinctions in a string. For example, the #German lowercase letter 'ß' is equivalent to "ss". Since it is

[issue41621] defaultdict miss behave when using default_factory passed as kwargs

2020-08-24 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch nosy: +Dennis Sweeney nosy_count: 3.0 -> 4.0 pull_requests: +21055 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21945 ___ Python tracker

[issue41624] typing.Coroutine documentation

2020-08-24 Thread MingZhe Hu
New submission from MingZhe Hu : The documentation [1] for Coroutine in typing library writes: class typing.Coroutine(Awaitable[V_co], Generic[T_co T_contra, V_co]) which should be: class typing.Coroutine(Awaitable[V_co], Generic[T_co, T_contra, V_co]) a comma is missed between the first

[issue41621] defaultdict miss behave when using default_factory passed as kwargs

2020-08-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is intentional behaviour, the factory can only be passed as a positional argument. The documentation[1] mentions this, although its probably possible to write this a bit clearer. [1]

[issue41623] What's the by-design behavior when os.fork() is invoked in an asyncio loop?

2020-08-24 Thread simin lin
New submission from simin lin : I have the same quesion in stackoverflow. Please refer to https://stackoverflow.com/questions/63558555/whats-the-by-design-behavior-when-os-fork-is-invoked-in-an-asyncio-loop to get a better format. Does asyncio work with os.fork()? Code Snippet 1: import

[issue41597] Fatal Error on SSL Transport - sslv3 alert bad record mac

2020-08-24 Thread Mototsugu Emori
Mototsugu Emori added the comment: Thank you for your reply. I understand that websocket cannot be used in multiple threads. I close the issue. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue41596] Re: Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2020-08-24 Thread Mototsugu Emori
Mototsugu Emori added the comment: Thank you for your reply. I understand that websocket cannot be used in multiple threads. I close the issue. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue41566] Include much faster DEFLATE implementations in Python's gzip and zlib libraries. (isa-l)

2020-08-24 Thread Ruben Vorderman
Ruben Vorderman added the comment: > If you take this route, please don't write it directly against the CPython > C-API (as you would for a CPython stdlib module). Thanks for reminding me of this. I was planning to take the laziest route possible anyway, reusing as much code from cpython as