[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Dong-hee Na
Dong-hee Na added the comment: @sobolevn Do you want to close it? Cleaning up the issue is one of the duties of triage members :) -- ___ Python tracker ___

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Dong-hee Na
Dong-hee Na added the comment: @gvanrossum Ah okay, Looks like bpo-46195 is the root of this issue. In this case, backporting is reasonable. -- ___ Python tracker ___

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Wasn’t the fix for it also backported? (Weird that the test wasn’t part of the fix.) -- ___ Python tracker ___

[issue46279] [docs] Minor information-ordering issue in __main__ doc

2022-01-12 Thread FeRD (Frank Dana)
FeRD (Frank Dana) added the comment: Readding Tal to the nosy list, since my previous comment was inadvertently accompanied by an eviction! (Sorry about that.) -- nosy: +taleinat ___ Python tracker

[issue37295] Possible optimizations for math.comb()

2022-01-12 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file50559/comb_pole2.py ___ Python tracker ___ ___ Python-bugs-list

[issue37295] Possible optimizations for math.comb()

2022-01-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: def comb64(n, k): 'comb(n, k) in multiplicative group modulo 64-bits' return (F[n] * Finv[k] * Finv[n-k] & (2**64-1)) << (S[n] - S[k] - S[n - k]) def comb_iterative(n, k): 'Straight multiply and divide when k is small.' result = 1 for r

[issue46363] Two typos in verions 3.7 document translation of zh_CN

2022-01-12 Thread perlang
New submission from perlang : In this URL, https://docs.python.org/zh-cn/3.7/library/ctypes.html There are two typos of '回掉' , the correct should be '回调'(means callback) I think. Best Regards, perlang -- assignee: docs@python components: Documentation messages: 410459 nosy:

[issue46287] UNC path normalisation issues on Windows

2022-01-12 Thread neonene
neonene added the comment: > PathCchSkipRoot() doesn't recognize forward slash as a path separator, I opened issue46362 and PR30571 about the mentioned abspath() behaviors. -- ___ Python tracker

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-12 Thread neonene
Change by neonene : -- keywords: +patch pull_requests: +28772 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30571 ___ Python tracker ___

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Dong-hee Na
Dong-hee Na added the comment: When I take a look at previous PRs, most of adding test cases were not backported. The backported cases were triggered by bug issues. But let's pass this case as an exceptional case. -- nosy: +corona10 ___ Python

[issue46362] os.path.abspath() needs more normalization on Windows

2022-01-12 Thread neonene
New submission from neonene : 3.11a3+ introduced the C version of abspath(), which shows incompletely normalized absolute path (see msg410068): >>> os.path.abspath(r'\\spam\\eggs. . .') 'spameggs. . .' >>> os.path.abspath('C:\\spam. . .') 'C:\\spam. . .' >>>

[issue39298] add BLAKE3 to hashlib

2022-01-12 Thread Jack O'Connor
Jack O'Connor added the comment: Yeah by intrinsics I mean stuff like _mm256_add_epi32(). All of that stuff is in these vendored files: blake3_avx2.c blake3_avx512.c blake3_neon.c blake3_sse2.c blake3_sse41.c Also to Michał's question above, I'm not necessarily opposed to publishing

[issue39298] add BLAKE3 to hashlib

2022-01-12 Thread Larry Hastings
Larry Hastings added the comment: I assume by "intrinsics" you mean using the GCC SIMD stuff, not like inlining memcpy() or something. My assumption is yes, that's fine, we appear to already be using them for BLAKE2. -- ___ Python tracker

[issue39298] add BLAKE3 to hashlib

2022-01-12 Thread Jack O'Connor
Jack O'Connor added the comment: > As a first pass I say we merge the reference C implementation. Do you mean portable-only C code, or portable + intrinsics? If the assembly files are out, I'd advocate for the latter. The intrinsics implementations are nearly as fast as the assembly code,

[issue39298] add BLAKE3 to hashlib

2022-01-12 Thread Larry Hastings
Larry Hastings added the comment: > In setup.py I assume that the target platform of the build is the same as the > current interpreter's platform. If this is included in CPython, it won't be using setup.py, so this isn't a concern. I don't think there's a way to use setup.py to

