[issue44264] Add descriptive error message when environment variable not detected

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: > os.environ defines the __delitem__ method to call C unsetenv(). Thus `del > os.environ[varname]` does unset the environment variable, at least at the > level of the C runtime. For the current process, yes. But it's not that what the user needs to do to

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-01-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: re: slow tests in the first half of the list. the same total amount of time is going to be spent regardless. In our test suite on a modern fast 16 thread system, all but 10 tests are completed in parallel within the first 30 seconds. The remaining ~10

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-29 Thread Nikita Sobolev
Nikita Sobolev added the comment: ## 1. What is documented? The docs makes this even more weird! > @typing.no_type_check > Decorator to indicate that annotations are not type hints. > This works as class or function decorator. With a class, it applies > recursively to all methods defined in

[issue46578] cant DEBUG os.spawnv()

2022-01-29 Thread michaellongge
New submission from michaellongge : When i try to execute --link.exe *.obj-- on windows 11, i get one error LIB : fatal error LNK1181: cannot open input file 'Files.obj' It looks like a space path error so i run [os.spawnv(link.exe)] alone try to find out where made this error. But i cant DEBUG

[issue46574] itertools.count should work with non-number types

2022-01-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the suggestion but I'm going to decline. * The need for this is very low. * It's easy to roll your own. * The code for `count('', 'a')` and `count((), (1,))` isn't intelligible. * Without special casing, the code for `count('', 'a')` and

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-01-29 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue46576 and https://github.com/python/cpython/pull/31015 -- nosy: +xtreak ___ Python tracker

[issue44264] Add descriptive error message when environment variable not detected

2022-01-29 Thread Eryk Sun
Eryk Sun added the comment: This is just a point of clarification. > my del did not change the environment variable os.environ defines the __delitem__ method to call C unsetenv(). Thus `del os.environ[varname]` does unset the environment variable, at least at the level of the C runtime.

[issue46576] test_peg_generator is extremely slow

2022-01-29 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also issue46524 for a similar discussion. -- nosy: +xtreak ___ Python tracker ___

[issue46577] Hostname spoofing via backslashes in URL

2022-01-29 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This seems to be similar to https://bugs.python.org/issue35748 -- nosy: +xtreak ___ Python tracker ___

[issue46521] codeop._maybe_compile passes code with error + triple quotes

2022-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: With my fix to the PR: >>> a b ''' SyntaxError: unterminated triple-quoted string literal (detected at line 1) >>> a ''' ... The message is off, and can be left for another issue (or not), but the behavior is correct. With the hack removed, all the tests

[issue46558] Quadratic time internal base conversions

2022-01-29 Thread Tim Peters
Tim Peters added the comment: Addendum: the "native" time (for built in str(a)) in the msg above turned out to be over 3 hours and 50 minutes. -- ___ Python tracker ___

[issue3451] Asymptotically faster divmod and str(long)

2022-01-29 Thread Tim Peters
Tim Peters added the comment: Ha! This will never die. More discussion in bpo-46558. Ya, I already closed it, but don't want to. I opened it to begin with to record an int->str method that doesn't use division, so it didn't really belong on this report. What if we _didn't_ convert these

[issue46558] Quadratic time internal base conversions

2022-01-29 Thread Tim Peters
Tim Peters added the comment: The test case here is a = (1 << 1) - 1, a solid string of 100 million 1 bits. The goal is to convert to a decimal string. Methods: native: str(a) numeral: the Python numeral() function from bpo-3451's div.py after adapting to use the Python

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-29 Thread Keelung Yang
Keelung Yang added the comment: Without append kwarg, users need two lines to append. It's bad to both readability and writability. Library developers should focus on bath language and library's design targets, but how frequently used. And as all discussed here, at least one applications

[issue46577] Hostname spoofing via backslashes in URL

