[issue42290] Unicode inconsistent display after concencated

2020-11-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: Works for me: >>> chr(1839)+'1' 'ܯ1' You are mixing a right-to-left code point (DHALATH) with a left-to-right code point (digit 1). The result depends on the quality of your console or terminal. Try using a different terminal. On my system, the terminal

[issue42278] Remove usage of tempfile.mktemp in stdlib

2020-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Most of them are in tests. There is no security issue there, also the code may be clearer and more reliable if use helper function test.support.temp_dir(). And most of the rest are in Windows specific code. Some Windows code may not work if you hold open

[issue42288] typing.get_type_hints() returns Optional[Any] if the default value of the argument is None

2020-11-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Library (Lib) nosy: +gvanrossum, levkivskyi type: -> enhancement versions: -Python 3.6, Python 3.7 ___ Python tracker ___

[issue42290] Unicode inconsistent display after concencated

2020-11-07 Thread Xinmeng Xia
New submission from Xinmeng Xia : When printing an assignment expression with unicode ܯ ( \U+072F) on the command line, we get an unexpected result. Example A: >>> print(chr(1839)+" = 1") ܯ = 1 Similar problems exist in plenty of characters of unicode. -- components: Unicode

[issue42289] Found a secret/private key in code.

2020-11-07 Thread Krrish Dhaneja
New submission from Krrish Dhaneja : Found a private key in commit 9ae9ad8 in https://github.com/python/cpython . -- messages: 380533 nosy: Krrishdhaneja priority: normal severity: normal status: open title: Found a secret/private key in code. type: security versions: Python 3.10,

[issue42288] typing.get_type_hints() returns Optional[Any] if the default value of the argument is None