[issue39298] add BLAKE3 to hashlib

2022-01-12 Thread Jack O'Connor
Jack O'Connor added the comment: I was about to say the only missing feature was docstrings, but then I realized I hadn't included releasing the GIL. I've added that and pushed an update just now. Fingers crossed there's nothing else I've missed. I think it's in reasonably good shape, and

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread miss-islington
miss-islington added the comment: New changeset d9101c4e49dc29f21319493818130ad5468402a2 by Miss Islington (bot) in branch '3.9': bpo-46345: Add a test case for implicit `Optional` class attribute (GH-30535) https://github.com/python/cpython/commit/d9101c4e49dc29f21319493818130ad5468402a2

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread miss-islington
miss-islington added the comment: New changeset a468866a67d83a24e3a3c3a0070129773d28bbd9 by Miss Islington (bot) in branch '3.10': bpo-46345: Add a test case for implicit `Optional` class attribute (GH-30535) https://github.com/python/cpython/commit/a468866a67d83a24e3a3c3a0070129773d28bbd9

[issue37295] Possible optimizations for math.comb()

2022-01-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Okay, will set a cap on the n where a fixedj is used. Also, making a direct computation for k<20 is promising. -- ___ Python tracker

[issue37295] Possible optimizations for math.comb()

2022-01-12 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg410440 ___ Python tracker ___ ___ Python-bugs-list

[issue5396] os.read not handling O_DIRECT flag

2022-01-12 Thread Jakub Wilk
Change by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: I wrote 3 scripts to reproduce the bug in a more reliable way. So I just have to type "bisect" and it runs the test 12 times. (1) bisect.bat: --- @"C:\vstinner\python\3.9\PCbuild\amd64\python_d.exe" bisect.py --- (2) bisect.py: --- import subprocess import

[issue46361] Small ints aren't always cached properly

2022-01-12 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: I modified PR 30565 (3.10) and PR 30566 (3.9) to fix the ABI. I added _PyGC_GetState() which always use PyInterpreterState.gc of the main interpreter. -- ___ Python tracker

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2022-01-12 Thread Anders Kaseorg
Anders Kaseorg added the comment: > While optparse that it isn't being developed further, therebut will not > be taken away. IIRC the reason for this was that it too had become > difficult to build out and that is what necessitated the creation of > argparse -- there wasn't clean way to add

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread Eric Snow
Eric Snow added the comment: > adding a new "gc" member in the _PyRuntimeState structure also causes the ABI > CI check to fail. What if you move it to the end of the struct? -- ___ Python tracker

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28770 pull_request: https://github.com/python/cpython/pull/30567 ___ Python tracker

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +28771 pull_request: https://github.com/python/cpython/pull/30568 ___ Python tracker ___

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 1de60155d5d01be2924e72fb68dd13d4fd00acd7 by Nikita Sobolev in branch 'main': bpo-46345: Add a test case for implicit `Optional` class attribute (GH-30535) https://github.com/python/cpython/commit/1de60155d5d01be2924e72fb68dd13d4fd00acd7

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: I prepared 3 pull requests to revert the commit 7247407c35330f3f6292f1d40606b7ba6afd5700: * PR 30564: main branch * PR 30565: 3.10 branch * PR 30566: 3.9 branch The problem is that the "Check if the ABI has changed" CI job fails in 3.9 and 3.10 branches.

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-12 Thread Eric Snow
Eric Snow added the comment: New changeset ed57b36c32e521162dbb97199e64a340d3bff827 by Eric Snow in branch 'main': bpo-45953: Statically allocate the main interpreter (and initial thread state). (gh-29883) https://github.com/python/cpython/commit/ed57b36c32e521162dbb97199e64a340d3bff827

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28769 pull_request: https://github.com/python/cpython/pull/30566 ___ Python tracker ___

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28768 pull_request: https://github.com/python/cpython/pull/30565 ___ Python tracker ___

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28767 pull_request: https://github.com/python/cpython/pull/30564 ___ Python tracker ___

