[issue42176] Valgrind reports "Conditional jump or move depends on uninitialised value(s)" in `PyUnicode_AsEncodedString` and `PyUnicode_Decode`

2020-10-28 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42190] global declarations affect too much inside exec or compile

2020-10-28 Thread Kevin Shweh
New submission from Kevin Shweh : A global declaration inside a function is only supposed to affect assignments inside that function, but in code executed with exec, a global declaration affects assignments outside the function: >>> gdict = {} >>> ldict = {} >>> exec('x = 1', gdict, ldict)

[issue42163] _replace() no longer works on platform.uname_result objects

2020-10-28 Thread Robert O'Callahan
Robert O'Callahan added the comment: I filed issue 42189, which is similar but maybe worse: copy.deepcopy() is broken for platform.uname_result objects. -- nosy: +rocallahan ___ Python tracker

[issue42189] copy.deepcopy() no longer works on platform.uname_result objects

2020-10-28 Thread Robert O'Callahan
New submission from Robert O'Callahan : Starting from Python 3.9, copy.deepcopy can't copy a platform.uname_result object. ``` Python 3.9.0 (default, Oct 6 2020, 00:00:00) [GCC 10.2.1 20200826 (Red Hat 10.2.1-3)] on linux Type "help", "copyright", "credits" or "license" for more

[issue42187] Deprecating / removing token.ISTERMINAL/ISNONTERMINAL

2020-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: I thought for all? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42188] forkserver not reused in child processes

2020-10-28 Thread Colin
New submission from Colin : The docstring on Forkserver.ensure_running states that a child process will use the forkserver process started by its parent: """ Make sure that a fork server is running. This can be called from any process. Note that usually a child process will just reuse the

[issue42186] unittest overrides more serious warnings filter added before unittest.main()

2020-10-28 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems to be a duplicate of https://bugs.python.org/issue15626. See also https://bugs.python.org/issue31975 -- nosy: +ncoghlan ___ Python tracker

[issue42176] Valgrind reports "Conditional jump or move depends on uninitialised value(s)" in `PyUnicode_AsEncodedString` and `PyUnicode_Decode`

2020-10-28 Thread Boris Staletic
Boris Staletic added the comment: Thanks for looking into this. > Looks like a bug in valgrind. That actually explains why I wasn't able to reproduce this problem on my local machine. Ubuntu 20.04 comes with valgrind 3.15.0, while my local machine has 3.16.1. Upgrading valgrind on Ubuntu

[issue42186] unittest overrides more serious warnings filter added before unittest.main()

2020-10-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42173] Drop Solaris support

2020-10-28 Thread Yonatan Goldschmidt
Change by Yonatan Goldschmidt : -- nosy: +Yonatan Goldschmidt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42187] Deprecating / removing token.ISTERMINAL/ISNONTERMINAL

2020-10-28 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Since there are so few projects, maybe you can just contact them? For NT_OFFSET? -- ___ Python tracker ___

[issue42187] Deprecating / removing token.ISTERMINAL/ISNONTERMINAL

2020-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: Since there are so few projects, maybe you can just contact them? -- ___ Python tracker ___

[issue42187] Deprecating / removing token.ISTERMINAL/ISNONTERMINAL

2020-10-28 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: -3.4regression ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42176] Valgrind reports "Conditional jump or move depends on uninitialised value(s)" in `PyUnicode_AsEncodedString` and `PyUnicode_Decode`

2020-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It points on strcmp(lower, "us_ascii") == 0. Seems that the compiler optimizes calling strcmp() with compile-time constant "us_ascii" by reading and comparing first 8 bytes as single word. But if lower contains "latin1" it has only 7 bytes initialized,

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

2020-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It cannot use LOAD_GLOBAL because the name can be not global. For example: def f(self): ... f = property(f) It cannot use STORE_FAST and LOAD_FAST because they work with specific representation of locals as array, but in a class body it can be

[issue36281] OSError: handle is closed for ProcessPoolExecutor and run_in_executor

2020-10-28 Thread Joel Lopes Da Silva
Change by Joel Lopes Da Silva : -- nosy: +JoeKun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42061] Document __format__ method for IPv[46]Address

2020-10-28 Thread Teugea Ioan-Teodor
Change by Teugea Ioan-Teodor : -- keywords: +patch pull_requests: +21933 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23018 ___ Python tracker

[issue42187] Deprecating / removing token.ISTERMINAL/ISNONTERMINAL

2020-10-28 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : Since the parser & symbol modules are removed, there is no real use case for ISTERMINAL/ISNONTERMINAL since the only input that contains grammar symbols is the input of the tokenize, which all its outputs are terminals. Which restricts the practicality

[issue42186] unittest overrides more serious warnings filter added before unittest.main()

2020-10-28 Thread Yilei Yang
New submission from Yilei Yang : Because unittest adds a `default` filter before tests run, other warnings filters are overridden if added before. Ideally, unittest should not make the warnings less serious, e.g. if there is already an 'error' filter that raises exception, it shouldn't

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

2020-10-28 Thread Brandt Bucher
Brandt Bucher added the comment: In any case, I think the proposed change could break the current behavior: >>> x = "global" >>> class C: ... x = "local" ... l = x ... del x ... g = x ... >>> C.l 'local' >>> C.g 'global' -- ___

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

2020-10-28 Thread Brandt Bucher
Brandt Bucher added the comment: Actually, that doesn't make much sense in this context (more relevant would be a class-within-a-class or class-within-a-function). I need to think about this more... -- ___ Python tracker

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

2020-10-28 Thread Brandt Bucher
Brandt Bucher added the comment: Hm, I believe it is related to the reason why we need to use LOAD_CLASSDEREF instead of LOAD_DEREF with nonlocal names in class scope. If I understand correctly, the purpose is to keep nonlocal statements in methods from referencing class-level names. >From

[issue27886] Docs: the difference between rename and replace is not obvious

2020-10-28 Thread Ezio Melotti
Change by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42024] Exception ignored in: .remove at 0x7f6a325f2ea0>

2020-10-28 Thread Zachary Ware
Change by Zachary Ware : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2020-10-28 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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

[issue42184] pdb exits unexpectedly when calling args

2020-10-28 Thread Adam Merchant
New submission from Adam Merchant : When an objects __repr__ or __str__ methods return None a TypeError is raised. However if this object is passed to a function and `args` is called from within pdb, pdb will immediately exit. Attached to this is bug_example.py which contains a simple

[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-28 Thread Gobot1234
New submission from Gobot1234 : Using asyncio.wait_for and asyncio.all_tasks in combination causes a stack overflow error. Code to reproduce issue: ``` import asyncio async def func(): return asyncio.all_tasks() async def main(): print(await asyncio.wait_for(func(), timeout=10))

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: Cool. Please add me to the nosy list of any issues you open. Also, if you're interesting helping out with the match statement, once the SC approves it, we'll need to add docs for that. See issue42128 for a possible plan. --

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-28 Thread Ken Jin
Ken Jin added the comment: @guido, you're welcome! I'm thinking of updating the temporary hyperlinks for GenericAlias/PEP 585 in Union, subscriptions and typing, I'll submit 2 separate PRs since subscription and typing require backporting. If I think of anything major, I'll open a separate