2022-01-29 Thread Dashmeet Kaur Ajmani
New submission from Dashmeet Kaur Ajmani : A URL's hostname can be spoofed by using a backslash (\) character followed by an at (@) character. If the hostname is used in security decisions, the decision may be incorrect. Impact: Depending on library usage and attacker intent, impacts may

[issue46400] Please update bundled libexpat to 2.4.4 with security fixes

2022-01-29 Thread sping
sping added the comment: 2.4.4 with more security fixes has been released, adjusting the ticket to be about updating to 2.4.4 now. -- title: Please update bundled libexpat to 2.4.3 with security fixes -> Please update bundled libexpat to 2.4.4 with security fixes

[issue44264] Add descriptive error message when environment variable not detected

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: I vote to reject this proposal. Unless another core dev disagrees, I will close this issue. -- status: pending -> open ___ Python tracker ___

[issue44264] Add descriptive error message when environment variable not detected

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: > if a user of a Python program were to come across it, it may not indicate > what they needed to do to avoid the crash. The user of a program should not see this exception. The program should translate it to an error that would make sense to the user.

[issue44264] Add descriptive error message when environment variable not detected

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: It's not necessarily true that the environment variable is not set just because the key is not in os.environ. In this example my del did not change the environment variable: >>> import os >>> os.environ['TMPDIR']

[issue46521] codeop._maybe_compile passes code with error + triple quotes

2022-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you for the PR. As I wrote on my preliminary review, I see this likely 1 failure that might may be in the test fixture. Will test and debug later. -- ___ Python tracker

[issue30210] No Documentation on tkinter dnd module

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: Doc was added under issue25237: https://docs.python.org/3/library/tkinter.dnd.html -- nosy: +iritkatriel resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Add doc for tkinter commondialog.Dialog and

[issue46572] Unicode identifiers not necessarily unique

2022-01-29 Thread Diego Argueta
Diego Argueta added the comment: I did read PEP-3131 before posting this but I still thought the behavior was counterintuitive. -- ___ Python tracker ___

[issue43359] Dead assignment in Py_UniversalNewlineFgets

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: That function has been edited in the meantime and this line is no longer there. -- nosy: +iritkatriel resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue43361] Dead assignment in idna_converter function

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: I don't think removing this will make the code easier to read. It's an exercise to verify that all the different if-else branches set this variable. -- nosy: +iritkatriel ___ Python tracker

[issue29172] blake2: Use lowest-common denominator signature of #pragma pack

2022-01-29 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> BETA report: Python-3.6 build messages to stderr: AIX and "not GCC" ___ Python tracker

[issue46574] itertools.count should work with non-number types

2022-01-29 Thread Vedran Čačić
Vedran Čačić added the comment: At one moment, I had a need for itertools.count(datetime.date.today(), datetime.timedelta(days=1)) Of course, it was no problem to write it myself, but still, it would be incredibly neat if it simply worked. -- nosy: +veky

[issue41416] Restore default implementation of __ne__ in mixins Set and Mapping

2022-01-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +29195 pull_request: https://github.com/python/cpython/pull/21628 ___ Python tracker ___