[issue37295] Possible optimizations for math.comb()

2022-01-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM that the asymptotic benefits of Karatsuba multiplication are mostly lost when each of the factors has to be built-up recursively prior to the multiply. Also, the benefits of Karatsuba only start to appear at around 400-bit numbers. For us, we don't

[issue38204] Cannot compile on RPi with optimizations

2022-01-12 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python 3.7.4 does not build on Raspbian Buster with optimizations ___ Python tracker

[issue37595] Python 3.7.4 does not build on Raspbian Buster with optimizations

2022-01-12 Thread Irit Katriel
Irit Katriel added the comment: Closed issue38204 as a duplicate of this. I don't know whether the problem still exists in current python versions. -- nosy: +iritkatriel title: Python 3.7.4 does not build on Raspbian Buster -> Python 3.7.4 does not build on Raspbian Buster with

[issue36854] GC operates out of global runtime state.

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28766 pull_request: https://github.com/python/cpython/pull/30566 ___ Python tracker ___

[issue36854] GC operates out of global runtime state.

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28765 pull_request: https://github.com/python/cpython/pull/30565 ___ Python tracker ___

[issue32996] Improve What's New in 3.7

2022-01-12 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37591] test_concurrent_future failed

2022-01-12 Thread Irit Katriel
Irit Katriel added the comment: Thanks for reporting, but 3.7 is no longer maintained so it's unlikely that anyone will investigate this anymore. Please create a new issue if you are seeing this on a current version (>= 3.9). -- nosy: +iritkatriel resolution: -> out of date stage:

[issue46361] Small ints aren't always cached properly

2022-01-12 Thread Brandt Bucher
New submission from Brandt Bucher : To my surprise, it seems that it's possible to create "small" integers that should live in _PyLong_SMALL_INTS, but don't. Here are two examples I've found: >>> import decimal >>> i = int(decimal.Decimal(42)) # Modules/_decimal/_decimal.c:dec_as_long >>> i

[issue37422] Documentation on the change of __path__ in Python 3

2022-01-12 Thread Irit Katriel
Irit Katriel added the comment: >From the discussion is seems like there is nothing that needs to be added to >the docs. I will close this in a while if nobody objects. -- nosy: +iritkatriel status: open -> pending ___ Python tracker

[issue36557] [doc] Clarify the meaning of /uninstall in windows cli

2022-01-12 Thread Irit Katriel
Irit Katriel added the comment: This is referring to Doc/using/windows.rst -- assignee: -> docs@python components: +Documentation keywords: +easy nosy: +docs@python, iritkatriel title: Python (Launcher)3.7.3 CMDLine install/uninstall -> [doc] Clarify the meaning of /uninstall in

[issue36854] GC operates out of global runtime state.

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28764 pull_request: https://github.com/python/cpython/pull/30564 ___ Python tracker ___

[issue46307] string.Template should allow inspection of identifiers

2022-01-12 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue45331] Can create enum of ranges, cannot create range enum. Range should be subclassable... or EnumMeta.__new__ should be smarter.

2022-01-12 Thread Alex Waygood
Change by Alex Waygood : -- components: +Documentation -Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46341] duplicate paragraphs - asyncio Coroutines and Tasks file

2022-01-12 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +asvetlov, yselivanov stage: -> needs patch type: -> behavior ___ Python tracker ___ ___

[issue46357] socket module fix warning build on FreeBSD

2022-01-12 Thread David CARLIER
David CARLIER added the comment: I took as initialized to avoid undefined behavior rather than anything. -- ___ Python tracker ___

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Alex Waygood
Change by Alex Waygood : -- components: +Tests -Library (Lib) type: -> behavior ___ Python tracker ___ ___ Python-bugs-list

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-12 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +gvanrossum, kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46348] Modernize `test_typing`

2022-01-12 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46358] Modernize `test_asyncio/test_base_events.py`

2022-01-12 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +asvetlov, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46359] Continue to modernize `test_typing.py`

2022-01-12 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +gvanrossum, kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46342] Make @final introspectable at runtime

