[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread Eric V. Smith
Eric V. Smith added the comment: These files were probably added as part of str.format() or short float repr. I think the fact that they've been moved to Include/cpython means that user code shouldn't be using them. See https://bugs.python.org/issue35134 and https://vstinner.github.io/split-

[issue43818] Email does not apply policy to multipart messages with defects

2021-04-12 Thread Joseph Ishac
New submission from Joseph Ishac : I have noticed an issue (Python 3.8.5) where an email can be read in as bytes, but will not be returned as such with the as_bytes() call if the message is multipart, has a boundary which is not properly quoted, and the message has non-ascii text. It seems to

[issue42238] Deprecate suspicious.py?

2021-04-12 Thread STINNER Victor
STINNER Victor added the comment: Pablo reenabled the check: commit 20ac34772aa9805ccbf082e700f2b033291ff5d2 (upstream/master, master) Author: Pablo Galindo Date: Mon Apr 12 20:53:15 2021 +0100 Fix Sphinx errors in the documentation and re-activate the suspicious check (GH-25368)

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-12 Thread Paul Moore
Paul Moore added the comment: There's a lot of technical discussion of implementation details here, but not much about use cases. IMO, what's more important is whether NamedTemporaryFile is *useful* to people, and what they want to use it *for*. Working out how to implement it can come after

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread Andrew V. Jones
Andrew V. Jones added the comment: > I think the fact that they've been moved to Include/cpython means that user > code shouldn't be using them. > I think it is fine to say that they shouldn't be used, but then we get this from Victor's blog: > It was decided that internal header files must

[issue43798] Add position metadata to alias AST type

2021-04-12 Thread daniel hahler
daniel hahler added the comment: @Pablo: the problem (referenced in the pytest issue) is that `ast.alias` has new required arguments now (see also the adjusted test in https://github.com/python/cpython/commit/75a06f067bd0a2687312e5f8e78f9075be76ad3a#diff-3f516b60719dd445d33225e4f316b36e85c9c51

[issue43798] Add position metadata to alias AST type

2021-04-12 Thread daniel hahler
Change by daniel hahler : -- versions: -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue43798] Add position metadata to alias AST type

2021-04-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ah, it was not clear from the issue that pytest was constructing nodes by hand. It makes sense now. Thanks! -- ___ Python tracker ___

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-12 Thread Ethan Furman
Ethan Furman added the comment: Paul, If "rescuing" (i.e. "fixing" ;) NamedTemporaryFile was arduous, complicated, or had serious backwards-compatibility issues then I would completely agree with you. However, the fix is simple, the only backwards-compatible issue is the file would still

[issue42238] Deprecate suspicious.py?

2021-04-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Background on why I reactivated it: I every single alpha release I had to fix actual documentation errors (no false positives) like the one fixed here: https://github.com/python/cpython/commit/20ac34772aa9805ccbf082e700f2b033291ff5d2 I don't like the

[issue43819] ExtensionFileLoader Does Not Implement invalidate_caches

2021-04-12 Thread Ian H
New submission from Ian H : Currently there's no easy way to get at the internal cache of module spec objects for compiled extension modules. See https://github.com/python/cpython/blob/20ac34772aa9805ccbf082e700f2b033291ff5d2/Python/import.c#L401-L415. For example, these module spec objects c

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-12 Thread Paul Moore
Paul Moore added the comment: Sorry - I'm maybe making an unwarranted assumption. If simply removing "delete on close" behaviour in the CM case is acceptable, then I'm 100% in favour of that. I'd assumed that it was somehow unacceptable, but you're right, and it's not clear if Eryk is agree

[issue43820] Remove namespace copy from dataclasses.make_dataclass()

2021-04-12 Thread Eric V. Smith
New submission from Eric V. Smith : In make_dataclasses(), the "namespace" argument is copied because it is mutated. This isn't really necessary: the callback passed to types.new_class() could just update its "ns" parameter with "namespace" and with the new attributes (__anotations__ and defa

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-12 Thread Ethan Furman
Ethan Furman added the comment: Hey, you agree with me now, so it's not noise. ;-) -- ___ Python tracker ___ ___ Python-bugs-list

[issue43774] [Doc] Document configure options in the Python documentation

2021-04-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset 85918e4ab6e9410008aef6dedf000d24b3e120ea by Victor Stinner in branch 'master': bpo-43774: Add more links to configure options (GH-25363) https://github.com/python/cpython/commit/85918e4ab6e9410008aef6dedf000d24b3e120ea --

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread STINNER Victor
STINNER Victor added the comment: See https://github.com/python/cpython/blob/master/Include/README.rst for the organization of the C API. -- ___ Python tracker ___ __

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-12 Thread Eryk Sun
Eryk Sun added the comment: > So we stop passing the O_TEMPORARY flag. If __enter__() is called, > close() closes the file but doesn't delete anything, and > __exit__() closes the file (if open) and deletes it (even if it > wasn't open). If there is no __enter__(), close() also deletes the

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-12 Thread Eryk Sun
Eryk Sun added the comment: > If that's the problem then why not change all of them to use the > name "address" or "addr" to avoid confusion and make it clear > simple. What is your view? Change them all to refer to `ptr`. It's not worth introducing a breaking change: >>> ctypes.string_

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-12 Thread Ethan Furman
Ethan Furman added the comment: New changeset 6379924ecd51e346b42b0293da0f4442a0f67707 by Ethan Furman in branch '3.9': [3.9] bpo-42248: [Enum] ensure exceptions raised in ``_missing_`` are released (GH-25350). (GH-25370) https://github.com/python/cpython/commit/6379924ecd51e346b42b0293da0f4