[issue42128] Structural Pattern Matching (PEP 634)

2020-10-28 Thread Brandt Bucher
Brandt Bucher added the comment: I'll wait till the SC makes a ruling, then send a message to our docs list (I think we have one)? I'm fine coordinating/reviewing that, or making PRs myself if nobody else steps up. -- ___ Python tracker

[issue42128] Structural Pattern Matching (PEP 634)

2020-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: If you feel up to it, you might see if you could open a new, separate (draft) PR that updates all those docs. (But you could also wait and see if someone volunteers. There are some good doc writers active ATM.) --

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Ken Ji! Are you planning more doc patches? -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue42128] Structural Pattern Matching (PEP 634)

2020-10-28 Thread Brandt Bucher
Brandt Bucher added the comment: Thinking ahead... A lot of work has gone into writing these PEPs... we should see how much we can easily convert into actual docs. It seems to me: - Parts of PEP 634 and PEP 635 can be worked into the language reference. - Guido's overview (the appendix of

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-28 Thread miss-islington
miss-islington added the comment: New changeset 577d7c4e628260eb7926d043ca9c355ece583eb7 by kj in branch '3.9': [3.9] bpo-41805: Documentation for PEP 585 (GH-22615) (GH-23016) https://github.com/python/cpython/commit/577d7c4e628260eb7926d043ca9c355ece583eb7 -- nosy: +miss-islington

[issue42182] 3.10 Documentation Not Hyperlinking Some Methods

2020-10-28 Thread Ken Jin
New submission from Ken Jin : Some ``:meth:`` markups are not being hyperlinked at all, while some are. This only occurs for Python 3.10. This also seems related to https://bugs.python.org/issue42042. Eg. For 3.9, https://docs.python.org/3.9/library/stdtypes.html#truth-value-testing:

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-28 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +21932 pull_request: https://github.com/python/cpython/pull/23016 ___ Python tracker ___ ___