[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2022-01-29 Thread ntrischi
ntrischi added the comment: Compiling Python3.8.9 from source on Windows 10 with VS2019. Running PCBuild\build.bat, I'm getting the following issue: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winnt.h(253): error RC2188:

[issue46548] macOS installers cannot be signed on Monterey

2022-01-29 Thread Ned Deily
Ned Deily added the comment: The short answer to the original issue: at the moment, build-installer.py continues to create python.org installers in the legacy bundle installer format that is no longer supported by more modern versions of macOS and there are additional steps that are used to

[issue46576] test_peg_generator is extremely slow

2022-01-29 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +29194 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31015 ___ Python tracker

[issue46548] macOS installers cannot be signed on Monterey

2022-01-29 Thread Yair Frid
Yair Frid added the comment: Apple builds python on their own, so probably you wont have any luck finding the build scripts -- nosy: +Fongeme ___ Python tracker ___

[issue46576] test_peg_generator is extremely slow

2022-01-29 Thread Gregory P. Smith
New submission from Gregory P. Smith : test_peg_generator is an extremely slow test. This bug tracks any changes to reduce its runtime and test latency. -- components: Tests messages: 412104 nosy: gregory.p.smith priority: normal severity: normal status: open title:

[issue46575] One-off errors in hashlib.scrypt error messages

2022-01-29 Thread Ron Kaminsky
New submission from Ron Kaminsky : There are one-off errors in upper bounds given in the error messages for hashlib.scrypt(...). MAX_INT *is* accepted (and at least for maxmem, works). See

[issue29688] Add support for Path.absolute()

2022-01-29 Thread Eryk Sun
Eryk Sun added the comment: In Windows, paths that are relative to the current directory on a drive aren't resolved. The following should be resolved by the current code: >>> os.chdir('C:/Temp') >>> pathlib.Path('C:').absolute() WindowsPath('C:') But _from_parts() has bugs with

[issue38682] struct timeval is not declared

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: timval is defined in sys/time.h. This would be something to do with your setup, but you did not provide any information about your system and the steps you took to get to this point so it's hard to know what happened. In any case, 3.7 is no longer maintained

[issue39339] ProcessPoolExecutor() Exception in thread QueueManagerThread

2022-01-29 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> ProcessPoolExecutor(max_workers=64) crashes on Windows ___ Python tracker

[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: > For my information, is there a kind of committee or someone taking these > kinds of decisions or at least expressing rules as to the spirit in which > they should be made? You can bring this up on the python-ideas mailing list if you want to pull in

[issue29688] Add support for Path.absolute()

2022-01-29 Thread Barney Gale
Barney Gale added the comment: Now that GH 26153 is merged, I think this bug can be resolved. -- ___ Python tracker ___ ___

[issue39711] SIGBUS and core dumped during tests of 3.8.1

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: Looks like you ran out of disk space: OSError: [Errno 12] Not enough space In any case, 3.8 is no longer maintained, so I am closing this as out of date. Please create a new issue if you are having problems with a current version (>= 3.9). -- nosy:

[issue44031] test_embed and test_tabnanny fails if the current directory is non-ASCII

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: test_embed does not fail anymore. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44031] test_embed and test_tabnanny fails if the current directory is non-ASCII

2022-01-29 Thread Irit Katriel
Change by Irit Katriel : -- type: compile error -> behavior versions: +Python 3.10, Python 3.11 -Python 3.8 ___ Python tracker ___

[issue44031] test_embed and test_tabnanny fails if the current directory is non-ASCII

2022-01-29 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch nosy: +iritkatriel nosy_count: 4.0 -> 5.0 pull_requests: +29193 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31014 ___ Python tracker

[issue46572] Unicode identifiers not necessarily unique

2022-01-29 Thread Eryk Sun
Eryk Sun added the comment: Please read "Identifiers and keywords" [1] in the documentation. For example: >>> import unicodedata as ud >>> ud.normalize('NFKC', '햇햆햗') == 'bar' True >>> c = '\N{CYRILLIC SMALL LETTER A}' >>> ud.name(ud.normalize('NFKC', c)) 'CYRILLIC

[issue46574] itertools.count should work with non-number types

2022-01-29 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +29192 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31013 ___ Python tracker

[issue46574] itertools.count should work with non-number types

2022-01-29 Thread Mital Ashok
New submission from Mital Ashok : There's no reason that `count('', 'a')` for `'', 'a', 'aa', ...` or `count((), (1,))` for `(), (1,), (1, 1), ...` shouldn't work. count(a, b) should be equivalent to accumulate(chain((a,), repeat(b))) The docs don't strongly suggest that it won't work (it

[issue12010] Compile fails when sizeof(wchar_t) == 1

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: Closing after over 10 years of no activity. (The discussion from back then seems to be leaning towards wont fix.) -- nosy: +iritkatriel resolution: -> out of date stage: needs patch -> resolved status: open -> closed

[issue46573] Python modules such as pyglet or pygame crash Python when tkinter message boxes are opened on MacOS.

2022-01-29 Thread Remy Fouquette
New submission from Remy Fouquette : The same problem doesn't exist on Windows. -- components: macOS files: issue.py messages: 412093 nosy: ned.deily, remyrfouquette, ronaldoussoren priority: normal severity: normal status: open title: Python modules such as pyglet or pygame crash

[issue27101] Compilation of python (modules) for foreign target platform problem.

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: 2.7 and 3.5 are no longer maintained. Please create a new issue if you are still having this problem with a current version (>= 3.9). -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed

[issue46521] codeop._maybe_compile passes code with error + triple quotes

2022-01-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: If we want to go with this approach, I am going to need help to fix test_idle as I have no idea why is failing if test_codeop passes. -- ___ Python tracker

[issue46521] codeop._maybe_compile passes code with error + triple quotes

2022-01-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ugh, the approach to do that breaks super heavily test_idle :( -- ___ Python tracker ___

[issue46520] ast.unparse produces bad code for identifiers that become keywords

2022-01-29 Thread Kodiologist
Change by Kodiologist : -- keywords: +patch pull_requests: +29191 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31012 ___ Python tracker ___

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I'm reverting PR30855 for the time being given our buildbot policy. -- ___ Python tracker ___

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg412088 ___ Python tracker ___ ___ Python-bugs-list

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I'm reverting #30855 for the time being given our buildbot policy. -- ___ Python tracker ___

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +29190 pull_request: https://github.com/python/cpython/pull/31011 ___ Python tracker ___

[issue46555] Unicode-mangled names refer inconsistently to constants

2022-01-29 Thread jack1142
Change by jack1142 : -- nosy: +jack1142 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46521] codeop._maybe_compile passes code with error + triple quotes

2022-01-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +29189 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31010 ___ Python tracker

[issue46521] codeop._maybe_compile passes code with error + triple quotes

2022-01-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >> Pablo, is there any possibility that the internal REPL parser could be >> wrapped, exposed to Python, and called with fake stdin/out/err objects? I would really advise against this. Unfortunately, the state of affairs is that the REPL is somehow

[issue46572] Unicode identifiers not necessarily unique

2022-01-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This seems coherent with https://www.python.org/dev/peps/pep-3131/ to me. The parser ensures all identifiers are converted into the normal form NFKC while parsing; comparison of identifiers is based on NFKC. --

[issue46570] Windows support for OpenSSL 3.0

2022-01-29 Thread Christian Heimes
Christian Heimes added the comment: OpenSSL 3.0 support is still experimental and incomplete. 3.10 is definitely out of scope. 3.11 might be feasible if somebody puts in the work. -- assignee: christian.heimes -> steve.dower ___ Python tracker

[issue46572] Unicode identifiers not necessarily unique

2022-01-29 Thread Diego Argueta
New submission from Diego Argueta : The way Python 3 handles identifiers containing mathematical characters appears to be broken. I didn't test the entire range of U+1D400 through U+1D59F but I spot-checked them and the bug manifests itself there: Python 3.9.7 (default, Sep 10 2021,

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: @no_type_check (introduced by PEP 484) is intended for static checkers, to signal to them that they shouldn't check the given function or class. I don't think PEP 484 specifies its runtime effect -- arguably get_type_hints() could just ignore it. Or raise

[issue46569] final note on StrEnum documentation incorrectly refers to int.__format__ instead of str.__format__

2022-01-29 Thread Ethan Furman
Ethan Furman added the comment: Good catch, thank you both. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46568] non awaited coroutines on a IsolatedAsyncioTestCase results on a RuntimeWarning

2022-01-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: You are welcome! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46497] IDLE macOS shortcut ctrl+S doesn’t work for show completions

