[issue45641] Error In opening a file through tkinter on macOS Monterey

2021-10-30 Thread Dev Kumar
Dev Kumar added the comment: What happened? when is the new version is coming for tackling this problem? -- ___ Python tracker ___

[issue45666] Warning: "'swprintf' : format string '%s' requires an argument of type 'unsigned short *', but variadic argument 1 has type 'const char *'"

2021-10-30 Thread Ken Jin
Ken Jin added the comment: New changeset aad48062ef8f983fbb95f9dc0c3c3cef9c89df02 by Nikita Sobolev in branch 'main': bpo-45666: fixes warning with `swprintf` and `%s` (GH-29307) https://github.com/python/cpython/commit/aad48062ef8f983fbb95f9dc0c3c3cef9c89df02 -- nosy: +kj

[issue45653] Freeze the encodings module.

2021-10-30 Thread Filipe Laíns
Change by Filipe Laíns : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45653] Freeze the encodings module.

2021-10-30 Thread Filipe Laíns
Filipe Laíns added the comment: I have already opened up the PR, but I can change if desired. -- stage: patch review -> needs patch ___ Python tracker ___

[issue2628] ftplib Persistent data connection

2021-10-30 Thread Jonathan Bell
Change by Jonathan Bell : -- pull_requests: +27604 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/29337 ___ Python tracker ___

[issue45669] An 'ascii_alphanumerics' variable is missing in the 'strings' lib

2021-10-30 Thread Paolo Melchiorre
Paolo Melchiorre added the comment: Thank you all for the feedback, also I have been using python for years and contributing to other python-based projects it is my first PR to Cpython and I don't know if my contribution to the discussion is foreseen. It seems to me that adding this

[issue2628] ftplib Persistent data connection

2021-10-30 Thread Ethan Furman
Ethan Furman added the comment: If you're familiar with git and GitHub, can you create a PR? Otherwise, an updated patch here and we'll work on getting it merged. -- ___ Python tracker

[issue45625] Add support for top-level await

2021-10-30 Thread Fred
Fred added the comment: No, I was not aware of that. After I started Python by running "python3 -m asyncio" then it behaved as I expected it should behave by default. But this seems to work only in the REPL. I would like to write Python scripts stored in files where I can easily await at

[issue2628] ftplib Persistent data connection

2021-10-30 Thread Jonathan Bell
Jonathan Bell added the comment: The CLA is signed, and I'm again able to work on this. I was able to update this locally for Python 3 with a minimal test case. What specifically were you looking for? -- ___ Python tracker

[issue45680] Documentation on `GenericAlias` objects could be improved

2021-10-30 Thread Alex Waygood
Alex Waygood added the comment: This issue is related, but distinct, to previous issue https://bugs.python.org/issue42280. -- ___ Python tracker ___

[issue45680] Documentation on `GenericAlias` objects could be improved

2021-10-30 Thread Alex Waygood
Change by Alex Waygood : -- keywords: +patch pull_requests: +27603 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29335 ___ Python tracker ___

[issue45680] Documentation on `GenericAlias` objects could be improved

2021-10-30 Thread Alex Waygood
New submission from Alex Waygood : The documentation on `GenericAlias` objects implies at multiple points that only container classes can implement `__class_getitem__`, and goes into very little detail about what it means for a non-container class to be parameterized. -- assignee:

[issue45679] typing.Literal[True] is implicitly converted to typing.Literal[1]

2021-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27602 pull_request: https://github.com/python/cpython/pull/29334 ___ Python tracker ___

[issue45625] Add support for top-level await

2021-10-30 Thread Éric Araujo
Éric Araujo added the comment: Do you know about using "python -m asyncio" instead of "python"? -- nosy: +eric.araujo ___ Python tracker ___

[issue45617] sys.stdin does not iterate correctly on '\r' line separator

2021-10-30 Thread Éric Araujo
Éric Araujo added the comment: > '\r' support is implicitly documented under the sys.stdin section[0]: > "These streams are regular text files like those returned by the open() > function" I read that to mean that the streams are file-like objects (or TextIOWrappers) without using that term,

[issue45653] Freeze the encodings module.

2021-10-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 30.10.2021 17:54, Filipe Laíns wrote: > > I just tested partially freezing the package, and it seems to working fine :) FWIW: I think it's best not bother and simply freeze the whole thing. It's mostly char mappings which compress well and there's a

[issue45610] Cookies with longer paths are listed before cookies with shorter paths.