2022-01-12 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46360] Inconsistent import behavior for (unusual) submodules

2022-01-12 Thread Eric Snow
New submission from Eric Snow : Let's look at a hypothetical module "spam" and its submodule "spam.eggs": ``` # spam.py import sys sys.modules['spam.eggs'] = None ``` Then: >>> import spam.eggs >>> import sys >>> sys.modules['spam.eggs'] is None True >>> spam.eggs Traceback (most recent call

[issue46357] socket module fix warning build on FreeBSD

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: > Solves the "Make sure new member of socket address initialized." warning for > the bluetooth sockaddr_l2cap usage. You would to elaborate how you checked that all members of the socket address are initialized? Which socketmodule.c functions use this type?

[issue46359] Continue to modernize `test_typing.py`

2022-01-12 Thread Nikita Sobolev
Change by Nikita Sobolev : -- components: +Tests type: -> behavior versions: +Python 3.11 ___ Python tracker ___ ___

[issue46358] Modernize `test_asyncio/test_base_events.py`

2022-01-12 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28762 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30562 ___ Python tracker ___

[issue46359] Continue to modernize `test_typing.py`

2022-01-12 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28763 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30563 ___ Python tracker ___

[issue46359] Continue to modernize `test_typing.py`

2022-01-12 Thread Nikita Sobolev
New submission from Nikita Sobolev : This is a follow up to: - https://bugs.python.org/issue46348 - https://github.com/python/cpython/pull/30547 There are several other cases I've missed: 1. There's a test that is only executed under `<3.6`. I think that it should be removed:

[issue46358] Modernize `test_asyncio/test_base_events.py`

2022-01-12 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now there's a special case for python3.4 in `Lib/test/test_asyncio/test_base_events.py` file. Links: - https://github.com/python/cpython/blob/0bbf30e2b910bc9c5899134ae9d73a8df968da35/Lib/test/test_asyncio/test_base_events.py#L24 -

[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument

2022-01-12 Thread Steve Dower
Steve Dower added the comment: > Microsoft provides stat and struct stat, but they prepend the names with an > underscore. They are also influenced by various compiler options to choose between 32-bit and 64-bit fields. This makes it impossible to use the standard names as part of an ABI,

[issue27273] subprocess.run(cmd, input='text') should pass universal_newlines=True to Popen

2022-01-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: agreed. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33125] Windows 10 ARM64 platform support

2022-01-12 Thread Steve Dower
Steve Dower added the comment: PEP 514 is the way to find it on Windows (you should be able to look directly for your supported version, rather than enumerating to search). As far as I know, the best way to find it on macOS and Linux is to search PATH for "python3.X". Appreciate the size

[issue43323] UnicodeEncodeError: surrogates not allowed when parsing invalid charset

2022-01-12 Thread John Paul Adrian Glaubitz
John Paul Adrian Glaubitz added the comment: I'm running into exactly this issue when using 'offlineimap' which is written in Python. -- nosy: +glaubitz ___ Python tracker

[issue45569] Drop support for 15-bit PyLong digits?

2022-01-12 Thread Stefan Behnel
Stefan Behnel added the comment: Cython should be happy with whatever CPython uses (as long as CPython's header files agree with CPython's build ;-) ). I saw the RasPi benchmarks on the ML. That would have been my suggested trial platform as well.

[issue46342] Make @final introspectable at runtime

2022-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 0bbf30e2b910bc9c5899134ae9d73a8df968da35 by Jelle Zijlstra in branch 'main': bpo-46342: make @typing.final introspectable (GH-30530) https://github.com/python/cpython/commit/0bbf30e2b910bc9c5899134ae9d73a8df968da35 --

[issue40280] Consider supporting emscripten/webassembly as a build target

2022-01-12 Thread Christian Heimes
Christian Heimes added the comment: New changeset e34c9367f8e0068ca4bcad9fb5c2c1024d02a77d by Christian Heimes in branch 'main': bpo-40280: Allow to compile _testcapi as builtin module (GH-30559) https://github.com/python/cpython/commit/e34c9367f8e0068ca4bcad9fb5c2c1024d02a77d --

