[issue42754] Unpacking of literals inside other literals should be optimised away by the compiler

2020-12-26 Thread Patrick Reader
Change by Patrick Reader : -- type: -> performance ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42754] Unpacking of literals inside other literals should be optimised away by the compiler

2020-12-26 Thread Patrick Reader
New submission from Patrick Reader : When unpacking a collection or string literal inside another literal, the compiler should optimise the unpacking away and store the resultant collection simply as another constant tuple, so that `[*'123', '4', '5']` is the exact same as `['1', '2', '3',

[issue42753] "./configure" linux chrome beta

2020-12-26 Thread Gerrik Labra
New submission from Gerrik Labra : Ok. So I tried to run the setup in README.txt for the latest linux beta emulator on the google pixel chromebook. Here is what I got back, and the commands, "make, make test, sudo make test" didn't work. ennuilysis@penguin:~/Python/Python-3.8.7$ ./configure

[issue42417] Empty body {} in POST requests leads to 405 Method not allowed error

2020-12-26 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've tried it with flask_client_long_headers.py , but I get the same output as I've gotten before with flask_client.py . Can you try it on a few different systems? -- ___ Python tracker

[issue40148] Add PurePath.with_stem()

2020-12-26 Thread Qi Yao
Qi Yao added the comment: In Pathlib, we have functions "with_name()""with_stem()""with_suffix()" to modify the file name in the path. In issue21798:"Allow adding Path or str to Path", it actually also want to modify the file name, that is "appand string to file name". if with_stem() more

[issue42751] Imaplib

2020-12-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: Are you the owner of imaplib2? If so, you need to ensure that there are no licencing or copyright issues preventing imaplib2 being transferred into the stdlib. That may (or may not) require you to get agreement from any contributors to the library. That

[issue42687] tokenize module does not recognize Barry as FLUFL

2020-12-26 Thread Erik Soma
Change by Erik Soma : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42752] multiprocessing Queue leaks a file descriptor associated with the pipe writer (#33081 still a problem)

2020-12-26 Thread Alex Orange
New submission from Alex Orange : Didn't feel like necroing #33081, but this is basically that problem. The trouble is the cleanup that appeared to fix #33081 only kicks in once something has been put in the queue. So if for instance a Process function puts something in the queue and the

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2020-12-26 Thread STINNER Victor
STINNER Victor added the comment: > * resolve_slotdups() uses a static variable Attached resolve_slotdups.patch works around the issue by removing the cache. -- keywords: +patch Added file: https://bugs.python.org/file49700/resolve_slotdups.patch

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2020-12-26 Thread STINNER Victor
STINNER Victor added the comment: I played with ./configure --with-experimental-isolated-subinterpreters. I tried to run "pip list" in parallel in multiple interpreters. I hit multiple issues: * non-atomic reference count of Python objects shared by multiple interpreters, objects shared

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-12-26 Thread STINNER Victor
STINNER Victor added the comment: > New changeset ea251806b8d11b30d2182af1e589caf88acf by Victor Stinner in > branch 'master': > bpo-40521: Per-interpreter interned strings (GH-20085) I reopen the issue. This change caused a regression in attached interned_bug.py. Output: --- $ ./python

[issue42751] Imaplib

2020-12-26 Thread Rodolfo García Peñas
New submission from Rodolfo García Peñas : Hi, Is it possible to move the imaplib2 implementation (https://github.com/imaplib2/imaplib2/) as imaplib stdlib? What steps should I do? Regards, kix -- components: Library (Lib) messages: 383828 nosy: rodolfogarciap priority: normal

[issue41781] Typos in typing.py

2020-12-26 Thread Patrick Reader
Patrick Reader added the comment: Maybe I added myself by accident while reading the code. Anyway, thanks and you're welcome -- ___ Python tracker ___

[issue41781] Typos in typing.py

2020-12-26 Thread Ross Rhodes
Ross Rhodes added the comment: Hello Patrick, Thanks for opening this issue. I'm creating a PR to resolve the typo in "_allow_reckless_class_cheks", but I'm unable to find "instnance". Presumably the latter was resolved in an earlier PR. -- ___

[issue41781] Typos in typing.py

2020-12-26 Thread Ross Rhodes
Change by Ross Rhodes : -- keywords: +patch nosy: +trrhodes nosy_count: 1.0 -> 2.0 pull_requests: +22804 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23957 ___ Python tracker

[issue42750] tkinter.Variable equality consistency

2020-12-26 Thread Ivo Shipkaliev
Ivo Shipkaliev added the comment: 2. (continued) .. This is including the case when both variables have the same internal name (the current implementation). -- ___ Python tracker

[issue42750] tkinter.Variable equality consistency

2020-12-26 Thread RhinosF1
Change by RhinosF1 : -- nosy: +RhinosF1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42750] tkinter.Variable equality consistency

2020-12-26 Thread Ivo Shipkaliev
Ivo Shipkaliev added the comment: There are 2 good reasons for making Tk variables comparable by value: 1. We honor the equality operator! The equality operator (==) has to compare two objects by value. The current implementation does not fulfil this. Yes, if two Tk variables have the

[issue42745] [subinterpreters] Make the type attribute lookup cache per-interpreter

2020-12-26 Thread STINNER Victor
STINNER Victor added the comment: New changeset f4507231e3f0cf8827cec5592571ce371c6813e8 by Victor Stinner in branch 'master': bpo-42745: finalize_interp_types() calls _PyType_Fini() (GH-23953) https://github.com/python/cpython/commit/f4507231e3f0cf8827cec5592571ce371c6813e8 --

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2020-12-26 Thread STINNER Victor
STINNER Victor added the comment: Maybe we can keep the constants but define them as 0 and deprecate them. The question is more if these constants solve a real ABI issue or not. -- ___ Python tracker

[issue42745] [subinterpreters] Make the type attribute lookup cache per-interpreter

2020-12-26 Thread STINNER Victor
STINNER Victor added the comment: > I assume PR 23953 fixes those? Yes, it fix the 7 tests which leak: ./python -m test -R 3:3 -j0 test__xxsubinterpreters test_ast test_atexit test_capi test_interpreters test_threading -- ___ Python tracker

[issue42737] PEP 563: drop annotations for complex assign targets

2020-12-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I think we should still evaluate the targets (even though the sole purpose of this is just having a hint, the yield example seems serious), will update my patch accordingly. -- ___ Python tracker

[issue42750] tkinter.Variable equality consistency

2020-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: a = tk.IntVar(name='a') b = tk.IntVar(name='a') assert a == b # they refers to the same variable assert a is not b # but they are different objects a.set(42); assert b.get() == a.get() == 42 # yes, it is the same variable c = tk.IntVar(name='c', value=42)

[issue42737] PEP 563: drop annotations for complex assign targets

2020-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: About the difference in behavior. Currently: >>> (1/0).numerator: int Traceback (most recent call last): File "", line 1, in ZeroDivisionError: division by zero >>> x[0]: int Traceback (most recent call last): File "", line 1, in NameError: name 'x'

[issue42745] [subinterpreters] Make the type attribute lookup cache per-interpreter

2020-12-26 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: 41010184880151d6ae02a226dbacc796e5c90d11 introduced some reference leaks: https://buildbot.python.org/all/#/builders/384/builds/136 41010184880151d6ae02a226dbacc796e5c90d11 is the first bad commit commit 41010184880151d6ae02a226dbacc796e5c90d11

[issue42750] tkinter.Variable equality consistency

2020-12-26 Thread Ivo Shipkaliev
Ivo Shipkaliev added the comment: If it's gonna break existing code -- fine. I just wanted to point out that if two variables are of the same type and refer to the same value, they should be considered equal, even if they are not the same variable. In the current implementation, two StrVars

[issue42737] PEP 563: drop annotations for complex assign targets

2020-12-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Do we still need to represent annotation as a subtree in AST? Or make it just > a string? Possibly, we will just represent them as Constant()s. See issue 41967 -- ___ Python tracker

[issue42737] PEP 563: drop annotations for complex assign targets

2020-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do we still need to represent annotation as a subtree in AST? Or make it just a string? -- ___ Python tracker ___

[issue42725] PEP 563: Should the behavior change for yield/yield from's

2020-12-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: One thing to note here, currently Pablo and I are trying to bring annotation unparsing from the compiler to the parser in issue 41967. If we do so, the annotations won't cause any side effects on the symbol table generation. -- nosy: +pablogsal

[issue42737] PEP 563: drop annotations for complex assign targets

2020-12-26 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, we're talking about a future here where `from __future__ import annotations` is always on. And that future is now. (3.10) -- ___ Python tracker

[issue42750] tkinter.Variable equality consistency

2020-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It will break existing code which depends on the current behavior. I don't see a problem with comparing variables by name. -- ___ Python tracker

[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2020-12-26 Thread Dong-hee Na
Dong-hee Na added the comment: Let's emit the deprecated message if Py_TPFLAGS_HAVE_VERSION_TAG is set ;) For example, PyType_Ready looks like a good place -- nosy: +corona10 ___ Python tracker

[issue16396] Importing ctypes.wintypes on Linux gives a ValueError instead of an ImportError

2020-12-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +22803 pull_request: https://github.com/python/cpython/pull/23956 ___ Python tracker ___

[issue16396] Importing ctypes.wintypes on Linux gives a ValueError instead of an ImportError

2020-12-26 Thread miss-islington
miss-islington added the comment: New changeset 7865f516f313bd31ca48ee1fdae2a80add2293b6 by Shantanu in branch 'master': bpo-16396: fix BPO number in changelog (GH-23951) https://github.com/python/cpython/commit/7865f516f313bd31ca48ee1fdae2a80add2293b6 --

[issue42750] tkinter.Variable equality consistency

2020-12-26 Thread Ivo Shipkaliev
New submission from Ivo Shipkaliev : Greetings! I just noticed: >>> import tkinter as tk >>> root = tk.Tk() >>> str_0 = tk.StringVar() >>> str_0.set("same value") >>> str_1 = tk.StringVar() >>> str_1.set("same value") So: >>> str_0.get() == str_1.get() True But: >>> str_0 == str_1 False

[issue42042] sphinx3 renders diffrently docs.python.org for 3.10

2020-12-26 Thread Dong-hee Na
Dong-hee Na added the comment: @pablogsal @rhettinger @mdk @Mariatta Cool!! everything looks okay! Now I close this issue. Thank you to everyone who works on this issue!! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue42735] "trace_at_recursion_limit.py" should be removed from "Python/Lib/test/crashers"

2020-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The initial issue6717 is still open. Are you sure that the bug was fixed rater than that the crasher is outdated? -- ___ Python tracker

[issue42748] test_asdl_parser: load_module() method is deprecated

2020-12-26 Thread Dong-hee Na
Change by Dong-hee Na : -- components: +Tests resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.10 ___ Python tracker

[issue42748] test_asdl_parser: load_module() method is deprecated

2020-12-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: New changeset 0b281f94b9e5f117d774a1e4e834e797b2b21438 by Dong-hee Na in branch 'master': bpo-42748: test_asdl_parser now uses exec_module instead of load_module (#23954) https://github.com/python/cpython/commit/0b281f94b9e5f117d774a1e4e834e797b2b21438

[issue42749] test_tcl failed on 32-bit POWER6 AIX 3.9: big int issue with 9223372036854775808

2020-12-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +22802 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23955 ___ Python tracker

[issue42749] test_tcl failed on 32-bit POWER6 AIX 3.9: big int issue with 9223372036854775808

2020-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Interesting that static version is 8.4, but pathlevel is 8.5.9. It means that Tkinter is built with older version of headers and does not support bignum type, but dynamically linked to newer library which can create bignum objects. There is a problem with

[issue42748] test_asdl_parser: load_module() method is deprecated

2020-12-26 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch nosy: +corona10 nosy_count: 1.0 -> 2.0 pull_requests: +22801 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23954 ___ Python tracker

[issue42749] test_tcl failed on 32-bit POWER6 AIX 3.9: big int issue with 9223372036854775808

2020-12-26 Thread STINNER Victor
New submission from STINNER Victor : POWER6 AIX 3.9: https://buildbot.python.org/all/#/builders/330/builds/221 test.pythoninfo: platform.architecture: 32bit platform.platform: AIX-2-00F9C1964C00-powerpc-32bit tkinter.TCL_VERSION: 8.4 tkinter.TK_VERSION: 8.4 tkinter.info_patchlevel: 8.5.9

[issue42745] [subinterpreters] Make the type attribute lookup cache per-interpreter

2020-12-26 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22800 pull_request: https://github.com/python/cpython/pull/23953 ___ Python tracker ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-26 Thread STINNER Victor
STINNER Victor added the comment: I checked for ^.*tp_new.*=.*NULL regex in "git log -p" command output. I checked all commits up to May 8 2016, the commit which added: +((PyTypeObject *)v)->tp_new = NULL; I met "FlagsType.tp_new = NULL;" multiple times since the code moved multiple

[issue42737] PEP 563: drop annotations for complex assign targets

2020-12-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > It will still perform run-time check which was an initial intention. Well, at least from my personal perspective, I'd expect all annotations to behave like strings regardless of their targets. -- ___ Python

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The pitfall of PyType_FromModuleAndSpec() is that it makes types instantiable by default if tp_new is not provided. Created objects can crash when you try to use them because they are not properly initialized. When there was few uses of

[issue42736] Add support for making Linux prctl(...) calls to subprocess

2020-12-26 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- nosy: +izbyshev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38435] Start the deprecation cycle for subprocess preexec_fn

2020-12-26 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- nosy: +izbyshev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42737] PEP 563: drop annotations for complex assign targets

2020-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Alternatively it could be evaluated in global scope. All names are globals (non-global names do not work in MyPy in any case), yield and await are forbidden outside function. It will still perform run-time check which was an initial intention. --

[issue42738] subprocess: don't close all file descriptors by default (close_fds=False)

2020-12-26 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > Using close_fds=False, subprocess can use posix_spawn() which is safer and > faster than fork+exec. For example, on Linux, the glibc implements it as a > function using vfork which is faster than fork if the parent allocated a lot > of memory. On macOS,