2021-10-30 Thread Éric Araujo
Éric Araujo added the comment: I don’t know that longer is the right think to look at here, but rather more specific. Unless I’m mistaken, a cookie for test.com is not read on demo.test.com; it would need to be for .test.com to be read (and in that case the specificity rules in the spec

[issue45598] setup.py grep_headers_for() is broken by design

2021-10-30 Thread Éric Araujo
Éric Araujo added the comment: We could look in distro patch trackers to see they patch CPython’s setup.py to evaluate the impact of removing this function. -- nosy: +eric.araujo ___ Python tracker

[issue45588] cached_method similar to cached_property to cache with classes

2021-10-30 Thread Éric Araujo
Éric Araujo added the comment: The feature proposed here is not clear to me. Is it about caching the method object on the instance to optimize the creation of the bound method, as the name suggests? Or is it about caching the result of calling the method, which is consistent with the

[issue45679] typing.Literal[True] is implicitly converted to typing.Literal[1]

2021-10-30 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +27601 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29333 ___ Python tracker ___

[issue45679] typing.Literal[True] is implicitly converted to typing.Literal[1]

2021-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree. lru_cache(typed=True) itself should not look into iterable internals. It would be not only slow, but a change of semantic. The simplest way to solve this issue is to remove caching of __getitem__(). The more sophisticated way is to move caching

[issue45679] typing.Literal[True] is implicitly converted to typing.Literal[1]

2021-10-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: I see several ways of solving this: 1. Make `lru_cache(typed=True)` to look into iterable internals. This might be slow. And very slow for large iterables. Maybe even infinite for infinite ones 2. Adapt `Literal` / possibly other types to be treated

[issue45679] typing.Literal[True] is implicitly converted to typing.Literal[1]

2021-10-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: This happens to all `lru_cache` calls, where we deal with container types. Example: ``` from functools import lru_cache @lru_cache(typed=True) def test(arg): return str(arg) print(test((1, 'a'))) # (1, 'a') print(test((True, 'a'))) # (1, 'a') ```

[issue45578] Missing tests for the dis module

2021-10-30 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Yes, it is that's why I added the clarity "It looks like it *is* actually" above -- ___ Python tracker ___

[issue45578] Missing tests for the dis module

2021-10-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: Looks like `findlabels` is documented: https://docs.python.org/3/library/dis.html#dis.findlabels -- ___ Python tracker ___

[issue45578] Missing tests for the dis module

2021-10-30 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +27600 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29332 ___ Python tracker ___

[issue45653] Freeze the encodings module.

2021-10-30 Thread Filipe Laíns
Change by Filipe Laíns : -- keywords: +patch pull_requests: +27599 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29331 ___ Python tracker

[issue45653] Freeze the encodings module.

2021-10-30 Thread Filipe Laíns
Filipe Laíns added the comment: I just tested partially freezing the package, and it seems to working fine :) -- ___ Python tracker ___

[issue45679] typing.Literal[True] is implicitly converted to typing.Literal[1]

2021-10-30 Thread Van Burgerberg
New submission from Van Burgerberg : When you create `Literal[1]` annotation and then create `Literal[True]` annotation, in the second case you will actually get `Literal[1]` instead. This is happening because `typing` performs caching of the outcome of parameterizing generics and

[issue45578] Missing tests for the dis module

2021-10-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: I would like to work on it! :) Going to send a PR today. -- nosy: +sobolevn ___ Python tracker ___

[issue45272] 'os.path' should not be a frozen module

2021-10-30 Thread Filipe Laíns
Change by Filipe Laíns : -- keywords: +patch pull_requests: +27598 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29329 ___ Python tracker

[issue45669] An 'ascii_alphanumerics' variable is missing in the 'strings' lib

2021-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I was also against this feature. My reasons: 1. There will be not much benefit. ascii_alphanumerics is too long, so there is no much saving of typing. There is larger chance of typo. You will be not able to use it for several years, until support of

[issue45669] An 'ascii_alphanumerics' variable is missing in the 'strings' lib

2021-10-30 Thread Dong-hee Na
Dong-hee Na added the comment: @skip.montanaro I agree with your concern, if authors want to use this constant, they need to use the mentioned workaround to import it. But we already have cases that add such constants if we considered them as useful constants. So I think that the main

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

2021-10-30 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: -yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32453] shutil.rmtree can have O(n^2) performance on large dirs

2021-10-30 Thread Niklas Hambüchen
Niklas Hambüchen added the comment: A small update / summary so far: >From here this developed into coreutils discussion: #29921 O(n^2) performance of rm -r https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29921 and finally a `linux-fsdevel` discussion: O(n^2) deletion performance

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

2021-10-30 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45678] `functools.singledispatchmethod` is missing tests

2021-10-30 Thread Alex Waygood
Change by Alex Waygood : -- components: +Tests -Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45678] `functools.singledispatchmethod` is missing tests

2021-10-30 Thread Alex Waygood
Change by Alex Waygood : -- keywords: +patch pull_requests: +27597 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29328 ___ Python tracker ___

[issue45678] `functools.singledispatchmethod` is missing tests

2021-10-30 Thread Alex Waygood
New submission from Alex Waygood : `test_functools` includes a test to check that `functools.singledispatch` correctly wraps the attributes of the target function. However, there is no equivalent test for `functools.singledispatchmethod`. There should be, as this is done separately in the

[issue45669] An 'ascii_alphanumerics' variable is missing in the 'strings' lib

2021-10-30 Thread Skip Montanaro
Skip Montanaro added the comment: I'll be the wet blanket here and say -1. This doesn't seem at all necessary. 81 occurrences in ~3.5k PyPI packages? That's a hardly overwhelming endorsement. To top it off, since this can't be backported to 3.10 and earlier, it creates a needless (trivial)

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2021-10-30 Thread Stijn Hoop
Stijn Hoop added the comment: I hereby put my patch in the public domain and/or under any desired copyright license as required by the Python project to accept it. Regards, Stijn Hoop On Fri, 22 Oct 2021 21:03:26 + Richard van den Berg wrote: > Richard van den Berg added > the

[issue45671] str(CancelledError()) is empty

2021-10-30 Thread lilydjwg
lilydjwg added the comment: OK, I see. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2021-10-30 Thread Eryk Sun
Eryk Sun added the comment: Here's an example test that calls WinAPI GetConsoleWindow() and IsWindowVisble() in a child process. if mswindows: try: import ctypes except ImportError: ctypes = None # added in Win32ProcessTestCase def

[issue45671] str(CancelledError()) is empty

2021-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Then you would get >>> raise asyncio.CancelledError Traceback (most recent call last): File "", line 1, in asyncio.exceptions.CancelledError: CancelledError instead of >>> raise asyncio.CancelledError Traceback (most recent call last): File "", line