[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Defining complex.__complex__ and bytes.__bytes__ would not solve anything, because >>> issubclass(int, SupportsComplex) False >>> issubclass(float, SupportsComplex) False >>> issubclass(bytearray, SupportsBytes) False >>> issubclass(memoryview,

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the zipped file was created by zipfile module of Python, it is a bug. Could you reproduce the sequence of actions that creates such broken archive? -- ___ Python tracker

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not a bug in archivers, it is just a broken archive. The ZIP archive contains a central directory which lists all files in the archive, so the archiver can just read the central directory without reading all archive to get the list of files. There

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Xiaolong Liu
Xiaolong Liu added the comment: Andrei: The zipped file was created by zipfile module of Python. That's the reason I posted it here. I achived more than 2000 files to the abnormal zipped file. And no tool can extract whole files archived within. 7zip got the first part, and other tools

[issue44913] segfault in call to embedded PyModule_New

2021-08-22 Thread hai shi
hai shi added the comment: > which can be wrapped within the calls to PyGILState_Ensure/Release. OK, it's a good idea. But I think this enhancement will break the back compatibility. > python is initialized within that entrypoint python is initialized when you run python :) --

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Andrei Kulakov
Andrei Kulakov added the comment: Liu: builtin MacOS archive tool also reports 674. since Google archiver, and built-in tools on all major platforms report 674 files; it looks like 7zip might be the outlier here [note also that 7zip have their own format]. Unless it can be shown that

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Xiaolong Liu
Xiaolong Liu added the comment: Andrei: Exactly, different extraction tool gave different results. File no.tool platform 674the built-in tool on Win10win10 674winrarwin10 13997zipwin10 1399360zipwin10 674

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Andrei Kulakov
Andrei Kulakov added the comment: Liu: also please delete the quoted text when replying via email, otherwise it's hard to read on the issue page; much thanks! -- ___ Python tracker

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Andrei Kulakov
Andrei Kulakov added the comment: Liu: Thanks! Google zip also shows 674 files in this archive, so it appears that it's not a Python-only issue. Can you test it with a few zip programs, ideally on a 2 or more platforms, and check which of them report more than 674 files? (I simply opened

[issue34234] Use _PyAnyInt_Check() and _PyAnyInt_CheckExact() in 2.7

2021-08-22 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: -26358 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2021-08-22 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +26359 pull_request: https://github.com/python/cpython/pull/27901 ___ Python tracker ___

[issue34234] Use _PyAnyInt_Check() and _PyAnyInt_CheckExact() in 2.7

2021-08-22 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 nosy_count: 2.0 -> 3.0 pull_requests: +26358 pull_request: https://github.com/python/cpython/pull/27901 ___ Python tracker ___

[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2021-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: So let’s add that in a separate PR. -- --Guido (mobile) -- ___ Python tracker ___ ___

[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2021-08-22 Thread Dong-hee Na
Dong-hee Na added the comment: @guido >>> issubclass(bytes, typing.SupportsBytes) False IMHO, supporting is reasonable. -- ___ Python tracker ___

[issue44981] `module has no attribute` when `__all__` includes certain unicode characters

2021-08-22 Thread Eric V. Smith
Eric V. Smith added the comment: I'd be okay with changing it to a 3.11 enhancement to normalize elements of __all__, or maybe a request to change the documentation. -- ___ Python tracker

[issue44981] `module has no attribute` when `__all__` includes certain unicode characters

2021-08-22 Thread Steven D'Aprano
Steven D'Aprano added the comment: Eric, I think you may have been too hasty to close this as "not a bug". It has tripped people up before. See #41542 which has also been closed (I also think prematurely). We normalise variable names with NFKC, so we should normalise the values in __all__

[issue44981] `module has no attribute` when `__all__` includes certain unicode characters

2021-08-22 Thread Eric V. Smith
Eric V. Smith added the comment: Python normalizes identifiers with NFKC (see PEP 3131): >>> e0 = "ϵ" >>> import unicodedata >>> e1 = unicodedata.normalize("NFKC", e0) >>> e0 == e1 False >>> unicodedata.name(e0) 'GREEK LUNATE EPSILON SYMBOL' >>> unicodedata.name(e1) 'GREEK SMALL LETTER

[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2021-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: What about __bytes__? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: PyQt5 is not recognized from python 3.8 installation in python 3.10

2021-08-22 Thread Mats Wichmann
On 8/22/21 7:04 AM, Mohsen Owzar wrote: Hi guys, I have on my laptop the python installation 3.8 and newly I installed newest version 3.10 as well on my laptop. Now I have two IDLEs for both of the installations. When I rund some *.py file, having PyQt5 module, on the 3.8 version, it works as

[issue44979] pathlib: support relative path construction

2021-08-22 Thread Eric V. Smith
Eric V. Smith added the comment: To be clear, by "file", you mean python source file, or I guess .pyc file if only that exists. I can't say I've given it much thought. What about built-in modules? Or frozen modules? I'm not sure this is a great idea. In general, we've frowned on code that

[issue44938] Expose PyErr_ChainExceptions in the stable API

2021-08-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: As long as the cycles don't actually end in a crash or an infinite cycle, I think is fine to not include them in the contact. Even if that were included I don't think is actually a problem. Many APIs in C or C++ require the user to not form cycles,

[issue44981] `module has no attribute` when `__all__` includes certain unicode characters

2021-08-22 Thread Kolen Cheung
New submission from Kolen Cheung : With Python 3.9.6 on macOS, In a file all_bug.py, ```py __all__ = ("ϵ",) ϵ = "ϵ" ``` Then run `from all_bug import *`, resulted in AttributeError: module 'all_bug' has no attribute 'ϵ' This happens with some other unicode characters as well, but not

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: This can be re-closed. Deprecation warnings raised by the test suite are being fixed in BPO-44980 which already has an open pull request. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue44980] Clean up tests that return a value that isn't None

2021-08-22 Thread Łukasz Langa
Change by Łukasz Langa : -- title: Clean up a few tests that return a value!=None -> Clean up tests that return a value that isn't None ___ Python tracker ___

[issue4442] document immutable type subclassing via __new__

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for the patch, Raymond! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 ___ Python

[issue4442] document immutable type subclassing via __new__

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset ac87b07a10e0ba2834e8de9cf0ea29a40fd882b1 by Łukasz Langa in branch '3.9': [3.9] bpo-4442: Document use of __new__ for subclasses of immutable types (GH-27866) (GH-27900)

[issue44957] typing docs: Mention PEP 604 syntax more prominently

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Sebastian! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44938] Expose PyErr_ChainExceptions in the stable API

2021-08-22 Thread Chris Jerdonek
Chris Jerdonek added the comment: I agree with Serhiy that this API isn't necessarily the right one. It's just what happens to be there now. Also, we're still not clear on our stance towards cycles (see the issue25782 discussion). (Maybe the exposed version should result in an error if it

[issue24632] Improve documentation about __main__.py

2021-08-22 Thread Jack DeVries
Change by Jack DeVries : -- keywords: +patch nosy: +jack__d nosy_count: 11.0 -> 12.0 pull_requests: +26357 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/26883 ___ Python tracker

[issue17359] Mention "__main__.py" explicitly in command line docs

2021-08-22 Thread Jack DeVries
Change by Jack DeVries : -- keywords: +patch nosy: +jack__d nosy_count: 8.0 -> 9.0 pull_requests: +26356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26883 ___ Python tracker

[issue4442] document immutable type subclassing via __new__

2021-08-22 Thread miss-islington
miss-islington added the comment: New changeset 0627918f0b69a15aa16e4ccbb5d8eaae4f6a2caf by Miss Islington (bot) in branch '3.10': bpo-4442: Document use of __new__ for subclasses of immutable types (GH-27866) https://github.com/python/cpython/commit/0627918f0b69a15aa16e4ccbb5d8eaae4f6a2caf

[issue4442] document immutable type subclassing via __new__

2021-08-22 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26355 pull_request: https://github.com/python/cpython/pull/27900 ___ Python tracker ___

Re: PyQt5 is not recognized from python 3.8 installation in python 3.10

2021-08-22 Thread Chris Angelico
On Mon, Aug 23, 2021 at 4:31 AM Mohsen Owzar wrote: > How can I get all the packages available in 3.8 version also available for > 3.10 version without any new installation in 3.10 for each all already > existing packages? > You can't. With compiled binaries, especially, it's important to

[issue4442] document immutable type subclassing via __new__

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset eec340ea3af27887fcaac4029ebdee99f3713bff by Raymond Hettinger in branch 'main': bpo-4442: Document use of __new__ for subclasses of immutable types (GH-27866) https://github.com/python/cpython/commit/eec340ea3af27887fcaac4029ebdee99f3713bff

[issue4442] document immutable type subclassing via __new__

2021-08-22 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +26354 pull_request: https://github.com/python/cpython/pull/27899 ___ Python tracker

[issue44980] Clean up a few tests that return a value!=None

2021-08-22 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch pull_requests: +26353 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27898 ___ Python tracker ___

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 986750be5c7914f4b0120f5627fe848dcced103b by Miss Islington (bot) in branch '3.9': bpo-42560: reorganize Tkinter docs modules section for clarity (GH-27840) (GH-27895)

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c579f0ba62974b90f348e50088e4c036e281f45e by Łukasz Langa in branch '3.9': [3.9] bpo-42560: rework external references in Tkinter docs (GH-27838) (GH-27896) https://github.com/python/cpython/commit/c579f0ba62974b90f348e50088e4c036e281f45e

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 8e90f15ac88c66ddb7b084bb5780a126d35168af by Łukasz Langa in branch '3.10': [3.10] bpo-42560: rework external references in Tkinter docs (GH-27838) (GH-27893) https://github.com/python/cpython/commit/8e90f15ac88c66ddb7b084bb5780a126d35168af

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread miss-islington
miss-islington added the comment: New changeset 4d1e74f352d8bf70b726b373e19fd21274899d8e by Miss Islington (bot) in branch '3.10': bpo-42560: reorganize Tkinter docs modules section for clarity (GH-27840) https://github.com/python/cpython/commit/4d1e74f352d8bf70b726b373e19fd21274899d8e

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset e74cf8667d7d73e6cacd5d0aedcecbd20e711d6a by Miss Islington (bot) in branch '3.9': bpo-42560: tweaks to intro of Tkinter docs- add macOS, drop ActiveState (GH-27835) (GH-27892)

Re: on perhaps unloading modules?

2021-08-22 Thread MRAB
On 2021-08-22 17:18, Dennis Lee Bieber wrote: On Sat, 21 Aug 2021 17:15:14 -0300, Hope Rouselle declaimed the following: write some PHP precisely because it looked so much more cryptic than Allaire ColdFusion. Then C looked even more cryptic, so I fell in love with C. Try APL

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread miss-islington
miss-islington added the comment: New changeset 61ecd3e593e05c3d84adf5640458a01f8550aa74 by Miss Islington (bot) in branch '3.10': bpo-42560: tweaks to intro of Tkinter docs- add macOS, drop ActiveState (GH-27835)

[issue44957] typing docs: Mention PEP 604 syntax more prominently

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset dabb6e8ddd7626266184ba022bcb76f74196248f by Sebastian Rittau in branch 'main': bpo-44957: Promote PEP 604 syntax in typing docs (GH-27833) https://github.com/python/cpython/commit/dabb6e8ddd7626266184ba022bcb76f74196248f -- nosy:

[issue44957] typing docs: Mention PEP 604 syntax more prominently

2021-08-22 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +26352 pull_request: https://github.com/python/cpython/pull/27897 ___ Python tracker

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26351 pull_request: https://github.com/python/cpython/pull/27896 ___ Python tracker ___

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +26349 pull_request: https://github.com/python/cpython/pull/27894 ___ Python tracker ___

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset d5dbe8bca792350f4997c027535e0ca498abd1bb by Mark Roseman in branch 'main': bpo-42560: reorganize Tkinter docs modules section for clarity (GH-27840) https://github.com/python/cpython/commit/d5dbe8bca792350f4997c027535e0ca498abd1bb --

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +26350 pull_request: https://github.com/python/cpython/pull/27895 ___ Python tracker ___

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26348 pull_request: https://github.com/python/cpython/pull/27893 ___ Python tracker ___

[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.11 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Functions registered with TestCase.addClassCleanup are called because TestCase has default implementation of tearDownClass. But you can suppress it by setting tearDownClass = None. So there is a similar issue with class cleanup functions. -- nosy:

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +26347 pull_request: https://github.com/python/cpython/pull/27892 ___ Python tracker ___

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 12.0 -> 13.0 pull_requests: +26346 pull_request: https://github.com/python/cpython/pull/27891 ___ Python tracker

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 141c7a4fce8def67baa9d24f542c105b8502893e by Mark Roseman in branch 'main': bpo-42560: tweaks to intro of Tkinter docs- add macOS, drop ActiveState (GH-27835) https://github.com/python/cpython/commit/141c7a4fce8def67baa9d24f542c105b8502893e

[issue42560] Improve Tkinter Documentation

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset d1049d1d6b43296d4db1aa8668aa4ca807bf7adb by Mark Roseman in branch 'main': bpo-42560: rework external references in Tkinter docs (GH-27838) https://github.com/python/cpython/commit/d1049d1d6b43296d4db1aa8668aa4ca807bf7adb --

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b1db308c6114bb18c06656c94c0ffa73ba954977 by andrei kulakov in branch 'main': bpo-41322: Add unit tests for deprecation of test return values (GH-27846) https://github.com/python/cpython/commit/b1db308c6114bb18c06656c94c0ffa73ba954977

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-22 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 9ffe582a018a2babd14e874ae2b169370633fe33 by Miss Islington (bot) in branch '3.10': bpo-44926: `get_type_hints`: Add note about type aliases with forward refs (GH-27859) (GH-27860)

Re: on perhaps unloading modules?

2021-08-22 Thread Dennis Lee Bieber
On Sat, 21 Aug 2021 17:15:14 -0300, Hope Rouselle declaimed the following: >write some PHP precisely because it looked so much more cryptic than >Allaire ColdFusion. Then C looked even more cryptic, so I fell in love >with C. > Try APL then... (I suspect this will get garbaged in

PyQt5 is not recognized from python 3.8 installation in python 3.10

2021-08-22 Thread Mohsen Owzar
Hi guys, I have on my laptop the python installation 3.8 and newly I installed newest version 3.10 as well on my laptop. Now I have two IDLEs for both of the installations. When I rund some *.py file, having PyQt5 module, on the 3.8 version, it works as before without any problems. But whenn I

Re: basic auth request

2021-08-22 Thread Chris Angelico
On Sun, Aug 22, 2021 at 8:30 PM Barry Scott wrote: > > > > On 22 Aug 2021, at 10:37, Chris Angelico wrote: > > When it comes to security, one thing I'm very curious about is why we > don't have any sort of certificate renewal verification. My browser > could retain the certificates of some web

Re: on perhaps unloading modules?

2021-08-22 Thread Hope Rouselle
Hope Rouselle writes: > Chris Angelico writes: > >> On Tue, Aug 17, 2021 at 4:02 AM Greg Ewing >> wrote: >>> The second best way would be to not use import_module, but to >>> exec() the student's code. That way you don't create an entry in >>> sys.modules and don't have to worry about somehow

[issue44955] Method stopTestRun() is not always called for skipped tests

2021-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44940] Clarify the documentation of re.findall()

2021-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 ___ Python tracker

[issue44940] Clarify the documentation of re.findall()

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d006392245c904547e5727144235c2f9d7948e96 by Miss Islington (bot) in branch '3.9': bpo-44940: Clarify the documentation of re.findall() (GH-27849) (GH-27880) https://github.com/python/cpython/commit/d006392245c904547e5727144235c2f9d7948e96

[issue44955] Method stopTestRun() is not always called for skipped tests

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4e5162fd369baf25dd16a42ccd0fa7756744f4d0 by Miss Islington (bot) in branch '3.9': bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831) (GH-27882)

[issue44980] Clean up a few tests that return a value!=None

2021-08-22 Thread Andrei Kulakov
New submission from Andrei Kulakov : In #41322 the behavior of returning a value!=None from test methods was deprecated, there are currently a few tests in Python that do that; it would be good to fix them to be consistent with our deprecation requirement and to avoid deprecation warnings in

[issue44973] @classmethod can be stacked on @property, but @staticmethod cannot

2021-08-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44977] Deprecate delegation of int to __trunc__?

2021-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: I retract the suggestion to deprecate __trunc__. -- ___ Python tracker ___ ___

[issue44973] @classmethod can be stacked on @property, but @staticmethod cannot

2021-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: The classmethod and staticmethod decorators have somewhat different semantics. Accessing a classmethod with C.cm creates a bound method object which has both __call__ and __get__. In contrast, accessing a staticmethod with C.sm returns the underlying

[issue44977] Deprecate delegation of int to __trunc__?

2021-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: I think the needs are sufficiently different that __trunc__ still has value as its own thing, and it's a natural counterpart to __floor__ and __ceil__ (out of all the directed rounding modes, rounding towards zero probably turns up more often than rounding

[issue44977] Deprecate delegation of int to __trunc__?

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think that math.trunc() for UUID or IP4Address makes sense. -- ___ Python tracker ___

[issue44977] Deprecate delegation of int to __trunc__?

2021-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Possibly, we could have math.trunc() call __int__, letting us deprecate __trunc__. That would let users avoid gratuitous aliasing such as that in _pydecimal.py: __trunc__ = __int__ -- ___ Python tracker

[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-22 Thread Bastian Neuburger
Bastian Neuburger added the comment: Steve, I signed the CLA and created the PR, I don't know how long it takes until the info that the CLA is signed is propagated to bpo or github. Regarding failed builds: I will try to build again tomorrow when back at the office and can copy the errors,

[issue44979] pathlib: support relative path construction

2021-08-22 Thread Kirill Pinchuk
Change by Kirill Pinchuk : -- keywords: +patch pull_requests: +26344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27890 ___ Python tracker ___

[issue44977] Deprecate delegation of int to __trunc__?

2021-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: A GitHub code search shows a substantial number of uses of math.trunc out in the wild: https://github.com/search?q=math.trunc+extension%3Apy=Code So unfortunately, getting rid of math.trunc and __trunc__ looks a bit too much as though it would cause

[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-22 Thread Bastian Neuburger
Change by Bastian Neuburger : -- keywords: +patch pull_requests: +26343 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/27889 ___ Python tracker

[issue44979] pathlib: support relative path construction

2021-08-22 Thread Kirill Pinchuk
New submission from Kirill Pinchuk : Hi. I've been using this snippet for years and believe that it would be a nice addition to pathlib's functionality. Basically, it allows constructing path relative to the current file (instead of cwd). Comes quite handy when you're working with deeply

[issue44977] Deprecate delegation of int to __trunc__?

2021-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Afterwards, do __trunc__ and math.trunc() still need to exist? They were mostly unused. Now they would also be unnecessary. Just having them around would be a point of confusion. -- nosy: +rhettinger ___

Re: from foo import bar and the ast module

2021-08-22 Thread Chris Angelico
On Mon, Aug 23, 2021 at 12:26 AM Dan Stromberg wrote: > > > On Sun, Aug 22, 2021 at 7:14 AM Chris Angelico wrote: >> >> On Mon, Aug 23, 2021 at 12:08 AM Dan Stromberg wrote: >> > >> > In 'from foo import bar': >> > >> > With the ast module, I see how to get bar, but I do not yet see how to get

Re: from foo import bar and the ast module

2021-08-22 Thread Dan Stromberg
On Sun, Aug 22, 2021 at 7:14 AM Chris Angelico wrote: > On Mon, Aug 23, 2021 at 12:08 AM Dan Stromberg > wrote: > > > > In 'from foo import bar': > > > > With the ast module, I see how to get bar, but I do not yet see how to > get > > the foo. > > > > There are clearly ast.Import and

Re: from foo import bar and the ast module

2021-08-22 Thread Chris Angelico
On Mon, Aug 23, 2021 at 12:08 AM Dan Stromberg wrote: > > In 'from foo import bar': > > With the ast module, I see how to get bar, but I do not yet see how to get > the foo. > > There are clearly ast.Import and ast.ImportFrom, but I do not see the foo > part in ast.ImportFrom. > > ? >>> import

from foo import bar and the ast module

2021-08-22 Thread Dan Stromberg
In 'from foo import bar': With the ast module, I see how to get bar, but I do not yet see how to get the foo. There are clearly ast.Import and ast.ImportFrom, but I do not see the foo part in ast.ImportFrom. ? Thanks! -- https://mail.python.org/mailman/listinfo/python-list

[issue44977] Deprecate delegation of int to __trunc__?

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Completely agree. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue37082] Assignment expression symbol (walrus) not in built-in help()

2021-08-22 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39301] Specification of bitshift on integers should clearly state floor division used

2021-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: Closing; I think this is addressed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue27901] DOC: inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5

2021-08-22 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-08-22 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44019] operator.call/operator.__call__