2020-11-07 Thread Komiya Takeshi
New submission from Komiya Takeshi : I noticed `typing.get_type_hints()` returns Optional[Any] as a type hints if the default value of the argument is None: ``` $ python Python 3.9.0 (default, Oct 24 2020, 15:41:29) [Clang 11.0.3 (clang-1103.0.32.59)] on darwin Type "help", "copyright",

[issue42287] Use Py_NewRef & Py_XNewRef where applicable

2020-11-07 Thread Yonatan Goldschmidt
New submission from Yonatan Goldschmidt : Following https://bugs.python.org/issue42262, I think it'd be nice to convert existing C code to use the more concise Py_NewRef() and Py_XNewRef() where possible. Increases readability and less bug prone. Opening this new issue to track the

[issue42283] test_idle is interactive on macOS 11

2020-11-07 Thread Ned Deily
Ned Deily added the comment: This is the behavior seen with Tk 8.6.8 *built* on macOS 11.0 Big Sur; I'm assuming that's what Ronald was testing. We'll be updating the macOS installers to use a more recent Tk for installers built on 11.0 and this should go away. Note that Tk 8.6.8 *built*

[issue42283] test_idle is interactive on macOS 11

2020-11-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ned, do you have any experience of tk acting so differently on different macOS versions? -- nosy: +ned.deily ___ Python tracker ___

[issue8488] Docstrings of non-data descriptors "ignored"

2020-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, all correct. In doc.py unlike to the inlined code Descriptor is a subclass of property. And since fset is None the instance is classified as a readonly property. -- resolution: -> out of date stage: -> resolved status: open -> closed

[issue42286] f_trace gets call on different lines each loop

2020-11-07 Thread Cornelius Krupp
New submission from Cornelius Krupp : When using a local trace function, sometimes the line event is issued at the wrong time. As can be seen from the example file `f_trace_wrong_line.py`, each loop iteration we get either 24 or 23, apparently in a fixed rhythm. While this might seem

[issue8488] Docstrings of non-data descriptors "ignored"

2020-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually there is no bug in not showing docstring for "data" and "non_data". "Doc of a data-descriptor." is the docstring of the type of the descriptor, not the descriptor itself. If it would be "Type of a data-descriptor." it would be more obvious. To

[issue1475692] replacing obj.__dict__ with a subclass of dict

2020-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no longer need to use OrderedDict as __dict__, but ctypes types have tp_dict which are instances of dict subclass (StgDict). Disabling setting it to anything that is not an exact dict would break ctypes. --

[issue10529] [doc] Write argparse i18n howto

2020-11-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a great idea. I'm thinking that the Argparse Tutorial is the right place for this: https://docs.python.org/3/howto/argparse.html -- nosy: +rhettinger ___ Python tracker

[issue1475692] replacing obj.__dict__ with a subclass of dict

2020-11-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm going to mark this as rejected. After 14 years, no clean and performant solution has emerged, yet the world of Python seems to be fine with the status quo. This issue doesn't seem to be getting in the way of people doing their job. --

[issue42284] The grammar specification is inconsistent with the implementation of Python parser.

2020-11-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Georg. In writing compilers, it is often convenient to allow the grammar to be permissive and save the enforcement of additional syntax restrictions for the downstream semantic analysis phase. For example, the C language grammar

[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: open ->

[issue25259] readline macros can segfault Python

2020-11-07 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___

[issue14003] __self__ on built-in functions is not as documented

2020-11-07 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3 ___ Python tracker ___ ___

[issue42285] Missing spaces in list literals in Tutorial/Data Structures

2020-11-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the suggestion, but I'm going to mark it as declined for the reasons listed in the PR. -- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python

[issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator

2020-11-07 Thread Irit Katriel
Irit Katriel added the comment: I think this is fixed now - the tests in the patch are passing. -- nosy: +iritkatriel ___ Python tracker ___

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2020-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you @erlendaasland ! -- components: +Extension Modules -C API, Subinterpreters nosy: +pitrou resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2020-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oops, sorry, I hadn't noticed this was a catch-all issue. Reopening. -- resolution: fixed -> stage: resolved -> status: closed -> open ___ Python tracker

[issue40077] Convert static types to heap types: use PyType_FromSpec()

2020-11-07 Thread miss-islington
miss-islington added the comment: New changeset 01c6aa43dc56b3b64d584c58a49c86f816c05a91 by Erlend Egeberg Aasland in branch 'master': bpo-40077: Convert _queuemodule to use heap types (GH-23136) https://github.com/python/cpython/commit/01c6aa43dc56b3b64d584c58a49c86f816c05a91 --

[issue42285] Missing spaces in list literals in Tutorial/Data Structures

2020-11-07 Thread Jakub Moliński
Change by Jakub Moliński : -- keywords: +patch pull_requests: +22096 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23193 ___ Python tracker ___

[issue14903] dictobject infinite loop in module set-up

2020-11-07 Thread Irit Katriel
Irit Katriel added the comment: Is this a python 2-only issue? -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-list

[issue42285] Missing spaces in list literals in Tutorial/Data Structures

2020-11-07 Thread Jakub Moliński
New submission from Jakub Moliński : In the Data Structures section of the Tutorial there are examples of nested list comprehensions that include list literals where elements are written without spaces after commas (`[1,2,3]` instead `[1, 2, 3]`). This is a trivial problem but since this is

[issue25821] Documentation for threading.enumerate / threading.Thread.is_alive is contradictory.

2020-11-07 Thread Irit Katriel
Change by Irit Katriel : -- components: +Library (Lib) versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue25821] Documentation for threading.enumerate / threading.Thread.is_alive is contradictory.

2020-11-07 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch nosy: +iritkatriel nosy_count: 3.0 -> 4.0 pull_requests: +22095 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23192 ___ Python tracker

[issue42278] Remove usage of tempfile.mktemp in stdlib

2020-11-07 Thread E. Paine
Change by E. Paine : -- components: +Distutils nosy: +dstufft, eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42273] Using LazyLoader leads to AttributeError

2020-11-07 Thread E. Paine
E. Paine added the comment: Just checking: is this not because the lazy import should be in `__init__.py`? (the code provided works fine with `a.b.my_function` on my system) -- components: +Interpreter Core -Library (Lib) nosy: +brett.cannon, epaine, eric.snow, ncoghlan type: ->

[issue1250] Building external modules using Sun Studio 12

2020-11-07 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___

[issue42233] GenericAlias does not support union type expressions

2020-11-07 Thread miss-islington
miss-islington added the comment: New changeset e81e09bfc8a29a44a649a962870a26fe0c097cfa by Miss Islington (bot) in branch '3.9': bpo-42233: Correctly repr GenericAlias when used with typing module (GH-23081) https://github.com/python/cpython/commit/e81e09bfc8a29a44a649a962870a26fe0c097cfa

[issue42283] test_idle is interactive on macOS 11

2020-11-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Strange. test_idle runs fine on my Mohave, so I cannot investigate what you see. Tests of classes that create windows and call wait_window pass _utest_=True and wait_window calls are guarded by "if not _utest:". I believe this is always in __init__. You

[issue41712] REDoS in purge

2020-11-07 Thread Yash Shete
Change by Yash Shete : -- pull_requests: +22094 pull_request: https://github.com/python/cpython/pull/23191 ___ Python tracker ___

[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

2020-11-07 Thread hai shi
hai shi added the comment: > Do you mean something like "only expose a slot if you have a reason for > > exposing it"? That sounds like a tautology. > Where in the docs would this go? Add a friend Note in docs of `PyType_GetSlot` MAYBE? > You mean nb_reserved, right? Yes, thanks for your

[issue42258] argparse: show choices once per argument

2020-11-07 Thread hai shi
New submission from hai shi : I like your improvement. But I suggest you should copy your first comment from your PR to here.(It's easy for discuss in here;) -- nosy: +paul.j3, rhettinger, shihai1991 ___ Python tracker

[issue42068] For macOS, package the included Tcl and Tk frameworks in a rational way.

2020-11-07 Thread Marc Culler
Marc Culler added the comment: Ned - do you have any news on the topic of packaging Tcl/Tk within the Python bundle? -- ___ Python tracker ___

[issue42280] The list of standard generic collections is incomplete

2020-11-07 Thread Ken Jin
Ken Jin added the comment: Dear Jack, good catch! My only worry is that if we make the list exhaustive, it would be too lengthy, or that it might not be feasible to continuously update it every time a new generic type supports the feature. Maybe a line somewhere to mention that most

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: Since this was only a performance issue, I'm not planning to backport it to earlier releases. -- stage: patch review -> resolved ___ Python tracker

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 8805a4dad201473599416b2c265802b8885f69b8 by Nick Coghlan in branch 'master': bpo-42282: Fold constants inside named expressions (GH-23190) https://github.com/python/cpython/commit/8805a4dad201473599416b2c265802b8885f69b8 --

[issue42284] The grammar specification is inconsistent with the implementation of Python parser.

2020-11-07 Thread Georg Brandl
Georg Brandl added the comment: This grammar specification doesn't contain a full specification of code that won't raise SyntaxError. There are several conditions that aren't checked by the generated parser, but at a later stage in the compilation process. While probably possible to express

[issue41126] Running test suite gives me - python.exe(14198, 0x114352dc0) malloc: can't allocate region

2020-11-07 Thread Ronald Oussoren
Change by Ronald Oussoren : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH type: -> behavior ___ Python tracker

[issue41028] Move docs.python.org language and version switcher out of cpython

2020-11-07 Thread Julien Palard
Julien Palard added the comment: New changeset ee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520 by Julien Palard in branch 'master': bpo-41028: Doc: Move switchers to docsbuild-scripts. (GH-20969) https://github.com/python/cpython/commit/ee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520 --

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +22093 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23190 ___ Python tracker

[issue42284] The grammar specification is inconsistent with the implementation of Python parser.

2020-11-07 Thread Xinmeng Xia
New submission from Xinmeng Xia : In full grammar specification of Python 3.6 official documentation (Python 3.6 official documentation: https://docs.python.org/3.6/reference/grammar.html ), we can find a very clear definition on the grammar about the usage of 'break'. According to the

[issue42283] test_idle is interactive

2020-11-07 Thread Ronald Oussoren
New submission from Ronald Oussoren : I noticed this on a macOS 11.0.1 box: When I run "python -m test.regrtest -uall" the IDLE testsuite is run ('test_idle'), and those tests pop up windows and won't make progress until I close those windows. -- assignee: terry.reedy components:

[issue42275] Jupyter Lab Terminals not available (error was No module named 'winpty.cywinpty')

2020-11-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: The 'culprit' is that many 3rd party packages have not yet released 'official' wheels. This is unfortunately typical this soon after a new version is released. We are hoping that predictable yearly releases will improve the situation. We will have to

[issue42222] Modernize integer test/conversion in randrange()

2020-11-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: To put what I said another way: both items are mental paper cuts and I see benefit to both coredevs and users in getting rid of them. That is not to say 'no cost', but that there is a real benefit to be balanced against the real cost. --

[issue14791] setup.py only adds /prefix/lib, not /prefix/lib64

2020-11-07 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3 ___ Python tracker ___ ___

[issue42222] Modernize integer test/conversion in randrange()

2020-11-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: To me, ValueError("non-integer arg 1 for randrange()") (ValueError('bad type') is a bit painful to read. We do sometime fix such bugs, when not documented, in future releases. Current the doc, "Return a randomly selected element from range(start, stop,

[issue20543] ** operator does not overflow to inf

2020-11-07 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, @iritkatriel. Sounds good to me. -- stage: -> resolved status: pending -> closed ___ Python tracker ___

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42122] macOS complains about how fonts are accessed

2020-11-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm getting a similar warning on a macOS 11 box: 0:06:29 load avg: 1.58 [184/424/1] test_idle 2020-11-07 10:43:37.878 Python[97785:3275468] CoreText note: Client requested name ".applesystemuifontmonospaced", it will get Times-Roman rather than the

[issue42281] Inconsistent ProcessPoolExecutor behaviour on macOS between 3.7 and 3.8/9

2020-11-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: In 3.8 the spawn method for multiprocessing changed from "fork" to "spawn" (see https://docs.python.org/3/whatsnew/3.8.html#multiprocessing). A side effect of this is that the module gets executed again in the child processes (the same as on Windows). The