[issue46258] Minor algorithmic improvements for math.isqrt

2022-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset d02c5e9b55a8651b7d396ac3f2bdedf1fc1780b5 by Mark Dickinson in branch 'main': bpo-46258: Streamline isqrt fast path (#30333) https://github.com/python/cpython/commit/d02c5e9b55a8651b7d396ac3f2bdedf1fc1780b5 --

[issue46258] Minor algorithmic improvements for math.isqrt

2022-01-15 Thread Mark Dickinson
Change by Mark Dickinson : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue46388] Improve test coverage of functools.total_ordering

2022-01-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-01-15 Thread Nikita Sobolev
Nikita Sobolev added the comment: Arie, can you please explain what is the technical difference between these two cases: ```python class A: __slots__ = ('a', ) # fields class B(A): __slots__ = ('a', 'b') # fields ``` And: ```python class C: __slots__ = ('a', ) #

[issue46387] `test_field_descriptor` in `test_collections` should test all pickle protocols

2022-01-15 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now this test does not test all pickle protocols: https://github.com/python/cpython/blob/d02c5e9b55a8651b7d396ac3f2bdedf1fc1780b5/Lib/test/test_collections.py#L680-L682 But, I guess that it should, like all other tests do. PR is on its way.

[issue46387] `test_field_descriptor` in `test_collections` should test all pickle protocols

2022-01-15 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46387] `test_field_descriptor` in `test_collections` should test all pickle protocols

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

[issue46390] Multiple test failures on Alpine 3.15 / musl-1.2.2-r7

2022-01-15 Thread Christian Heimes
New submission from Christian Heimes : I'm getting multiple test failures with latest Alpine 3.15 and musl-1.2.2-r7. Some test failures may be caused by wrong assumptions in our tests, some might be bugs in musl lib.c 9 tests failed: test__locale test_c_locale_coercion test_cmd_line

[issue46317] Pathlib.rename isn't robust

2022-01-15 Thread Barney Gale
Barney Gale added the comment: Fair enough. Users who wanted to avoid copying file metadata would then do something like this, I suppose? import pathlib import shutil path = pathlib.Path('foo') path.move('bar', copy_function=shutil.copy) I guess the downside here is that

[issue43741] http.client leaks from self.fp.read()

2022-01-15 Thread Yassir Karroum
Yassir Karroum added the comment: Hi Hynkek, Thanks for the bug report. I'll change the type category to "resource usage", since "crash" is typically reserved for issues where python crash (for exemple due to a seg fault). Can you also provide a minimal code to check your issue ? Where

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2022-01-15 Thread Alex Waygood
Alex Waygood added the comment: @terry, have you had a chance to glance at my PR at all? I'd really appreciate your review! :) -- ___ Python tracker ___

[issue46386] Improve `test_typing::test_immutability_by_copy_and_pickle`

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

[issue46388] Improve test coverage of functools.total_ordering

2022-01-15 Thread Russel Webber
New submission from Russel Webber : A few lines of the functools.total_ordering implementation are not covered by the tests. Specifically, coverage.py shows the returns of NotImplemented: ... if op_result is NotImplemented: return op_result ... as not covered in the functions:

[issue46389] 3.11: unused generator comprehensions cause f_lineno==None

2022-01-15 Thread Ned Batchelder
New submission from Ned Batchelder : In Python 3.11, unused generator comprehensions cause trace events with f_lineno set to None. %< - import linecache, sys def trace(frame, event, arg): # The weird globals here is to avoid a

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

2022-01-15 Thread Christian Heimes
Christian Heimes added the comment: A bunch of failing tests are related to bpo-46390. CPython's test suite does not pass with musl libc yet. -- dependencies: +Multiple test failures on Alpine 3.15 / musl-1.2.2-r7 ___ Python tracker

[issue29964] [doc] %z directive has no effect on the output of time.strptime

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

[issue20281] [doc] time.strftime %z format specifier is the same as %Z

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

[issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes

2022-01-15 Thread Yassir Karroum
Change by Yassir Karroum : -- nosy: +ukarroum nosy_count: 7.0 -> 8.0 pull_requests: +28814 pull_request: https://github.com/python/cpython/pull/30612 ___ Python tracker ___

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

2022-01-15 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +28818 pull_request: https://github.com/python/cpython/pull/30615 ___ Python tracker ___

[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-01-15 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46376] PyMapping_Check returns 1 for list

2022-01-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46317] Pathlib.rename isn't robust

2022-01-15 Thread Oz Tiram
Oz Tiram added the comment: Thanks for the answer, it makes sense now. Yes, I would adopt this. Allowing users to use `copy2` (or any other functio ...) using a keyword. -- ___ Python tracker

[issue46376] PyMapping_Check returns 1 for list

2022-01-15 Thread Bar Harel
Bar Harel added the comment: @rhettinger I completely understand what you're saying and at first I agreed with you. Before I gave it a closer look, I thought about the same thing - we want reliability. Reliability is important and will avoid subtle bugs, which is why I was against this

[issue46383] _zoneinfo module_free has invalid function signature

2022-01-15 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28812 pull_request: https://github.com/python/cpython/pull/30610 ___ Python tracker

[issue46383] _zoneinfo module_free has invalid function signature

2022-01-15 Thread Christian Heimes
Christian Heimes added the comment: New changeset cfbde65df318eea243706ff876e5ef834c085e5f by Christian Heimes in branch 'main': bpo-46383: Fix signature of zoneinfo module_free function (GH-30607) https://github.com/python/cpython/commit/cfbde65df318eea243706ff876e5ef834c085e5f --

[issue46376] PyMapping_Check returns 1 for list

2022-01-15 Thread Bar Harel
Bar Harel added the comment: > That was true in 2011 and it is still true today Python's methodology greatly shifted since 2011. For the better or worse, Python lost some of its duck typing. Nowadays, most people use linters. Wherever you'd try to pass sre_parse.SubPattern, the linter will

[issue46383] _zoneinfo module_free has invalid function signature

2022-01-15 Thread Kumar Aditya
Change by Kumar Aditya : -- nosy: +kumaraditya303 nosy_count: 3.0 -> 4.0 pull_requests: +28813 pull_request: https://github.com/python/cpython/pull/30611 ___ Python tracker

[issue10202] ftplib doesn't check close status after sending file

2022-01-15 Thread mike mcleod
mike mcleod added the comment: Working.. should be able to create pull request soon. Note part of suggestions include using SIOCOUTQ, but this does not have an equivalent for windows. And as Murphy's law goes this is likely to be where the problem is! --

[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-01-15 Thread Spencer Brown
Spencer Brown added the comment: Both will function, but class B will add its slots after A's, causing there to be an extra unused slot in the object that you can only access by directly using the A.a descriptor. So all slotted inheriting dataclasses cause the object to use more memory than

[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-01-15 Thread Arie Bovenberg
Arie Bovenberg added the comment: Spencer is correct. The documentation even adds: "This renders the meaning of the program undefined." It's clear it doesn't break anything users would often encounter (we would have heard about it), but it's still undefined behavior. --

[issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc

2022-01-15 Thread Christian Heimes
Christian Heimes added the comment: I noticed that 9 test suites are failing on Alpine 3.15, see bpo-46390. Should we require a stable buildbot before we proclaim official support for Alpine? -- dependencies: +Multiple test failures on Alpine 3.15 / musl-1.2.2-r7

[issue46376] PyMapping_Check returns 1 for list

2022-01-15 Thread Aviram
Aviram added the comment: I agree that a developer should and would prefer the `Py_TPFLAGS_*` but when you visit https://docs.python.org/3/c-api/sequence.html It seems like the best practice to determine Sequence protocol is by using this function, hence leading to confusion. There's no

[issue46386] Improve `test_typing::test_immutability_by_copy_and_pickle`

2022-01-15 Thread Nikita Sobolev
New submission from Nikita Sobolev : There are several problems with this test: https://github.com/python/cpython/blob/d02c5e9b55a8651b7d396ac3f2bdedf1fc1780b5/Lib/test/test_typing.py#L2130 1. It does not test all `pickle` protocols 2. It does not test newly added `ParamSpec` (probably others,

[issue46386] Improve `test_typing::test_immutability_by_copy_and_pickle`

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

[issue46133] Feature request: allow mechanism for creator of exec-generated code to provide source to pdb

2022-01-15 Thread Spencer Brown
Spencer Brown added the comment: There is a solution to this: you can modify the linecache module's cache to add lines under a fake filename, which is the approach attrs takes here: https://github.com/python-attrs/attrs/blob/9727008fd1e40bc55cdc6aee71e0f61553f33127/src/attr/_make.py#L347

[issue46388] Improve test coverage of functools.total_ordering

2022-01-15 Thread Russel Webber
Change by Russel Webber : -- keywords: +patch pull_requests: +28819 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30616 ___ Python tracker ___

[issue46378] Experiment with LLVM BOLT binary optimizer

2022-01-15 Thread Dong-hee Na
Change by Dong-hee Na : -- components: +Build ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42028] Regression in mimetypes for image/bmp

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

[issue28186] Autogenerated tabs / trailing whitespace

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42390] Other Python implementations may not expose the module name in datetime type names

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: William, can you elaborate where this came up? -- nosy: +iritkatriel status: open -> pending versions: -Python 3.7, Python 3.8 ___ Python tracker

[issue46372] int/float specializations should mutate the LHS in-place when possible

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

[issue46388] Improve test coverage of functools.total_ordering

2022-01-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the PR. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46388] Improve test coverage of functools.total_ordering

2022-01-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 0a28118324f64851b684ec3afdd063c47513a236 by Russel Webber in branch 'main': bpo-46388: Test NotImplemented code path for functools.total_ordering (GH-30616) https://github.com/python/cpython/commit/0a28118324f64851b684ec3afdd063c47513a236

[issue44158] Clarify documentation for redirected stdout/stderr when using subprocess in Linux

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 ___ Python tracker

[issue44158] Clarify documentation for redirected stdout/stderr when using subprocess in Linux

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39819] NULL pointer crash in Modules/_cursesmodule.c in PyInit__curses() on MIPS uclibc-ng and ncurses-6.2

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: Python 3.7 is no longer maintained. Please create a new issue if you are seeing this problem on a current (>= 3.9) version. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed

[issue34165] uu.decode() raises binascii.Error instead of uu.Error on invalid data

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7 ___ Python tracker ___

[issue45639] Support modern image formats in MIME types

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue45955] Calling read() on HTTPError may cause KeyError in tempfile

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- type: -> behavior versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue46391] Library multiprocess leaks named resources.

2022-01-15 Thread XD Trol
Change by XD Trol : -- keywords: +patch pull_requests: +28821 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30617 ___ Python tracker ___

[issue39663] IDLE: Add additional tests for pyparse

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

[issue40962] Add documentation for asyncio._set_running_loop()

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- type: -> enhancement versions: +Python 3.11 -Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue44901] Info about used pickle protocol used by multiprocessing.Queue

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39663] IDLE: Add additional tests for pyparse

2022-01-15 Thread Terry J. Reedy
Change by Terry J. Reedy : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45266] subtype_clear can not be called from derived types

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: Victor, it's not clear to me whether this is a bug report or a "how do I do this" question, but in either case if you posted your code along with "I expected X but got Y", it would be easier to understand the issue. -- nosy: +iritkatriel versions:

[issue44620] UUIDv1 is not RFC 4122 compliant

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- type: -> behavior versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue37943] mimetypes.guess_extension() doesn’t get JPG right

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- resolution: remind -> out of date status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue39324] Add mimetype for extension .md (markdown)

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue42199] bytecode_helper assertNotInBytecode fails too eagerly

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

[issue37084] _ctypes not failing, can't find reason

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: Python 3.7 is no longer maintained, so it's unlikely anyone will look at this now. Please create a new issue if you can reproduce the problem on a current version (>=3.9). -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status:

[issue34924] inspect.signature isn't aware that types.MethodType can wrap any callable

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39276] type() cause segmentation fault in callback function called from C extension

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34672] '%Z' strftime specifier never works with musl

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

[issue46392] MessageIDHeader is too strict for message-id

2022-01-15 Thread bpoaugust
New submission from bpoaugust : The email headerregistry class MessageIDHeader is too strict when parsing existing Message-Ids. It can truncate Message-Ids that are valid according to the obsolete rules. As the saying has it: "Be liberal in what you accept, and conservative in what you

[issue45686] ElementTree.Element.extend: bad error message when error occurs in generator

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46391] Library multiprocess leaks named resources.

2022-01-15 Thread XD Trol
New submission from XD Trol : Repo is the standard tool that Google uses to build Android, Chrome OS, Chromium, etc, written in Python. Many Repo users have encountered resource leak warnings with Python 3.9. https://bugs.chromium.org/p/gerrit/issues/detail?id=14934=component%3Arepo=5 I

[issue44408] imaplib fails when server sends extra blank line after literal value

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: How does it fail? Can you provide a reproducer and add a unit test to the PR? -- nosy: +iritkatriel type: crash -> behavior versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue43814] Fix the error message for disallowed __weakref__ slots

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue46391] Library multiprocess leaks named resources.

2022-01-15 Thread Oleg Iarygin
Oleg Iarygin added the comment: I added core devs related to multiprocessing into a nosy list so they got a notification and the PR will be evaluated and merged faster. FYI, the devs are Davin Potts and Antoine Pitrou (as per ). -- nosy:

[issue29257] Possible error in discussion of Abstract Base Classes and abstract properties

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: I think this is out of date, the example is different now: https://docs.python.org/3/library/abc.html#abc.abstractproperty -- nosy: +iritkatriel resolution: -> out of date status: open -> pending ___ Python tracker

[issue23557] Misc/SpecialBuilds.txt contains outdated information about PYMALLOC_DEBUG

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: The PYMALLOC_DEBUG macro was removed in https://github.com/python/cpython/pull/25711/files -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue36369] test_weakref super slow on RPi Zero

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: 3.7 is no longer maintained. Please create a new issue if you are seeing slow tests with a current version of python (ideally 3.10 or one of the 3.11 alphas), and you are interested in investigating along the lines of Victor's suggestion. -- nosy:

[issue46378] Experiment with LLVM BOLT binary optimizer

2022-01-15 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___

[issue39823] Disassembly - improve documentation for bytecode instruction class and set source line no. attribute for every instruction

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: I don't think this change should be made - it would generate the same information in a slightly different format, which will break existing code while not making it possible to do anything we can't do now. -- nosy: +iritkatriel versions: +Python 3.11

[issue39441] mimetypes.guess_extension unable to get non-lowercase mimetype

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39441] mimetypes.guess_extension unable to get non-lowercase mimetype

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: See also Issue20392. -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42548] debugger stops at breakpoint of `pass` that is not actually reached

2022-01-15 Thread Irit Katriel
Irit Katriel added the comment: I can't reproduce this on 3.11. 3.7 is no longer maintained, and there have been many changes since then to the trace output. It is likely that this bug has been fixed, but please create a new issue if you see it on a current version. -- nosy:

[issue39986] test_os / test_listdir failed as root-directory changed during test

2022-01-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list

[issue46387] `test_field_descriptor` in `test_collections` should test all pickle protocols

2022-01-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: I approved this but the code wasn't wrong. Once an object has demonstrated that it can pickle at all, it is the testing responsibility of the pickle module tests to make sure that new protocols handle the same inputs as the old ones. I went ahead and

[issue46393] Generate frozenset constants when explicitly appropriate

2022-01-15 Thread Dennis Sweeney
Dennis Sweeney added the comment: There's also the hacky expression {*()} to get an empty set -- nosy: +Dennis Sweeney ___ Python tracker ___

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-15 Thread Ethan Furman
Ethan Furman added the comment: New changeset acf7403f9baea3ae1119fc6b4a3298522188bf96 by Ethan Furman in branch 'main': bpo-40066: [Enum] update str() and format() output (GH-30582) https://github.com/python/cpython/commit/acf7403f9baea3ae1119fc6b4a3298522188bf96 --

[issue43476] Enabling access to showsyntaxerror for IDLE's shell

2022-01-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Whatever you worked out is probably better than depending on something that I hope to significantly change. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue46393] Generate frozenset constants when explicitly appropriate

2022-01-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Sigh. You are right. I will close this tomorrow. This also means that 'set()' is not guaranteed to return an empty built-in set. I did think of this workaround for that: >>> (empty:={None}).clear() >>> empty set() Go ahead and propose something on

[issue46386] Improve `test_typing::test_immutability_by_copy_and_pickle`

2022-01-15 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 09087b8519316608b85131ee7455b664c00c38d2 by Nikita Sobolev in branch 'main': bpo-46386: improve `test_typing:test_immutability_by_copy_and_pickle` (GH-30613) https://github.com/python/cpython/commit/09087b8519316608b85131ee7455b664c00c38d2

[issue46386] Improve `test_typing::test_immutability_by_copy_and_pickle`

2022-01-15 Thread Dong-hee Na
Dong-hee Na added the comment: Thank you @sobolevn ! -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46387] `test_field_descriptor` in `test_collections` should test all pickle protocols

2022-01-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 37eab55ac9da6b6361f136a1da15bfcef12ed954 by Nikita Sobolev in branch 'main': bpo-46387: test all pickle protos in `test_field_descriptor` in `test_collections` (GH-30614)

[issue43371] Mock.assert_has_calls works strange

2022-01-15 Thread Roy Smith
Roy Smith added the comment: I agree that this is confusing and that what we need is an assertion for the top-level mock having specific calls in a specific order, and ignores any intervening extra calls to mocked functions. In other words, a version of assert_has_calls() which looks at

[issue46386] Improve `test_typing::test_immutability_by_copy_and_pickle`

2022-01-15 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The additional tests would also be useful to have in https://github.com/python/typing/tree/master/typing_extensions if you're interested. -- nosy: +Jelle Zijlstra ___ Python tracker

[issue46386] Improve `test_typing::test_immutability_by_copy_and_pickle`

2022-01-15 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thank you, Jelle. Will send a PR to typing_extensions today as well :) -- ___ Python tracker ___

[issue46393] Generate frozenset constants when explicitly appropriate

2022-01-15 Thread Terry J. Reedy
New submission from Terry J. Reedy : The CPython compiler is capable of making frozenset constants without being explicitly asked to. Exactly how it does so is, of course, 'hidden' from python code. With current main: . >>> dis('{1,2,3}') 1 0 BUILD_SET0

[issue46393] Generate frozenset constants when explicitly appropriate

2022-01-15 Thread Steven D'Aprano
Steven D'Aprano added the comment: The difficulty is that frozenset may have been shadowed, or builtins monkey-patched, so we cannot know what frozenset({1, 2, 3}) will return until runtime. Should we re-consider a frozenset display literal? f{1, 2, 3} works for me. -- nosy:

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2022-01-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: A minimal version of util.py just for this issue is fine. What is blocking the issue deciding exactly what the minimum should be. Are both the extension list and function needed? Alex says somewhere in PR comments that ispythonsource passes directories.