[issue46020] Optimize long_pow for the common case

2022-01-12 Thread Tim Peters

[issue45569] Drop support for 15-bit PyLong digits?

2022-01-12 Thread Mark Dickinson
Mark Dickinson added the comment: Adding Stefan Behnel to the nosy, since Cython is one of the few projects that might be directly affected by this change. Stefan: can you see any potential problems with changing the default to 30 here? -- nosy: +scoder

[issue37295] Possible optimizations for math.comb()

2022-01-12 Thread Tim Peters
Tim Peters added the comment: A feature of the current code is that, while the recursion tree can be very wide, it's not tall, with max depth proportional to the log of k. But it's proportional to k in the proposal (the C(n-j, k-j) term's second argument goes down by at most 20 per

[issue46357] socket module fix warning build on FreeBSD

2022-01-12 Thread David CARLIER
New submission from David CARLIER : - Solves the "Make sure new member of socket address initialized." warning for the bluetooth sockaddr_l2cap usage. -- components: FreeBSD messages: 410419 nosy: devnexen, koobs priority: normal pull_requests: 28761 severity: normal status: open

[issue40280] Consider supporting emscripten/webassembly as a build target

2022-01-12 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +28760 pull_request: https://github.com/python/cpython/pull/30559 ___ Python tracker ___

[issue27273] subprocess.run(cmd, input='text') should pass universal_newlines=True to Popen

2022-01-12 Thread Yassir Karroum
Yassir Karroum added the comment: As of 3.7, the subprocess.run has a new parameter "text". IMO it's safer to explicitly set the "text" value instead of inferring it from the "input" type. -- nosy: +ukarroum ___ Python tracker

[issue46335] asyncio.create_subprocess_exec throws RuntimeError yet still executes subprogram

2022-01-12 Thread Clint Olsen
Clint Olsen added the comment: Yes, I tried FastChildWatcher and I've had much better luck with that. If any exception gets thrown we _know_ for certain that the process wasn't created. -- ___ Python tracker

[issue46318] asyncio and ssl: ResourceWarning: unclosed transport

2022-01-12 Thread Julien Palard
Julien Palard added the comment: I don't know if it's related but _SSLPipe._shutdown_cb looks never called, in: self._sslobj.unwrap() self._sslobj = None self._state = _UNWRAPPED if self._shutdown_cb: self._shutdown_cb() the unwrap() call seems to always raise (The

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: > I don't know how we can stop people from using them though. The first option is to promote helper functions to abstract access to the PyFrameObject structure. The second option is to make the whole structure opaque and enforce the usage of helper

[issue46348] Modernize `test_typing`

2022-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset e2a9c8ef09cb7123d6b28852a323e6cc1f878b5b by Nikita Sobolev in branch 'main': bpo-46348: modernize `test_typing` (GH-30547) https://github.com/python/cpython/commit/e2a9c8ef09cb7123d6b28852a323e6cc1f878b5b --

[issue46351] Makefile missing '/' for some path names

2022-01-12 Thread Zachary Ware
Zachary Ware added the comment: This has been fixed in 3.11 with GH-28659, but the fix hasn't been backported due to the unlikelihood of this issue actually being a problem and a procedural wrinkle in the original PR. I suspect a clean backport would be accepted, but this is still a rather

[issue46314] Stray RESUME opcode for unused lambda

2022-01-12 Thread Mark Shannon
Mark Shannon added the comment: The news item was added in PR 30515 -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46331] 3.11: tracing revisits class line after class docstring

2022-01-12 Thread Mark Shannon
Change by Mark Shannon : -- assignee: Mark.Shannon -> keywords: -patch stage: resolved -> ___ Python tracker ___ ___

[issue45729] [doc] "history and license" link has wrong target

2022-01-12 Thread Éric Araujo
Éric Araujo added the comment: dev docs direct to `/license.html` which redirects to `/3/license.html` 3.9 docs have the same; wouldn’t it be better to have `/3.9/license.html`? -- ___ Python tracker

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-12 Thread Andreas H.
Andreas H. added the comment: Ah, let me add one point: PEP563 (-> `from __future__ import annotations`) is also not helping. Even with PEP563 enabled, the JSON example Json = Union[ List['Json'], Dict[str, 'Json'], int, float, bool, None ] needs to be written in exact the same way

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-01-12 Thread Mark Shannon
Mark Shannon added the comment: Are there any C programming guides we can link to, that explain API use? I would hope that competent C programmers would know not to read or write to undocumented fields. But if they come from a Python background, that might not be obvious. If the advice for

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread Mark Shannon
Mark Shannon added the comment: f_lineno is not part of the API. No field in PyFrameObject is. I don't know how we can stop people from using them though. If they don't know better than pulling data out of undocumented internal struct, then I'm not sure an underscore prefix is going to

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-12 Thread Andreas H.
Andreas H. added the comment: Yeah, sure. The use-case is (de)serialization. Right now I use the library cattr, but there are many others. If you are interested there is related discussion in the cattr board [1]. The original problem is how to define the types for serialization. 1. If

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread Silver Jublee Gaming
Silver Jublee Gaming added the comment: This must be normal -- nosy: +silverjubleegaming ___ Python tracker ___ ___

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: It's unclear to me if the ability to read directly the PyFrameObject.f_lineno member is a deliberate use case, or if we should enforce the usage of PyFrame_GetLineNumber(). -- ___ Python tracker

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: > f_lineno: changed, use PyFrame_GetLineNumber() Oh I was wrong, PyFrame_GetLineNumber() code is the same in Python 3.10. It was already a bad idea to read directly the f_lineno member in Python 3.10: PyFrame_GetLineNumber() should always be called.

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-01-12 Thread STINNER Victor
New submission from STINNER Victor : C extensions written for Python 3.10 and older which access directly to the PyFrameObject.f_back member build successfully on Python 3.11, but they can fail because f_back must not be read directly. f_back can be NULL even if the frame has an outer frame.

[issue46320] runtime/interp/thread state refactoring leads to segmentation fault

2022-01-12 Thread Eric Snow
Eric Snow added the comment: I'm glad we were able to figure it out relatively quickly...and without any big headaches. :) And thanks for testing against the alpha releases!!! You're having a positive impact. -- resolution: -> not a bug ___

[issue46292] Add microseconds to logging.LogRecord

2022-01-12 Thread Wade Carpenter
Change by Wade Carpenter : -- nosy: +arwade ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported

2022-01-12 Thread STINNER Victor
STINNER Victor added the comment: > On Solaris (and most likely several other platforms), > `PyThread_get_thread_native_id` is also not available. Oh, I added an explicit test for that in my PR 30556. > `Py_FrozenMain` should be added to stable ABI I suggest to first fix the issue (export

[issue40280] Consider supporting emscripten/webassembly as a build target

2022-01-12 Thread Christian Heimes
Christian Heimes added the comment: New changeset 43839ba438368a50f22f718d4ce8ce607c17046c by Christian Heimes in branch 'main': bpo-40280: Add --with-emscripten-target to build for browser or node (GH-30552) https://github.com/python/cpython/commit/43839ba438368a50f22f718d4ce8ce607c17046c

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-01-12 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +28759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30558 ___ Python tracker ___

[issue46354] AttributeError: module 'collections' has no attribute 'Mapping'

2022-01-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: Hi mareklachbc, What makes you think that this is a bug? Since at least version 3.7, you will have seen this warning: >>> import collections >>> collections.Mapping __main__:1: DeprecationWarning: Using or importing the ABCs from

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-01-12 Thread STINNER Victor
New submission from STINNER Victor : Python 3.11 made many changes in PyFrameObject and PyThreadState structures. Code which accessed directly structure members doesn't build anymore. For example, "frame->f_code" is now fails because PyFrameObject.f_code member is done. I propose to document

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-12 Thread Ken Jin
Ken Jin added the comment: @Andreas First of all, thanks for addressing my questions on the PR. I have one more question which I'll post here since it's not entirely related to your PR. ForwardRef isn't meant to be explicitly instantiated by a user [1] (it's a typing internal class), so do

  1   2   >