2021-08-22 Thread Antony Lee
Change by Antony Lee : -- keywords: +patch pull_requests: +26342 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27888 ___ Python tracker ___

[issue32082] atexit module: allow getting/setting list of handlers directly

2021-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Irit. Should we close this issue as a duplicate? It's not identical (being able to modify the list of handlers versus just being able to inspect it), but it's pretty close. -- ___ Python tracker

[issue44978] Argument Clinic should not exclude __complex__ methods

2021-08-22 Thread Mark Dickinson
Change by Mark Dickinson : -- assignee: -> mark.dickinson resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44913] segfault in call to embedded PyModule_New

2021-08-22 Thread Madhu
Madhu added the comment: * hai shi <1629603770.32.0.682495978946.issue44...@roundup.psfhosted.org> Wrote on Sun, 22 Aug 2021 03:42:50 + > hai shi added the comment: > How about this one? > > if (!Py_IsInitialized()) { > return -1; > } [When this extension is loaded into a C

[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2021-08-22 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +26341 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27887 ___ Python tracker ___

[issue44978] Argument Clinic should not exclude __complex__ methods

2021-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset c5c3fbe2a16a8fcb77eb98eda53efb3e03b863ca by Mark Dickinson in branch 'main': bpo-44978: allow Argument Clinic to handle __complex__ special methods (GH-27886) https://github.com/python/cpython/commit/c5c3fbe2a16a8fcb77eb98eda53efb3e03b863ca

[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2021-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: > [...] we'll need `int.__complex__` and `float.__complex__` implementations as > well as `complex.__complex__`. The real problem here is that the "typing.SupportsComplex" protocol isn't a good match for code that needs to know that a given value `x` can be

[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2021-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: If the goal is to have `isinstance(obj, typing.SupportsComplex)` pass for objects that are convertible to complex, then we'll need `int.__complex__` and `float.__complex__` implementations as well as `complex.__complex__`. --

[pygame] Pygame 2.0.2.dev2 - Drumroll release

2021-08-22 Thread René Dudfield
 ☕ Cheer Up!   ✨ )) ✨  ┃ (( * ┣┓  we have a python3 -m pip install pygame==2.0.2.dev2 ┃* ┣┛  ┗━━┛   For YOU   Hello internet strangers. We’re back with a new release, packed with tons of mundane bug fixes and unexciting improvements! It’s been a while since the last

[issue44978] Argument Clinic should not exclude __complex__ methods

2021-08-22 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +26340 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27886 ___ Python tracker ___

[issue44978] Argument Clinic should not exclude __complex__ methods

2021-08-22 Thread Mark Dickinson
New submission from Mark Dickinson : The argument clinic currently refuses to handle a __complex__ method. However, unlike __int__ and __float__, __complex__ should require no special handling by the argument clinic, since there's no dedicated slot for the __complex__ method. PR arriving

[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2021-08-22 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

  1   2   >