2022-01-29 Thread David Contreras
David Contreras added the comment: I disabled the default ^space in macOS settings>Keyboard>Shortcuts>Input Sources>Select the Previous input source (^space) After doing that ^space works on IDLE, nonetheless the menu shows ^S which is not ^space. -- Added file:

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-29 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Let's not jump into deprecating it. I think (2) makes the most sense. If we can get that working reliably (using __qualname__ I assume), it would be my preference; otherwise we should do (1). This problem can also affect function objects, right? `class B:

[issue46568] non awaited coroutines on a IsolatedAsyncioTestCase results on a RuntimeWarning

2022-01-29 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46520] ast.unparse produces bad code for identifiers that become keywords

2022-01-29 Thread Kodiologist
Kodiologist added the comment: (Hilariously, I couldn't post this comment on bugs.python.org due to some kind of Unicode bug ("Edit Error: 'utf8' codec can't decode bytes in position 208-210: invalid continuation byte"), so I've rendered "\U0001D555\U0001D556\U0001D557" as "DEF" in the

[issue46570] Windows support for OpenSSL 3.0

2022-01-29 Thread Zachary Ware
Change by Zachary Ware : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> needs patch type: compile error -> enhancement versions: -Python 3.10 ___ Python tracker

[issue28970] ctypes.from_buffer counterpart to actively remove the mapping

2022-01-29 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-29 Thread Alex Waygood
Alex Waygood added the comment: ...Option 3). Deprecate @no_type_check? Maybe we should gather some stats on how many people are using @no_type_check? My feeling is that it's never achieved widespread adoption, so maybe it's just not that useful a thing to have in the stdlib. Anyway, the

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-29 Thread Nikita Sobolev
Change by Nikita Sobolev : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-29 Thread Nikita Sobolev
New submission from Nikita Sobolev : I was working on improving coverage and test quality of `typing.py`, when I saw that `@no_type_check` is quite strange. Let's dive into this! ## Everything is correct We will start with a basic example, that illustrates that everything works fine: ```