[issue42181] describe PyEval_CallObjectWithKeywords and its replacement

2020-10-28 Thread Joachim
New submission from Joachim : The current 3.9 docs do not describe PyEval_CallObjectWithKeywords, among other PyEval_CallObject* functions. Yes, I know, these functions are deprecated. But they are still part of the API; they ought to be documented. Rather, given that they are deprecated,

[issue8943] Bug in InteractiveConsole /pickle

2020-10-28 Thread Steve Holden
Change by Steve Holden : -- nosy: -holdenweb ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2142] difflib.unified_diff(...) produces invalid patches

2020-10-28 Thread Jakub Wilk
Change by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42180] Missing a plural in library/functions

2020-10-28 Thread Rafael Fontenelle
Change by Rafael Fontenelle : -- keywords: +patch pull_requests: +21931 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23015 ___ Python tracker

[issue42180] Missing a plural in library/functions

2020-10-28 Thread Rafael Fontenelle
New submission from Rafael Fontenelle : Missing plural in the start of the following sentence from library/functions: "The optional argument *flags* and *dont_inherit* controls which :ref:`compiler options ` should be activated and which :ref:`future features ` should be allowed." This was

[issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP

2020-10-28 Thread Edouard Moine
Edouard Moine added the comment: Hey Simon, you can use the breadcrumb markup and other markups structured data with json on your webpage if you want google to read more efficiently your page in the browser. I used it on my https://www.mixy-design.com/;>web agency website if you want to

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

2020-10-28 Thread Tal Einat
Tal Einat added the comment: I should also mention that I configured and compiled Python for each of the above-mentioned versions using the --enable-optimizations` flag. -- ___ Python tracker

[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2020-10-28 Thread Stefan Behnel
Stefan Behnel added the comment: In general, since the C accelerator is enabled by default, and few people would consider disabling it explicitly, I generally consider the behaviour of the C implementation to be "right", if both implementations differ. As a single data point, the reason why

[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-10-28 Thread Vladimir Ryabtsev
New submission from Vladimir Ryabtsev : A new section has been added to the page as a result of https://bugs.python.org/issue37826. The change: https://github.com/python/cpython/commit/dcfe111eb5602333135b8776996332a8dcf59392 The wording it uses (in the beginning of section 8.5), defines

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

2020-10-28 Thread Tal Einat
Tal Einat added the comment: After spending quite a while setting up my dev machine for (hopefully) reliable benchmarking, I can say with a high level of certainty that the latest PR (GH-22904, commit fe9e9d9c1f1c5f98c797d19e2214d1413701f6de) runs stringbench.py significantly faster than

[issue38413] Remove or change "Multithreading" section

2020-10-28 Thread Vladimir Ryabtsev
Vladimir Ryabtsev added the comment: Also the footnote requires some minor corrections (formatting and style). I suggest the following wording: To get loadable extension support, your Python must be compiled with ``-–enable-loadable-sqlite-extensions`` option in ``PYTHON_CONFIGURE_OPTS``. I

[issue38413] Remove or change "Multithreading" section

2020-10-28 Thread Vladimir Ryabtsev
Vladimir Ryabtsev added the comment: May by I was wrong above and it uses system's Sqlite... But anyway it does not cancel the fact that this section contradicts to another one. -- ___ Python tracker

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

2020-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue28494. I concur with Gregory. What we can do -- improve the documentation. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> is_zipfile false positives

[issue38413] Remove or change "Multithreading" section

2020-10-28 Thread Vladimir Ryabtsev
Vladimir Ryabtsev added the comment: I see no point in researching the version of sqlite, since Python does not allow user to specify it, you just use the compiled version that comes with Python distribution. 10 years now to the commit that introduced that piece of text:

[issue35286] wrong result for difflib.SequenceMatcher

2020-10-28 Thread Boris Yang
Change by Boris Yang : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2020-10-28 Thread Ma Lin
Ma Lin added the comment: I modify lzma module to use different growth factors, see attached picture different_factors.png 1.5x should be the growth factor of _PyBytesWriter under Windows. So if change _PyBytesWriter to use memory blocks, maybe there will be no performance improvement.

[issue42172] Typo in test library for test_socket.py

2020-10-28 Thread Akashkumar D Khunt
Change by Akashkumar D Khunt : -- keywords: +patch pull_requests: +21930 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23013 ___ Python tracker