[issue39656] shebanged scripts can escape from `venv` depending on how it was created

2020-03-17 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 58ec58a42bece5b2804b178c7a6a7e67328465db by Anthony Sottile in branch 'master': bpo-39656: Ensure `bin/python3.#` is always present in virtual environments on POSIX (GH-19030) https://github.com/python/cpython/commit/58ec58a42bece5b2804b178c7a6a7e

[issue39988] Remove AugLoad and AugStore expression context from AST

2020-03-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : AugLoad and AugStore are never exposed to the user. They are not generated by the parser and the compiler does not accept it. >>> from ast import * >>> tree = Module(body=[AugAssign(target=Name(id='x', ctx=AugStore()), >>> op=Add(), value=Constant(value=

[issue39988] Remove AugLoad and AugStore expression context from AST

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +18389 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19038 ___ Python tracker ___

[issue39989] Output closing parenthesis in ast.dump() on separate line

2020-03-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently ast.dump() in multiline mode (see issue37995) appends closing parenthesis to the end of the line: >>> import ast >>> node = ast.parse('spam(eggs, "and cheese")') >>> print(ast.dump(node, indent=3)) Module( body=[ Expr( value=Ca

[issue39989] Output closing parenthesis in ast.dump() on separate line

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +18390 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19039 ___ Python tracker ___

[issue39973] The documentation for PyObject_GenericSetDict() is incorrect

2020-03-17 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +18391 pull_request: https://github.com/python/cpython/pull/19040 ___ Python tracker _

[issue39973] The documentation for PyObject_GenericSetDict() is incorrect

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a45b695b9fcfbbb0a087222abc5c8d691a7d2770 by Zackery Spytz in branch 'master': bpo-39973: Fix the docs for PyObject_GenericSetDict() (GH-19026) https://github.com/python/cpython/commit/a45b695b9fcfbbb0a087222abc5c8d691a7d2770 -- nosy:

[issue39973] The documentation for PyObject_GenericSetDict() is incorrect

2020-03-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +18392 pull_request: https://github.com/python/cpython/pull/19041 ___ Python tracker ___ __

[issue39973] The documentation for PyObject_GenericSetDict() is incorrect

2020-03-17 Thread miss-islington
miss-islington added the comment: New changeset 4e3a7f9205112e7da1032aa802edf84379b134fc by Miss Islington (bot) in branch '3.7': bpo-39973: Fix the docs for PyObject_GenericSetDict() (GH-19026) https://github.com/python/cpython/commit/4e3a7f9205112e7da1032aa802edf84379b134fc -- __

[issue39973] The documentation for PyObject_GenericSetDict() is incorrect

2020-03-17 Thread miss-islington
miss-islington added the comment: New changeset da1fe768e582387212201ab8737a1a5f26110664 by Miss Islington (bot) in branch '3.8': bpo-39973: Fix the docs for PyObject_GenericSetDict() (GH-19026) https://github.com/python/cpython/commit/da1fe768e582387212201ab8737a1a5f26110664 -- __

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-17 Thread Berry Schoenmakers
Berry Schoenmakers added the comment: There seems to be a slight mixup with the built-in pow() function in Python 3.8.2. Currently, under https://docs.python.org/3/library/functions.html#pow it says: Changed in version 3.9: Allow keyword arguments. Formerly, only positional arguments

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-17 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +18393 pull_request: https://github.com/python/cpython/pull/19042 ___ Python tracker ___ __

[issue39973] The documentation for PyObject_GenericSetDict() is incorrect

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-17 Thread Mark Dickinson
Mark Dickinson added the comment: > This example can simply be dropped now. It could be, but it would be better to replace it with a different example that works. Any suggestions? -- ___ Python tracker ___

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-17 Thread Ammar Askar
Ammar Askar added the comment: In my original PR I changed it to divmod: https://github.com/python/cpython/pull/16302/files#diff-986275b975a33c44c0aba973362516fa -- ___ Python tracker __

[issue39970] Combined behavior of datetime.datetime.timestamp() and datetime.datetime.utcnow() on non-UTC timezoned machines

2020-03-17 Thread Yi Luan
Yi Luan added the comment: Hi Paul, Yes, I totally agree with you, and I should follow your advice and not to pass timestamps as representations of arbitrary datetime for interop usage. However in my particular case, I'm not the person who can make such type of decisions. Perhaps I'm very p

[issue39990] help output should make use of typing.get_type_hints

2020-03-17 Thread Nguyễn Gia Phong
New submission from Nguyễn Gia Phong : With PEP 563, it is legal to annotate a function as follows def foo(bar: 'int') -> 'bool': pass Currently, help(foo) would print the exact signature in foo.__annotations__ and it's not really pretty. My proposal is to use the type hints from typing.get_

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is hard to find a builtin which could be easy and clearly implemented in Python (it means no use of dunder methods). Maybe sorted()? def sorted(iterable, /, *, key=None, reverse=False): """Emulate the built in sorted() function""" result = list(i

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: divmod() should be implemented via __divmod__ and __rdivmod__. And they should be looked up on the type, not instance. There is no easy way to express it in Python accurately. This would make the example too complex. -- ___

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-17 Thread Ammar Askar
Ammar Askar added the comment: I don't think that matters. The example is supposed to just serve as an illustration, it doesn't need to encode the dunder dispatch semantics. The already existing example doesn't check for a __pow__. I'd picture it just as: return x//y, x%y -- _

[issue39982] FreeBSD: SCTP tests of test_socket fails on AMD64 FreeBSD Shared 3.x

2020-03-17 Thread Kubilay Kocak
Kubilay Kocak added the comment: Update to BB complete. Rebuilding: https://buildbot.python.org/all/#/builders/18/builds/162 and https://buildbot.python.org/all/#/builders/152/builds/409 -- ___ Python tracker _

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-17 Thread Stefan Krah
Stefan Krah added the comment: A focused issue report would include at least the following: 1) Acknowledge that gcc builds work on the AIX buildbots (a fact that has been entirely ignored so far). 2) State the exact regression: msg364373 (which was also ignored, are you using xl

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-17 Thread Stefan Krah
Stefan Krah added the comment: It is also instructive how Granlund views xlc: https://gmplib.org/list-archives/gmp-bugs/2010-November/002119.html -- ___ Python tracker ___ __

[issue39990] help output should make use of typing.get_type_hints

2020-03-17 Thread Nguyễn Gia Phong
Change by Nguyễn Gia Phong : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue39982] FreeBSD: SCTP tests of test_socket fails on AMD64 FreeBSD Shared 3.x

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > https://buildbot.python.org/all/#/builders/152/builds/409 That's AMD64 FreeBSD Shared 3.x: there are still tons of SCTP failures. "Log: sendfile() does currently not support SCTP sockets. Therefore, fail the call." I don't understand why the test passed p

[issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS)

2020-03-17 Thread Steve Dower
Steve Dower added the comment: Yeah, this is on me now. Hopefully we can just pull in the new sources and they'll be fine, but historically it's taken a couple of days/weeks to get the issues ironed out. Unfortunately, I'm still on a flaky internet connection (but only for GitHub.com for so

[issue39982] FreeBSD: SCTP tests of test_socket fails on AMD64 FreeBSD Shared 3.x

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: It seems like there is a race condition in some tests. Running the same test twice on the idle buildbot worker fails randomly: 130-CURRENT-amd64% ./python -m test test_socket -v -m test.test_socket.RecvmsgSCTPStreamTest.testRecvmsgAfterClose == CPython 3.9.0

[issue39952] Using VS2019 to automatically build Python3 and it failed to build

2020-03-17 Thread Steve Dower
Steve Dower added the comment: Hi Lin, please look me up on Teams and we can chat about this. I haven't heard about this effort and I'd love to know what you're working on. --- The last error is because the VS Setup team has never updated their package to include v142 libs (https://www.nug

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Acknowledge that gcc builds work on the AIX buildbots (a fact that has been > entirely ignored so far). I do acknowledge that. I am not saying that I am sure there is a bug in the code. For what I know at this point it may be something with xlc, wit

[issue39989] Output closing parenthesis in ast.dump() on separate line

2020-03-17 Thread Mark Dickinson
Mark Dickinson added the comment: This feels like something that's very much down to personal preference. I also prefer the closing "]" and ")" characters on their own lines, but I'd be happy with an argument to ast.dump giving me that option. -- nosy: +mark.dickinson _

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
New submission from STINNER Victor : My FreeBSD VM has a NIC with the IPv6 address fe80::5054:ff:fe9: local-link IPv6 address. It's used by uuid._netstat_getnode() as a MAC address, but it seems like this IPv6 address doesn't respect RFC 4122 and so should be skipped. _find_mac_under_heading(

[issue24916] In sysconfig, don't rely on sys.version format

2020-03-17 Thread Thomas Kluyver
Thomas Kluyver added the comment: Serhiy, I think you fixed the part that was actually likely to cause problems a few years ago in issue #25985 & commit 885bdc4946890f4bb80557fab80c3874b2cc4d39 . Using sys.version[:3] to get a short version like 3.8 was what I wanted to fix. People are pres

[issue38237] Expose meaningful keyword arguments for pow()

2020-03-17 Thread Berry Schoenmakers
Berry Schoenmakers added the comment: Maybe a use case in this direction: int(x, base=10). Because, if you type int(x='3', base=12) you get TypeError: 'x' is an invalid keyword argument for int() and x needs to be a positional-only to program this yourself. -- ___

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-17 Thread Stefan Krah
Stefan Krah added the comment: "The **exact** regression is that I could run the test suite without any crash or freeze on this AIX system with 3.7.6 and I cannot in 3.7.7. At the very least this is due to the fact that there is a new test that crashes/hangs." In other words, contrary to yo

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > In other words, contrary to your earlier dismissal, you did NOT run _decimal on AIX with MAX_PREC but just ran the 3.7.6 tests that do not include any tests with MAX_PREC. I did, and it raises MemoryError: ❯ uname -a AIX 1 7 powerpc 00CCAD974C00 AIX

[issue39992] Windows line endings of pyc file detected on Ubuntu

2020-03-17 Thread Vladimir
New submission from Vladimir : I have problem to run pyc file on one machine with Ubuntu Server 18.04.4 LTS. This is my source code of the file: #!/root/PycharmProjects/Project/venv/bin/python3.7 print("Hi") When I compile it in python console with commands: import py_compile py_compile.compi

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Just to be clear: I am saying that the *exact* regression is manifested with the new test because that is the behavioural difference that I experienced and how I found this problem. > but just ran the 3.7.6 tests that do not include any tests with MA

[issue39992] Windows line endings of pyc file detected on Ubuntu

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: pyc files are not executable files. If you can run it on your machine it means that you have installed some loader hook which allow you to run files which are not machine executable files and not shell scripts. It seems it is not installed on your other ma

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-17 Thread Stefan Krah
Stefan Krah added the comment: Sorry, I'm reacting like Granlund now and close. These discussions lead nowhere. -- status: open -> closed ___ Python tracker ___ __

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: After some debugging, I discovered that the new test succeeds if I configure and compile CPython without 'OBJECT_MODE=64' set. -- ___ Python tracker

[issue39988] Remove AugLoad and AugStore expression context from AST

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is possible also to get rid of the ctx argument at all. The context may be determined by the parent nodes. But it is larger and breaking change, so I'll open a separate issue for it. -- ___ Python tracker

[issue31895] How to implement api in python website

2020-03-17 Thread sanjeev
sanjeev added the comment: native support for converting https://www.extam.com/ -- nosy: +sanjeev091 title: Native hijri calendar support -> How to implement api in python website type: enhancement -> performance ___ Python tracker

[issue39988] Remove AugLoad and AugStore expression context from AST

2020-03-17 Thread sanjeev
sanjeev added the comment: Thank you for this question https://www.extam.com/ -- nosy: +sanjeev091 ___ Python tracker ___ ___ Pytho

[issue39993] Language Reference - Function definition parameter_list item definition not equivalent to implementation.

2020-03-17 Thread Michael S
New submission from Michael S : I just read https://docs.python.org/3/reference/compound_stmts.html#function-definitions The item parameter_list is defined as: parameter_list::= defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]] | parameter_list_no_poson

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +18394 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19043 ___ Python tracker ___ _

[issue39989] Output closing parenthesis in ast.dump() on separate line

2020-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: For what it's worth (which might not be much), here is what black produces: Module( body=[ Expr( value=Call( func=Name(id="spam", ctx=Load()), args=[Name(id="eggs", ctx=Load()), Constant(value="and cheese

[issue39989] Output closing parenthesis in ast.dump() on separate line

2020-03-17 Thread Mark Dickinson
Mark Dickinson added the comment: Ah yes; looking at the `black` output, there's also an opportunity for an exciting discussion about trailing commas here :-) -- ___ Python tracker _

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-17 Thread Dong-hee Na
Dong-hee Na added the comment: Victor, frozenset is the last basic builtin collection which is not applied to this improvement yet. frozenset also show similar performance improvement by using vectorcall pyperf compare_to master.json bpo-37207.json Mean +- std dev: [master] 2.26 us +- 0.06 u

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-03-17 Thread Mark Shannon
Mark Shannon added the comment: Consider the case where a thread that doesn't hold the GIL attempts to get a reference on `None`. The problem with having a single immortal `None`, is that it will cause data cache thrashing as two different CPUs modify the refcount on the shared `None` objec

[issue39993] Language Reference - Function definition parameter_list item definition not equivalent to implementation.

2020-03-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Did I miss something? Yep, what you are missing is that the rule is really: (defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]]) | (parameter_list_no_posonly) which means that is either defparameter ("," defparameter)* ","

[issue39990] help should evaluate forward reference

2020-03-17 Thread Nguyễn Gia Phong
Nguyễn Gia Phong added the comment: I traced it down to inspect.formatannotation(annotation). Before checking for isinstance(annotation, type), IMHO we should do something like import typing if isinstance(annotation, str): annotation = typing.ForwardRef(str)._evaluate(annotation) Howeve

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset eb886db1e99a15f15a2342aa496197a5f88fa9c8 by Victor Stinner in branch 'master': bpo-39991: uuid._netstat_getnode() ignores IPv6 addresses (GH-19043) https://github.com/python/cpython/commit/eb886db1e99a15f15a2342aa496197a5f88fa9c8 -- _

[issue39993] Language Reference - Function definition parameter_list item definition not equivalent to implementation.

2020-03-17 Thread Michael S
Michael S added the comment: Thanks Pablo, sorry, I was just stupid. > Do you think that adding these explicit parentheses would help with help > making this more clear? Maybe. I read the BNF documentation the first time today, but since it's not intended for beginners, I think it's clear

[issue39993] Language Reference - Function definition parameter_list item definition not equivalent to implementation.

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2020-03-17 Thread Mark Shannon
Mark Shannon added the comment: Instead of passing `_PyRuntimeState` around everywhere, why not just let it disappear in time. Currently `_PyRuntimeState` manages "global" state, mainly the GIL and some config. Once the GIL has been migrated to the sub-interpreters, the config part can be f

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: It seems like this issue is a regression caused by the following change of bpo-28009: commit 0bcbfa43d55d9558cdcb256d8998366281322080 Author: Michael Felt Date: Thu Sep 26 20:43:15 2019 +0100 bpo-28009: Fix uuid.uuid1() and uuid.get_node() on AIX (GH-

[issue28009] Fix uuid.uuid1() core logic of uuid.getnode() needs refresh

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 0bcbfa43d55d9558cdcb256d8998366281322080 by Tal Einat (Michael > Felt) in branch 'master': > bpo-28009: Fix uuid.uuid1() and uuid.get_node() on AIX (GH-8672) This change introduced a regression: bpo-39991. I pushed the commit eb886db1e99a15f1

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-17 Thread Petr Viktorin
Petr Viktorin added the comment: > You are the one who wanted to *introduce* a hack by dereferencing as char and then cast to _Bool. :-) Yes, I did change my mind after reading the documentation. The docs say two contradicting things: 1. The '?' conversion code corresponds to the _Bool type d

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

2020-03-17 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +18395 pull_request: https://github.com/python/cpython/pull/19044 ___ Python tracker ___ ___

[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2020-03-17 Thread Steve Dower
Steve Dower added the comment: > Instead of passing `_PyRuntimeState` around everywhere, why not just let it > disappear in time. Agreed. It's valuable to pass the thread state, but the runtime state should only be needed to create a new thread state (and arguably not even then). --

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: My fix is incomplete: the IPv6 address "123:2:3:4:5:6:7:8" is a valid IPv6 address and uuid.py accepts it as a valid MAC address, whereas it's not a MAC address. -- ___ Python tracker

[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > Instead of passing `_PyRuntimeState` around everywhere, why not just let it > disappear in time. Passing runtime (_PyRuntimeState) is a temporary move until more and more fields are moved from _PyRuntimeState into PyInterpreterState. I just created bpo-39

[issue39987] Simplify setting line numbers in the compiler

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 61cb3d02b83e746e59bb1351a0865e3b8714b2d6 by Serhiy Storchaka in branch 'master': bpo-39987: Simplify setting lineno in the compiler. (GH-19037) https://github.com/python/cpython/commit/61cb3d02b83e746e59bb1351a0865e3b8714b2d6 -- ___

[issue39987] Simplify setting line numbers in the compiler

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39994] Redundant code in pprint module.

2020-03-17 Thread Palak Kumar Jha
New submission from Palak Kumar Jha : In the PrettyPrinter._format method, since self._dispatch has dict.__repr__ [key] mapped to self._pprint_dict [value] the elif block is not needed. Its work is already being done by the if block above, which searches self._dispatch to fetch the appropriat

[issue39988] Remove AugLoad and AugStore expression context from AST

2020-03-17 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg364424 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue31895] How to implement api in python website

2020-03-17 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg364423 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39943] Meta: Clean up various issues in C internals

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 982307b9cceef36e30ac43b13032d68c3b921adc by Andy Lester in branch 'master': bpo-39943: Remove unused self from find_nfc_index() (GH-18973) https://github.com/python/cpython/commit/982307b9cceef36e30ac43b13032d68c3b921adc -- nosy: +vsti

[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2020-03-17 Thread Mark Shannon
Mark Shannon added the comment: Even if `_PyRuntime` ends up as just a list of interpreters and doesn't disappear completely, it won't be used anything like as much as it is now. Many of the functions that it getting passed to will no longer need it, so why bother passing it now? --

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18396 pull_request: https://github.com/python/cpython/pull/19045 ___ Python tracker ___ __

[issue26067] test_shutil fails when gid name is missing

2020-03-17 Thread Dino Viehland
Dino Viehland added the comment: New changeset 52268941f37e3e27bd01792b081877ec3bc9ce12 by Matthias Braun in branch 'master': bpo-26067: Do not fail test_shutil / chown when gid/uid cannot be resolved (#19032) https://github.com/python/cpython/commit/52268941f37e3e27bd01792b081877ec3bc9ce12

[issue39994] Redundant code in pprint module.

2020-03-17 Thread Palak Kumar Jha
Change by Palak Kumar Jha : -- keywords: +patch pull_requests: +18397 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19046 ___ Python tracker ___

[issue39980] importlib.resources.path() may return incorrect path when using custom loader

2020-03-17 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +barry, jaraco ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: Mark: > The problem with having a single immortal `None`, is that it will cause data > cache thrashing as two different CPUs modify the refcount on the shared > `None` object. Yeah, I concur with Mark: having one singleton per interpreter should provide bet

[issue24916] In sysconfig, don't rely on sys.version format

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > What do you think? I would prefer to see a PR to give my opinion :) -- ___ Python tracker ___

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-17 Thread hai shi
hai shi added the comment: > Maybe we should just add a private function for test in _testcapi. Oh, there have a problem with this idea: struct _is is defined in internal/pycore_pystate.h. _testcapi must test the public Python C API, not CPython internal C API --

[issue10572] Move test sub-packages to Lib/test

2020-03-17 Thread Brett Cannon
Brett Cannon added the comment: I'm also still in favour of the change. While people may have worked around this that doesn't mean we need to keep forcing them to do so. People worked around our lack of booleans but we chose to still fix that. ;) -- _

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-17 Thread Stefan Krah
Stefan Krah added the comment: > So it's clear that something has to change. IMO, preserving (2) and relaxing > (1) is the more useful choice. But not in this issue I think. GH-18969 is a minimal change that *removes* UB for the standard sizes. UB for the native type is a direct consequence

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- title: test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with -> test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with

2020-03-17 Thread STINNER Victor
New submission from STINNER Victor : AMD64 Ubuntu Shared 3.x: https://buildbot.python.org/all/#/builders/101/builds/532 test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ... Stdout: 15.51s Stderr: Warning -- threading_cleanup() failed to cleanup 0 threads (count

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > _testcapi must test the public Python C API, not CPython internal C API Use _testinternalcapi in this case. -- ___ Python tracker ___

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Mauro S. M. Rodrigues
Mauro S. M. Rodrigues added the comment: Hi Anthony, Thanks for asking, yeah I'm interested in push a new version. I'll do it later today and I'll post a link to the pr here. -- ___ Python tracker ___

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Antony Lee
Change by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5b1ef200d31a74a9b478d0217d73ed0a659a8a06 by Victor Stinner in branch 'master': bpo-39824: module_traverse() don't call m_traverse if md_state=NULL (GH-18738) https://github.com/python/cpython/commit/5b1ef200d31a74a9b478d0217d73ed0a659a8a06 ---

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: Thanks Petr and Nick for the review ;-) Pablo Galindo Salgado: > I think Cython makes use of PEP-489 so unless I am missing something all > generated extensions use PEP-489 structures. Alright. I still consider that my change is correct and will no harm anyo

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-17 Thread hai shi
hai shi added the comment: > Use _testinternalcapi in this case. oh, forgive me. I don't atttention this extension module before :( -- ___ Python tracker ___ _

[issue39989] Output closing parenthesis in ast.dump() on separate line

2020-03-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: The current output looks like Python code. The proposed revision looks more like C, and I find the example above less readable with the prominence given to what is close to noise. The difference is part of the reason I left C for Python over 2 decades ago.

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is your use case Anthony? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18398 pull_request: https://github.com/python/cpython/pull/19047 ___ Python tracker ___ __

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset ebf6bb9f5ef032d1646b418ebbb645ea0b217da6 by Victor Stinner in branch 'master': bpo-39991: Enhance uuid parser for MAC address (GH-19045) https://github.com/python/cpython/commit/ebf6bb9f5ef032d1646b418ebbb645ea0b217da6 --

[issue39991] test_uuid.test_netstat_getnode() fails on FreeBSD VM: uuid._netstat_getnode() uses IPv6 address as MAC address

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: Ok, the new stricter parser should now cover all cases. If not, it should be easier to fix it ;-) I close the issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracke

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Anthony Sottile
Anthony Sottile added the comment: one example is here: https://github.com/pre-commit/pre-commit/blob/bb6f1efe63c168d9393d520bd60e16c991a57059/pre_commit/store.py#L137-L139 where I would want cleanup in the exceptional case another (related but different) closed-source use case involves crea

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

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 514c469719f149e1722a91a9d0c63bf89dfefb2a by Dong-hee Na in branch 'master': bpo-1635741: Port itertools module to multiphase initialization (GH-19044) https://github.com/python/cpython/commit/514c469719f149e1722a91a9d0c63bf89dfefb2a --

[issue39717] Fix exception causes in tarfile module

2020-03-17 Thread Ram Rachum
Ram Rachum added the comment: Ethan, got a verdict? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue26660] tempfile.TemporaryDirectory() cleanup exception if nonwriteable or non-searchable files or directories created

2020-03-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39996] test_multiprocessing_fork hangs on AMD64 FreeBSD Shared 3.x

2020-03-17 Thread STINNER Victor
New submission from STINNER Victor : Sadly, faulthandler failed to dump the Python traceback and kill the process. Instead, the main libregrtest process had to kill the child process (process group) :-( https://buildbot.python.org/all/#/builders/152/builds/420 ... 0:56:25 load avg: 0.22 runn

[issue39996] test_multiprocessing_fork hangs on AMD64 FreeBSD Shared 3.x

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: In the previous build 419, test_multiprocessing_fork took 4 min 12 sec. -- ___ Python tracker ___ ___

[issue31895] How to implement api in python website

2020-03-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- type: performance -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you want the conditional cleanup, then TemporaryDirectory is obviously a wrong tool. mkdtemp looks more appropriate. If you remove directory in process of working with temporary directory, would it help if you create a subdirectory in the temporary dire

  1   2   >