[issue46570] Windows support for OpenSSL 3.0

2022-01-29 Thread Jay Lee
New submission from Jay Lee : Steps to reproduce: 1) Compile OpenSSL 3.0 on Windows. 2) use get_externals.bat to download Python external requirements on Windows. 3) Overwrite OpenSSL 1.1.1m in externals with your OpenSSL 3.0 build. Expected behavior: Python will build against OpenSSL 3.0

[issue41711] Socker send method throws a timeout exception

2022-01-29 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45913] readline + GTK + Pytest Seg Fault with Python 3.7 and 3.10 on CI

2022-01-29 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28982] multiprocessing.Queue.get(block=True, timeout=0) always raises queue.Empty

2022-01-29 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46555] Unicode-mangled names refer inconsistently to constants

2022-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: True is a keyword which is compiled to expression whose value is True, 핋핣핦핖 is an identifier which refers to the builtin variable "True" which has a value True by default. You can change the value of a builtin variable, but the value of expression True is

[issue46555] Unicode-mangled names refer inconsistently to constants

2022-01-29 Thread Carl Friedrich Bolz-Tereick
Carl Friedrich Bolz-Tereick added the comment: hah, this is "great": >>> 핋핣핦핖 = 1 >>> globals() {'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': , 'True': 1} The problem is that the lexer assumes that

[issue43583] make test failures, 2 tests failed: test_embed test_tabnanny

2022-01-29 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_embed and test_tabnanny fails if the current directory is non-ASCII ___ Python tracker

[issue46569] final note on StrEnum documentation incorrectly refers to int.__format__ instead of str.__format__

2022-01-29 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +29188 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31007 ___ Python tracker

[issue46458] Optimise try-except code generation for the happy path

2022-01-29 Thread Irit Katriel
Irit Katriel added the comment: Re next steps, see https://github.com/faster-cpython/ideas/issues/226#issuecomment-1024875216. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46568] non awaited coroutines on a IsolatedAsyncioTestCase results on a RuntimeWarning

2022-01-29 Thread bluecarrot
bluecarrot added the comment: You are absolutely correct. Thank you very much! -- ___ Python tracker ___ ___ Python-bugs-list