[issue43820] Remove namespace copy from dataclasses.make_dataclass()

2021-04-12 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +24105 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25372 ___ Python tracker ___ __

[issue43821] Undocumented behavior of sleep functions and asyncio delayed execution

2021-04-12 Thread Josef Havránek
New submission from Josef Havránek : Hi i found undocumented behavior of time.sleep, and call_at / call_later from asyncio loop There are two things to properly document/consider. It is time of delay/sleep when time for python stops (aka computer is going to hibernate/Cpu not runing) because

[issue43817] Add typing.get_annotations()

2021-04-12 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue43770] Rework C types initialization

2021-04-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24106 pull_request: https://github.com/python/cpython/pull/25373 ___ Python tracker ___ __

[issue43797] Improve syntax error for invalid comparisons

2021-04-12 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +24107 pull_request: https://github.com/python/cpython/pull/25375 ___ Python tracker ___ ___

[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members

2021-04-12 Thread Ethan Furman
Change by Ethan Furman : -- keywords: +patch pull_requests: +24108 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25376 ___ Python tracker ___ ___

[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members

2021-04-12 Thread Ethan Furman
Ethan Furman added the comment: `_create_pseudo_member_` was an implementation detail and has been removed. I did update the doc string which was migrated to `_missing_`. -- ___ Python tracker

[issue43822] Improve syntax errors for missing commas

2021-04-12 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : Given that is quite common to forgot a comma in containers, function calls, ...etc and that the current error is: >>> [a, b, c d] File "", line 1 [a, b, c d] ^ SyntaxError: invalid syntax We could improve the user experience quite

[issue43822] Improve syntax errors for missing commas

2021-04-12 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +24109 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25377 ___ Python tracker __

[issue43823] Improve syntax errors for invalid dictionary literals

2021-04-12 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : Currently the error for invalid dict literals is generic: >>> {1:2, 3:} File "", line 1 {1:2, 3:} ^ SyntaxError: invalid syntax >>> {1:2, 3} File "", line 1 {1:2, 3} ^ SyntaxError: invalid syntax We can have better

[issue43823] Improve syntax errors for invalid dictionary literals

2021-04-12 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +24110 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25378 ___ Python tracker __

[issue43824] array.array.__deepcopy__() accepts a parameter of any type

2021-04-12 Thread MingZhe Hu
New submission from MingZhe Hu : The C implementation of foreign function array.array.__deepcopy__() is declared as follows: https://github.com/python/cpython/blob/d9151cb45371836d39b6d53afb50c5bcd353c661/Modules/arraymodule.c#L855 The second argument is unused in the function body. However,

[issue41515] typing.get_type_hints generates KeyError

2021-04-12 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- pull_requests: +24111 pull_request: https://github.com/python/cpython/pull/25379 ___ Python tracker ___

[issue41515] typing.get_type_hints generates KeyError

2021-04-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks Victor. I have created https://github.com/python/cpython/pull/25379 that uses self.assertEqual instead of assert that produces syntax warning. -- ___ Python tracker

[issue43824] array.array.__deepcopy__() accepts a parameter of any type

2021-04-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: __deepcopy__ is required to take a second argument by the rules of the copy module; the second argument is supposed to be a memo dictionary, but there's no reason to use it for array.array (it can't contain Python objects, and you only use the memo dictionar

[issue43787] Optimize BZ2File, GzipFile, and LZMAFile __iter__ method.

2021-04-12 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue43787] Optimize BZ2File, GzipFile, and LZMAFile __iter__ method.

2021-04-12 Thread Inada Naoki
Inada Naoki added the comment: New changeset d2a8e69c2c605fbaa3656a5f99aa8d295f74c80e by Inada Naoki in branch 'master': bpo-43787: Add __iter__ to GzipFile, BZ2File, and LZMAFile (GH-25353) https://github.com/python/cpython/commit/d2a8e69c2c605fbaa3656a5f99aa8d295f74c80e -- __

[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2021-04-12 Thread Jordan Borean
Jordan Borean added the comment: I'm looking through the PR https://github.com/python/cpython/pull/17975 and it doesn't look like it addresses this particular problem. The code for start_tls https://github.com/python/cpython/blob/d2a8e69c2c605fbaa3656a5f99aa8d295f74c80e/Lib/asyncio/base_event

[issue43825] Deprecation warnings in test cases

2021-04-12 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : Following deprecation warnings are raised when tests are ran with -Wall in CPython test suite. I will raise a PR for this. 0:03:48 load avg: 0.79 [ 59/427] test_cmd_line

[issue43825] Deprecation warnings in test cases

2021-04-12 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +24112 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25380 ___ Python tracker ___

[issue43826] Resource warnings in test_subprocess

2021-04-12 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : It seems that some of the pipe objects were not closed properly causing resource warnings. Regarding "subprocess still running warning" I guess we need to call kill() on the subprocess before exiting test_send_signal_race2. I will raise a PR for t

[issue43826] Resource warnings in test_subprocess

2021-04-12 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +24113 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25381 ___ Python tracker ___

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-12 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Ok...let me review again. Having different names for the same argument can cause confusion, right? So are you telling that we should change the name to "ptr" to avoid a breaking change? If this issue is confirmed, I'm ready to submit a PR to make this chang

[issue43799] OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1

2021-04-12 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +24114 pull_request: https://github.com/python/cpython/pull/25382 ___ Python tracker _

[issue43799] OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1

2021-04-12 Thread Christian Heimes
Christian Heimes added the comment: New changeset a4833883c9b81b6b272cc7c5b67fa1658b65304c by Christian Heimes in branch 'master': bpo-43799: OpenSSL 3.0.0: declare OPENSSL_API_COMPAT 1.1.1 (GH-25329) https://github.com/python/cpython/commit/a4833883c9b81b6b272cc7c5b67fa1658b65304c

[issue43799] OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1

2021-04-12 Thread miss-islington
miss-islington added the comment: New changeset 7d9d5bf863bb0af26b74b0732ab89b2053d2fbec by Miss Islington (bot) in branch '3.9': [3.9] bpo-43799: OpenSSL 3.0.0: declare OPENSSL_API_COMPAT 1.1.1 (GH-25329) (GH-25382) https://github.com/python/cpython/commit/7d9d5bf863bb0af26b74b0732ab89b2053

[issue43799] OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1

2021-04-12 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +24115 pull_request: https://github.com/python/cpython/pull/25383 ___ Python tracker ___

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-12 Thread Eryk Sun
Eryk Sun added the comment: > So are you telling that we should change the name to "ptr" to > avoid a breaking change? The function parameter name is "ptr". Changing that name could break existing code. I don't think it's likely, but it's not worth breaking even one script just for this. So

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-12 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Ok..then submitting the PR in 10 minutes. -- ___ Python tracker ___ ___ Python-bugs-list mailing

<    1   2