[issue37694] Crash when calling zipimport.zipimporter.__new__().()

2021-09-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because the zipimport module is now implemented in Python. -- ___ Python tracker ___ ___ Python

[issue45090] Add pairwise to What's New in Python 3.10; mark it as new in itertools docs

2021-09-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +rhettinger stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue43612] zlib.compress should have a wbits argument

2021-09-03 Thread Ruben Vorderman
Ruben Vorderman added the comment: Thanks for the review, Lukasz! It was fun to create the PR and optimize the performance for gzip.py as well. -- ___ Python tracker ___

[issue43613] gzip.compress and gzip.decompress are sub-optimally implemented.

2021-09-03 Thread Ruben Vorderman
Change by Ruben Vorderman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +26573 pull_request: https://github.com/python/cpython/pull/28135 ___ Python tracker ___ __

[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b4b6342848ec0459182a992151099252434cc619 by Irit Katriel in branch 'main': bpo-45083: Include the exception class qualname when formatting an exception (GH-28119) https://github.com/python/cpython/commit/b4b6342848ec0459182a992151099252434cc619

[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-03 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +26572 pull_request: https://github.com/python/cpython/pull/28134 ___ Python tracker _

[issue34602] python3 resource.setrlimit strange behaviour under macOS

2021-09-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset be9de8721d63b9d8e032d508069daf88c06542c6 by Łukasz Langa in branch 'main': bpo-34602: Quadruple stack size on macOS when compiling with UBSAN (GH-27309) https://github.com/python/cpython/commit/be9de8721d63b9d8e032d508069daf88c06542c6 --

[issue43613] gzip.compress and gzip.decompress are sub-optimally implemented.

2021-09-03 Thread Ruben Vorderman
Ruben Vorderman added the comment: Issue was solved by moving code from _GzipReader to separate functions and maintaining the same error structure. This solved the problem with maximum code reuse and full backwards compatibility. -- ___ Python tr

[issue44748] argparse: a bool indicating if arg was encountered

2021-09-03 Thread wodny
wodny added the comment: I used a wrapper to default values. This gives me nice help message with ArgumentDefaultsHelpFormatter and easy way to update a config file dictionary with results from parse_args(). ```python from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter, Namesp

[issue45077] multiprocessing.Pool(64) crashes on Windows

2021-09-03 Thread Eryk Sun
Eryk Sun added the comment: See bpo-26903 for a similar problem in concurrent.futures.ProcessPoolExecutor. It was resolved by adding a limit constant, _MAX_WINDOWS_WORKERS == 61. WaitForMultipleObjects() can wait on up to 64 object handles, but in this case 3 slots are already taken. The po

[issue12499] textwrap.wrap: add control for fonts with different character widths

2021-09-03 Thread Tobias Bengfort
Change by Tobias Bengfort : -- nosy: +xi2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue12499] textwrap.wrap: add control for fonts with different character widths

2021-09-03 Thread Tobias Bengfort
Change by Tobias Bengfort : -- pull_requests: +26574 pull_request: https://github.com/python/cpython/pull/28136 ___ Python tracker ___ _

[issue24665] CJK support for textwrap

2021-09-03 Thread Tobias Bengfort
Change by Tobias Bengfort : -- nosy: +xi2 nosy_count: 10.0 -> 11.0 pull_requests: +26575 pull_request: https://github.com/python/cpython/pull/28136 ___ Python tracker ___ _

[issue42238] Deprecate suspicious.py?

2021-09-03 Thread Julien Palard
Change by Julien Palard : -- pull_requests: +26576 pull_request: https://github.com/python/cpython/pull/28137 ___ Python tracker ___ ___

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-03 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +26577 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28138 ___ Python tracker ___

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-09-03 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue. test_marshal failed on AMD64 Arch Linux Usan 3.x: https://buildbot.python.org/all/#/builders/719/builds/108 == FAIL: test_deterministic_sets (test.test_marshal.BugsTestCas

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-09-03 Thread STINNER Victor
STINNER Victor added the comment: The test failed at: def test_deterministic_sets(self): # bpo-37596: To support reproducible builds, sets and frozensets need to # have their elements serialized in a consistent order (even when they # have been scrambled by hash ran

[issue41031] Inconsistency in C and python traceback printers

2021-09-03 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch nosy: +iritkatriel nosy_count: 1.0 -> 2.0 pull_requests: +26578 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28139 ___ Python tracker _

[issue41031] Inconsistency in C and python traceback printers

2021-09-03 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45094] Consider using __forceinline and __attribute__((always_inline)) for debug builds

2021-09-03 Thread STINNER Victor
New submission from STINNER Victor : I converted many C macros to static inline functions to reduce the risk of programming bugs (macros pitfalls), limit variable scopes to the function, have a more readable function, and benefit of the function name even when it's inlined in debuggers and pr

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-03 Thread STINNER Victor
Change by STINNER Victor : -- title: Consider using __forceinline and __attribute__((always_inline)) for debug builds -> Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds __

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-03 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +corona10, erlendaasland, pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2021-09-03 Thread STINNER Victor
STINNER Victor added the comment: See bpo-45094: "Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds". -- ___ Python tracker ___

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-03 Thread STINNER Victor
STINNER Victor added the comment: See bpo-45094: "Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds". -- ___ Python tracker ___

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-03 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mail

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-09-03 Thread Brandt Bucher
Brandt Bucher added the comment: Thanks for finding this, Victor. That failure is surprising to me. Is it really possible for the order of the elements in a set to vary based on platform or build configuration (even with a fixed PYTHONHASHSEED at runtime)? Really, this looks like it’s only a

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-03 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26579 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28140 ___ Python tracker ___ _

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7974c30b9fd84fa56ea1515ed2c08b38edf1a383 by Victor Stinner in branch 'main': bpo-45094: Add Py_NO_INLINE macro (GH-28140) https://github.com/python/cpython/commit/7974c30b9fd84fa56ea1515ed2c08b38edf1a383 -- ___

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7974c30b9fd84fa56ea1515ed2c08b38edf1a383 by Victor Stinner in branch 'main': bpo-45094: Add Py_NO_INLINE macro (GH-28140) https://github.com/python/cpython/commit/7974c30b9fd84fa56ea1515ed2c08b38edf1a383 -- ___

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7974c30b9fd84fa56ea1515ed2c08b38edf1a383 by Victor Stinner in branch 'main': bpo-45094: Add Py_NO_INLINE macro (GH-28140) https://github.com/python/cpython/commit/7974c30b9fd84fa56ea1515ed2c08b38edf1a383 -- ___

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7974c30b9fd84fa56ea1515ed2c08b38edf1a383 by Victor Stinner in branch 'main': bpo-45094: Add Py_NO_INLINE macro (GH-28140) https://github.com/python/cpython/commit/7974c30b9fd84fa56ea1515ed2c08b38edf1a383 -- ___

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-03 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26580 pull_request: https://github.com/python/cpython/pull/28141 ___ Python tracker ___ __

[issue43950] Include column offsets for bytecode instructions

2021-09-03 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +26581 pull_request: https://github.com/python/cpython/pull/28142 ___ Python tracker ___ _

[issue43950] Include column offsets for bytecode instructions

2021-09-03 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: New changeset 85ea2d6165dec0cffa6302eb6dc40406eae1edf5 by Batuhan Taskaya in branch 'main': bpo-43950: support positions for dis.Instructions created through dis.Bytecode (GH-28142) https://github.com/python/cpython/commit/85ea2d6165dec0cffa6302eb6dc40406ea

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-03 Thread Dong-hee Na
Dong-hee Na added the comment: I like the idea of Py_ALWAYS_INLINE personally if we have to do that. -- ___ Python tracker ___ ___

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-09-03 Thread Brandt Bucher
Brandt Bucher added the comment: I'm compiling Clang now to try to reproduce using a UBSan build (I'm on Ubuntu, though). I'm not entirely familiar with how these sanitizer builds work... could the implication be that we're hitting undefined behavior at some point? Or is it just a red herri

[issue1514420] Traceback display code can attempt to open a file named ""

2021-09-03 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +26582 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28143 ___ Python tracker ___ _

[issue1514420] Traceback display code can attempt to open a file named ""

2021-09-03 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.10, Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-lis

[issue42255] webbrowser.MacOSX is unused, untested and undocumented

2021-09-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset bc1c49fa94b2abf70e6937373bf1e6b5378035c5 by Dong-hee Na in branch 'main': bpo-42255: Deprecate webbrowser.MacOSX from Python 3.11 (GH-27837) https://github.com/python/cpython/commit/bc1c49fa94b2abf70e6937373bf1e6b5378035c5 -- ___

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-09-03 Thread Brandt Bucher
Brandt Bucher added the comment: Found it. This particular build is configured with HAVE_ALIGNED_REQUIRED=1, which forces it to use fnv instead siphash24 as its string hashing algorithm. -- ___ Python tracker _

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-03 Thread Guido van Rossum
Guido van Rossum added the comment: I am still not convinced that it's a good idea to put the docstring in the surrounding code object. I'd like to be able to see it when I introspect a code object, not just when introspecting a function object (I may be analyzing code only, and it's hard to

[issue42255] webbrowser.MacOSX is unused, untested and undocumented

2021-09-03 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +26583 pull_request: https://github.com/python/cpython/pull/28144 ___ Python tracker ___ _

[issue42255] webbrowser.MacOSX is unused, untested and undocumented

2021-09-03 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +26584 pull_request: https://github.com/python/cpython/pull/28145 ___ Python tracker ___ _

[issue45022] Update libffi to 3.4.2

2021-09-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 8c3a10e58b12608c3759fee684e7aa399facae2a by Steve Dower in branch '3.8': bpo-45022: Pin current libffi build to fixed version in preparation for upcoming update (GH-27982) (GH-28001) https://github.com/python/cpython/commit/8c3a10e58b12608c3759fee

[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 41c23740243cc3a0699bc4d5dcfd47a0007ff039 by Miss Islington (bot) in branch '3.9': [3.9] bpo-45083: Include the exception class qualname when formatting an exception (GH-28119) (GH-28135) https://github.com/python/cpython/commit/41c23740243cc3a0699

[issue45095] Easier loggers traversal tree with a logger.getChildren method

2021-09-03 Thread Stéphane Blondon
New submission from Stéphane Blondon : Currently, logging.root.manager.loggerDict is usable to do a homemade traversal of the loggers tree. However, it's not a public interface. Adding a 'logger.getChildren()' method would help to implement the traversal. The method would return a set of logge

[issue43669] PEP 644: Require OpenSSL 1.1.1 or newer

2021-09-03 Thread Philip Prindeville
Change by Philip Prindeville : -- nosy: +philipp ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue45022] Update libffi to 3.4.2

2021-09-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +26585 pull_request: https://github.com/python/cpython/pull/28146 ___ Python tracker ___ _

[issue33618] Support TLS 1.3

2021-09-03 Thread Philip Prindeville
Change by Philip Prindeville : -- nosy: +philipp ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue45056] compiler: Unnecessary None in co_consts

2021-09-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Let's wait for 3.10.1 to backport this because I prefer to keep pyc files stable for the release candidate. Turns out that people are already preparing wheels to 3.10 and although this may be fine, I don't want to risk incompatibilities for the releas

[issue42255] webbrowser.MacOSX is unused, untested and undocumented

2021-09-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset ce83e42437b8e5a4bf4237f981a7a90401922456 by Dong-hee Na in branch '3.9': bpo-42255: Update webbrowser doc for macOS (GH-28145) https://github.com/python/cpython/commit/ce83e42437b8e5a4bf4237f981a7a90401922456 -- _

[issue42255] webbrowser.MacOSX is unused, untested and undocumented

2021-09-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 2a8956c268772fd31aeeb6ee522f123af94a2926 by Dong-hee Na in branch '3.10': bpo-42255: Update webbrowser doc for macOS (GH-28144) https://github.com/python/cpython/commit/2a8956c268772fd31aeeb6ee522f123af94a2926 --

[issue42255] webbrowser.MacOSX is unused, untested and undocumented

2021-09-03 Thread Łukasz Langa
Change by Łukasz Langa : -- versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42255] webbrowser.MacOSX is unused, untested and undocumented

2021-09-03 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for the patches, Dong-hee Na! ✨ 🍰 ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue12499] textwrap.wrap: add control for fonts with different character widths

2021-09-03 Thread Éric Araujo
Éric Araujo added the comment: A PR was opened for this. `text_len` is used as param/attribute name. -- versions: +Python 3.11 -Python 3.5 ___ Python tracker ___ _

[issue45022] Update libffi to 3.4.2

2021-09-03 Thread Steve Dower
Steve Dower added the comment: New changeset 6f8bc464e006f672d1aeafbfd7c774a40215dab2 by Steve Dower in branch 'main': bpo-45022: Update libffi to 3.4.2 in Windows build (GH-28146) https://github.com/python/cpython/commit/6f8bc464e006f672d1aeafbfd7c774a40215dab2 --

[issue45022] Update libffi to 3.4.2

2021-09-03 Thread Steve Dower
Steve Dower added the comment: So on one hand, this change applies cleanly and it appears nothing needs to change to adopt the newer version. On the other hand, because the libffi DLL has a different name, it changes the layout on disk. I know we don't do that (except in exceptional circumst

[issue45093] Add method to compare dicts accounting for order

2021-09-03 Thread Michael Rans
Michael Rans added the comment: Thank you. Another case is in round trip processing of JSON or YML. Other cases are where you would prefer an OrderedDict over a dict. I think the method would help clarify things because it would make it obvious that it is for ordered comparisons while the e

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-09-03 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +26586 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/28147 ___ Python tracker ___ ___

[issue45096] Update Tools/freeze to make use of Tools/scripts/freeze_modules.py?

2021-09-03 Thread Eric Snow
New submission from Eric Snow : In bpo-45019 we added Tools/scripts/freeze_modules.py to improve how we manage which modules get frozen by default. (We turned previously manual steps into automation of generated code.) There is probably some overlap with what we do in Tools/freeze/freeze.py

[issue45053] MD5SumTests.test_checksum_fodder fails on Windows

2021-09-03 Thread Nikita Sobolev
Nikita Sobolev added the comment: Yes, it was encodings problem :) This line solved it (here: https://github.com/python/cpython/blob/6f8bc464e006f672d1aeafbfd7c774a40215dab2/Tools/scripts/md5sum.py#L69): ```python out.write('%s %s\n' % (m.hexdigest(), filename.encode( sys.getfilesyst

[issue45056] compiler: Unnecessary None in co_consts

2021-09-03 Thread Guido van Rossum
Guido van Rossum added the comment: Are you sure? I know we're really close to the release, but I'd much rather change the PYC format during the RC cycle than once we're doing bugfix releases. I don't think we've ever changed the magic number between bugfix releases. (I realize this doesn't cha

[issue45075] confusion between frame and frame_summary in traceback module

2021-09-03 Thread Irit Katriel
Irit Katriel added the comment: New changeset 0b58e863df9970b290a4de90c67f9ac30c443817 by Irit Katriel in branch 'main': bpo-45075: distinguish between frame and FrameSummary in traceback mo… (GH-28112) https://github.com/python/cpython/commit/0b58e863df9970b290a4de90c67f9ac30c443817 --

[issue45075] confusion between frame and frame_summary in traceback module

2021-09-03 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition

2021-09-03 Thread Sam Bull
Change by Sam Bull : -- nosy: +dreamsorcerer nosy_count: 8.0 -> 9.0 pull_requests: +26587 pull_request: https://github.com/python/cpython/pull/28149 ___ Python tracker ___

[issue23354] Loading 2 GiLOC file which raises exception causes wrong traceback

2021-09-03 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25291] better Exception message for certain task termination scenario

2021-09-03 Thread Irit Katriel
Irit Katriel added the comment: This is doing something different now (on 3.11): iritkatriel@Irits-MBP cpython % ./python.exe ttt.py /Users/iritkatriel/src/cpython/ttt.py:5: DeprecationWarning: There is no current event loop loop = asyncio.get_event_loop() i am task.. [here

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2021-09-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list

[issue45034] Improve struct.pack out of range error messages

2021-09-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree, including use of hex, if possible, for unsigned (non-negative) values. Grepping 'format requires' returns F:\dev\3x\Modules\_struct.c: 365: "'%c' format requires 0 <= number <= %zu", F:\dev\3x\Modules\_struct.c: 371: "'%c' for

[issue45056] compiler: Unnecessary None in co_consts

2021-09-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I honestly want to backport it because I think it should not have any negative impact, but on the other hand I don't feel very confident as the release candidate phase is supposed to be as close as possible as the final release and this is not fixing

[issue45093] Add method to compare dicts accounting for order

2021-09-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 The dict API is to important to be burdened with a mostly useless and rarely needed method. Besides we already have simple ways to do it, for example: assert list(d.items()) == list(e.items()) or: assert OrderedDict(d) == OrderedDict(e)

[issue45056] compiler: Unnecessary None in co_consts

2021-09-03 Thread Guido van Rossum
Guido van Rossum added the comment: Since we're not changing the magic number, wheels created for rc1 will still work with the final 3.10 (and vice versa!) -- creating a wheel or PYC file just will produce a different sequence of bytes, but there are other things that do that. Then again, s

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-03 Thread Inada Naoki
Inada Naoki added the comment: > I am still not convinced that it's a good idea to put the docstring in the > surrounding code object. I'd like to be able to see it when I introspect a > code object, not just when introspecting a function object (I may be > analyzing code only, and it's hard

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-03 Thread Guido van Rossum
Guido van Rossum added the comment: Let's wait until Mark Shannon is back from vacation (another week). Note that class docstrings *are* contained in the class body code object -- there's executable code equivalent to __doc__ = "this is the docstring" But I agree it's not easily found witho

[issue45058] Undefined behavior for syntax "except AError or BError:" accepted by interpreter

2021-09-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: "except a or b:" should be same as "except (a or b):" which should be same as "except a:", which is current behavior in 3.10.0, etc. -- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue45020] Freeze all modules imported during startup.

2021-09-03 Thread Nick Coghlan
Nick Coghlan added the comment: For the module metadata problem: one potential approach to that for "designed to be frozen" stdlib modules is to set the values directly in the module code, rather than trying to set them automatically in the frozen import machinery. It should also be possible

[issue45060] Do not use the equality operators with None

2021-09-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset e2b29304137e6253b7bb89c180ef5d113d60b4eb by Serhiy Storchaka in branch '3.10': [3.10] bpo-45060: Get rid of few uses of the equality operators with None (GH-28087). (GH-28092) https://github.com/python/cpython/commit/e2b29304137e6253b7bb89c180e

[issue45060] Do not use the equality operators with None

2021-09-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue45086] f-string unmatched ']'

2021-09-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: The behavior remains the same in 3.11 ('main' branch). New PEG parser parses this the same. (Pablo, if there is a mistake below, please correct.) Normally, the parser copies code chars between quotes, with or without '\' interpretation, into a string objec

[issue45093] Add method to compare dicts accounting for order

2021-09-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 The dict API is too important to be burdened with a mostly useless and rarely needed method. Besides we already have simple ways to do it, for example: assert list(d.items()) == list(e.items()) or: assert OrderedDict(d) == OrderedDict(e) --

[issue45093] Add method to compare dicts accounting for order

2021-09-03 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg401022 ___ Python tracker ___ ___ Python-bugs-list mail

[issue45093] Add method to compare dicts accounting for order

2021-09-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: -1 also for the reasons given. Michael, a question asking how would have made a good python-list post. So I posted the answers in "How to include insertion order in dict equality" -- nosy: +terry.reedy resolution: -> rejected stage: -> resolved sta

[issue45097] "The loop argument is deprecated" reported when user code does not use it

2021-09-03 Thread Chih-Hsuan Yen
New submission from Chih-Hsuan Yen : With Python 3.9.7, "DeprecationWarning: The loop argument is deprecated" may be reported when user code does not use it. Here is an example: import asyncio import warnings warnings.filterwarnings('error') def crash(): raise KeyboardInterrupt async de

[issue44815] asyncio.gather no DeprecationWarning if task are passed

2021-09-03 Thread Chih-Hsuan Yen
Chih-Hsuan Yen added the comment: A regression in 3.9.7 (issue45097) seems related to this issue. Could you have a look? -- nosy: +yan12125 ___ Python tracker ___ ___

[issue45086] f-string unmatched ']'

2021-09-03 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think it really makes a difference, but here's some background: For f-strings, the parser itself does not break apart the f-string into (, ) parts. There's a custom parser (at https://github.com/python/cpython/blob/0b58e863df9970b290a4de90c67f9ac30c44

[issue41010] email.message.EmailMessage.get_body

2021-09-03 Thread Andrei Kulakov
Change by Andrei Kulakov : -- nosy: +kj resolution: -> fixed stage: -> resolved status: open -> closed type: crash -> behavior versions: +Python 3.11 -Python 3.8 ___ Python tracker _

[issue45093] Add method to compare dicts accounting for order

2021-09-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Another case is in round trip processing of JSON or YML. Sorry for my ignorance, but I don't see how or why an unordered comparison would help you with round-tripping JSON or YAML. The order of key:value pairs in JSON is not guaranteed to be preserved, s

[issue45093] Add method to compare dicts accounting for order

2021-09-03 Thread Michael Rans
Michael Rans added the comment: Thanks for all your help and advice. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2021-09-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > For the very specific case of os.environ.clear(), the C function clearenv() > could be used if available. It is bad in any way. The supposed example of using clear(): old_environ = dict(os.environ) os.environ.clear() os.environ.update(new_env