[issue46569] final note on StrEnum documentation incorrectly refers to int.__format__ instead of str.__format__

2022-01-29 Thread Alex Waygood
Change by Alex Waygood : -- assignee: docs@python -> ethan.furman nosy: +ethan.furman stage: -> needs patch type: -> behavior ___ Python tracker ___

[issue46569] final note on StrEnum documentation incorrectly refers to int.__format__ instead of str.__format__

2022-01-29 Thread Dutcho
New submission from Dutcho : https://docs.python.org/3.11/library/enum.html#enum.StrEnum contains: Note __str__() is str.__str__() to better support the replacement of existing constants use-case. __format__() is likewise int.__format__() for that same reason. This should be (change

[issue46568] non awaited coroutines on a IsolatedAsyncioTestCase results on a RuntimeWarning

2022-01-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: Your version works but can be simplified. Just use await writer.drain() writer.write(data) without grabbing the drainer early. The purpose of the .drain() method is to write pausing if the write buffer side is greater than the high watermark.

[issue46565] Delete module-level loop variables when no longer needed

2022-01-29 Thread Alex Waygood
Alex Waygood added the comment: I agree that the typeshed issue is less important than the output of dir() and help(). I also agree that we shouldn't make a fetish of typing. However, I see the typeshed issue less as an issue specific to typing, and more as an example that illustrates a

[issue46568] non awaited coroutines on a IsolatedAsyncioTestCase results on a RuntimeWarning

2022-01-29 Thread bluecarrot
bluecarrot added the comment: Hi Andrew, thank you for your answer. I am experimenting with coroutines, as I am pretty new to them. My idea was to let the writer drain while other packets where read, and thus I am waiting for the writer_drain right before starting writer.write again. Isn't

[issue46489] webbrowser crashes Ubuntu kernel

2022-01-29 Thread Danylo
Danylo added the comment: Never mind. I had a crash today with no Python involved. At least, no webbrowser lib was running. Although Python webbrowser lib surely triggers the issue I have with my system. Need to find the origin somewhere else. Please report back if someone else experiences

[issue46568] non awaited coroutines on a IsolatedAsyncioTestCase results on a RuntimeWarning

2022-01-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: Your code has at least one concurrency problem. Let's look back at forward_stream() function: async def forward_stream(reader: StreamReader, writer: StreamWriter, event: asyncio.Event, source: str): writer_drain = writer.drain() # <--- awaitable is

[issue46568] non awaited coroutines on a IsolatedAsyncioTestCase results on a RuntimeWarning

2022-01-29 Thread bluecarrot
bluecarrot added the comment: Seems that, should I add an "await asyncio.sleep(1)" in asyncTearDown, so getting class TestConnections(IsolatedAsyncioTestCase): async def asyncSetUp(self) -> None: self.proxy = asyncio.create_task(EnergyAgentProxy(self.proxy_port,

[issue46568] non awaited coroutines on a IsolatedAsyncioTestCase results on a RuntimeWarning

2022-01-29 Thread bluecarrot
New submission from bluecarrot : I am unittesting a tcp proxy module using coroutines. This is the coroutine I am using to do the forwarding, allowing the writer stream to drain while the rest of the coroutines are proceeding: async def forward_stream(reader: StreamReader, writer:

[issue46565] Delete module-level loop variables when no longer needed

2022-01-29 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thanks for the better wording, Terry! > Leaving loop variables available is an intended feature of python. Just to be clear: it sure is! But, sometimes we don't want to polute a global namespace with this variable. A common practice across CPython's source

[issue46512] filecmp.cmpfiles w/ absolute path names

2022-01-29 Thread bers
bers added the comment: > Did your example work with relative paths? Yes, it does. Just append the following to my example code: # actually diff the files - correctly! files = [f.relative_to(dir_a) for f in dir_a.glob("*")] (_, different, _) = filecmp.cmpfiles(dir_a, dir_b,