[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Alex Zaslavskis
Alex Zaslavskis added the comment: The quick research on web gived me that C/C++ developers will just get the build version and compare it with predefined list. See more there: https://docs.microsoft.com/answers/questions/672988/c-detect-windows-build.html ср, 26 янв. 2022 г., 05:05 Eryk Sun :

[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Alex Zaslavskis
Alex Zaslavskis added the comment: The quick research on web gived me that C/C++ developers will just get the build version and compare it with predefined list. See more there: https://docs.microsoft.com/answers/questions/672988/c-detect-windows-build.html -- ___

[issue35829] datetime: parse "Z" timezone suffix in fromisoformat()

2022-01-26 Thread Matt Wozniski
Matt Wozniski added the comment: I agree with Brett. Adding `allow_z` (or perhaps `compact` or `use_utc_designator` if we're bikeshedding) as an optional keyword only argument to `.isoformat()` would allow us to keep the explanation that what `.fromisoformat()` can parse is exactly what `.is

[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 26.01.2022 01:29, Eryk Sun wrote: > > Eryk Sun added the comment: > >> Bit wmic seems nice solution. >> Is still working for windows lower than 11? > > wmic.exe is still included in Windows 10 and 11, but it's officially > deprecated [1], which mean

[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread Nikita Sobolev
New submission from Nikita Sobolev : There are several important cases that are missing from current `repr()` tests of `typing.Union` and `typing.Optional`: 1. This condition is not covered at all: `if args[0] is type(None):` https://github.com/python/cpython/blob/7cf285d82ec722d4225297366013e

[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-26 Thread Karolina Surma
Change by Karolina Surma : -- nosy: +ksurma nosy_count: 4.0 -> 5.0 pull_requests: +29089 pull_request: https://github.com/python/cpython/pull/30910 ___ Python tracker ___ _

[issue46529] Improve test coverage of `Union` and `Optional` repr()

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

[issue24398] Update test_capi to use test.support.script_helper

2022-01-26 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 2.0 -> 3.0 pull_requests: +29091 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30912 ___ Python tracker

[issue33205] GROWTH_RATE prevents dict shrinking

2022-01-26 Thread Inada Naoki
Inada Naoki added the comment: We do not have *fill* since Python 3.6. There is a `dk_nentries` instead. But when `insertion_resize()` is called, `dk_nentries` is equal to `USABLE_FRACTION(dk_size)` (dk_size is `1 << dk_log2_size` for now). So it is different from *fill* in the old dict. I c

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-26 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now here's how `test_get_clock_info` looks like: ``` def test_get_clock_info(self): clocks = ['monotonic', 'perf_counter', 'process_time', 'time'] for name in clocks: info = time.get_clock_info(name) #self.asse

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

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

[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread miss-islington
miss-islington added the comment: New changeset 6e5a193816e1bdf11f5fb78d620995fd6987ccf8 by Christian Heimes in branch 'main': bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) https://github.com/python/cpython/commit/6e5a193816e1bdf11f5fb78d620995fd6987ccf8 -- nos

[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Petr Viktorin
Petr Viktorin added the comment: Yeah, that looks like it's for some long-forgotten compiler that didn't implement `signed char` at all. 1994 was a fun time, apparently. -- nosy: -miss-islington ___ Python tracker

[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +29093 pull_request: https://github.com/python/cpython/pull/30914 ___ Python tracker ___

[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +29094 pull_request: https://github.com/python/cpython/pull/30915 ___ Python tracker ___

[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now there are two places where `sys.exc_info()` calls are not required anymore: 1. https://github.com/python/cpython/blob/6e5a193816e1bdf11f5fb78d620995fd6987ccf8/Lib/doctest.py#L1352-L1353 2. https://github.com/python/cpython/blob/6e5a193816e1bdf11f

[issue46531] Simplify exception handling in `doctest.py`

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

[issue46532] Improve effeciency of PRECALL/CALL instructions

2022-01-26 Thread Mark Shannon
New submission from Mark Shannon : The PRECALL/CALL bytecode pair for calls is new (still in review at time of writing) and is not as efficient as it could be. Some possible improvements are: Transfer refcount of func when making a frame. NULL call_shape.kwnames after use instead of in PRECA

[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Irit Katriel
Irit Katriel added the comment: I don't think this is worth doing in a module where we can't completely get rid of the exc_info triplet. -- ___ Python tracker ___ ___

[issue46532] Improve effeciency of PRECALL/CALL instructions

2022-01-26 Thread Mark Shannon
Mark Shannon added the comment: Possibly consider replacing the specializations for `str(arg)` and `tuple(arg)` with a more general bytecode that can be used for other objects as well. -- ___ Python tracker ___

[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Irit Katriel
Irit Katriel added the comment: In other words, I don't see why it's an improvement to replace exception = sys.exc_info() by exception = type(exc), exc, exc.__traceback__ when sys.exc_info() does exactly what your inlined version does. -- _

[issue46533] Specialize for staticmethods and classmethods

2022-01-26 Thread Mark Shannon
New submission from Mark Shannon : Calls of the form `x.m(args)` where either `x = X` or x = X()` and X is a class, and `m` is a classmethod or staticmethod are not currently specialized. Typically the `x.m()` will translate to: LOAD_FAST x LOAD_METHOD "m" PRECALL_METHOD 0 CALL 0 Since class

[issue45578] Missing tests for the dis module

2022-01-26 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 84f093918a4be663775afe2933f4be86f72fe495 by Nikita Sobolev in branch 'main': bpo-45578: add a test case for `dis.findlabels` (GH-30058) https://github.com/python/cpython/commit/84f093918a4be663775afe2933f4be86f72fe495 -- nosy: +corona10

[issue43698] Use syntactically correct examples on abc package page

2022-01-26 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset b9d8980d89bfaa4bf16d60f0488adcc9d2cbf5ef by Nikita Sobolev in branch 'main': bpo-43698: do not use `...` as argument name in docs (GH-30502) https://github.com/python/cpython/commit/b9d8980d89bfaa4bf16d60f0488adcc9d2cbf5ef -- nosy: +coron

[issue43698] Use syntactically correct examples on abc package page

2022-01-26 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +29096 pull_request: https://github.com/python/cpython/pull/30917 ___ Python tracker _

[issue43698] Use syntactically correct examples on abc package page

2022-01-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +29097 pull_request: https://github.com/python/cpython/pull/30918 ___ Python tracker ___ __

[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Nikita Sobolev
Nikita Sobolev added the comment: Fair enough! The only improvement is that we don't call `sys.exc_info` twice here: https://github.com/python/cpython/blob/6e5a193816e1bdf11f5fb78d620995fd6987ccf8/Lib/doctest.py#L2641-L2644 But, I think it is a minor thing. Looks like I've misunderstood the

[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread Ken Jin
Ken Jin added the comment: New changeset d0c690b5f85c679de6059cf353fe0524e905530e by Nikita Sobolev in branch 'main': bpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911) https://github.com/python/cpython/commit/d0c690b5f85c679de6059cf353fe0524e905530e -- _

[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +29099 pull_request: https://github.com/python/cpython/pull/30920 ___ Python tracker ___ __

[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Irit Katriel
Irit Katriel added the comment: In the long term we will want to not have the triplet, but this is a process that will take a few python versions to complete (when 3.11 is the oldest supported version). And it is not going to be simple. In the meantime, where there is an advantage to removin

[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread miss-islington
miss-islington added the comment: New changeset c730342005edf67333c37b575b419e2fc67d232b by Miss Islington (bot) in branch '3.10': bpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911) https://github.com/python/cpython/commit/c730342005edf67333c37b575b419e2fc67d232b

[issue46533] Specialize for staticmethods and classmethods

2022-01-26 Thread Ken Jin
Ken Jin added the comment: Slightly off topic rambling: My own toy attempts at classmethod specialization suggested that it barely sped anything up. Most of the time went to creation of the new classmethod object. I'd imagine supporting Py_TPFLAGS_METHOD_DESCRIPTOR would speed things up, but

[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread miss-islington
miss-islington added the comment: New changeset 29eefcc9c688bc4097f2660de1fa846c5ea54735 by Miss Islington (bot) in branch '3.9': bpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911) https://github.com/python/cpython/commit/29eefcc9c688bc4097f2660de1fa846c5ea54735 -

[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: BaseEventLoop has _check_loop() method that is closed in debug mode only. UnixEventLoop doesn't call this method for unix-specific API. Adding the check to add_signal_handler()/remove_signal_handler() doesn't hurt, sure. But it doesn't help as the script is

[issue23556] [doc] Scope for raise without argument is different in Python 2 and 3

2022-01-26 Thread Kinshuk Dua
Kinshuk Dua added the comment: @iritkatriel I thought the PR won't be reviewed after being marked as stale that's why I closed it. I've reopened it and I'm interested in finishing it. -- nosy: +kinshukdua2 ___ Python tracker

[issue46534] Implementing PEP 673 (Self type)

2022-01-26 Thread Gobot1234
New submission from Gobot1234 : See [PEP 673](https://www.python.org/dev/peps/pep-0673) I'm planning to implement this in cpython some point today. -- components: Library (Lib) messages: 411736 nosy: Gobot1234, Jelle Zijlstra, gvanrossum, kj priority: normal severity: normal status: op

[issue46534] Implementing PEP 673 (Self type)

2022-01-26 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood, sobolevn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue46533] Specialize for staticmethods and classmethods

2022-01-26 Thread Mark Shannon
Mark Shannon added the comment: For classmethods, I expect the savings to come from not creating a bound-method and from better specialization of the following call. classmethod case: >>> class C: ... @classmethod ... def m(*args): ... pass ... >>> C.m > >>> C().m > So, wi

[issue46535] Possible bug: pdb causes exception

2022-01-26 Thread Stefan Ecklebe
New submission from Stefan Ecklebe : Consider a script called snippet.py, containing the lines -- import numpy as np import pandas as pd np.finfo(float) idx = pd.MultiIndex.from_tuples([(1, 2)]) np.finfo(float) print("Done") -

[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Christian Heimes
Christian Heimes added the comment: New changeset 04772cd6f164c1219c8c74d55626ba114f01aa96 by Christian Heimes in branch '3.9': [3.9] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30915) https://github.com/python/cpython/commit/04772cd6f164c1219c8c74d55626ba114f01aa

[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Christian Heimes
Christian Heimes added the comment: New changeset 4371fbd4328781496f5f2c6938c4d9a84049b187 by Christian Heimes in branch '3.10': [3.10] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30914) https://github.com/python/cpython/commit/4371fbd4328781496f5f2c6938c4d9a84049

[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Christian Heimes
Christian Heimes added the comment: The fix is in all stable branches. Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue46520] `ast.unparse` produces syntactically illegal code for identifiers that look like reserved words

2022-01-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Technically, this is a bug on the fact that it breaks the only guarantee of ast.unparse: > Unparse an ast.AST object and generate a string with code that would produce > an equivalent ast.AST object if parsed back with ast.parse(). But I am not really sure

[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-01-26 Thread Kumar Aditya
Change by Kumar Aditya : -- pull_requests: +29100 pull_request: https://github.com/python/cpython/pull/30921 ___ Python tracker ___

[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-01-26 Thread Nova
Change by Nova : -- versions: +Python 3.11, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-01-26 Thread Kumar Aditya
Kumar Aditya added the comment: Would it be possible to skip these tests when no changes to the parser related code are made to speed up tests? -- nosy: +kumaraditya303 ___ Python tracker _

[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-26 Thread Irit Katriel
Irit Katriel added the comment: Perhaps this is just a doc issue - state explicitly that a loop should be used only in one thread, and mention that this is checked in debug mode. -- ___ Python tracker _

[issue45578] Missing tests for the dis module

2022-01-26 Thread Tal Einat
Tal Einat added the comment: Thanks for your work on this Nikita! -- nosy: +taleinat resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue43698] Use syntactically correct examples on abc package page

2022-01-26 Thread miss-islington
miss-islington added the comment: New changeset a57ec7a4feaf24f470a9d1e5b1b3f2cb1b062af7 by Miss Islington (bot) in branch '3.10': bpo-43698: do not use `...` as argument name in docs (GH-30502) https://github.com/python/cpython/commit/a57ec7a4feaf24f470a9d1e5b1b3f2cb1b062af7 -- __

[issue43698] Use syntactically correct examples on abc package page

2022-01-26 Thread miss-islington
miss-islington added the comment: New changeset 49971b2d1890c15eeec2d83ea3e8d178f266c4f9 by Miss Islington (bot) in branch '3.9': bpo-43698: do not use `...` as argument name in docs (GH-30502) https://github.com/python/cpython/commit/49971b2d1890c15eeec2d83ea3e8d178f266c4f9 -- ___

[issue46536] Better for loop

2022-01-26 Thread The vivid & versatile channel
New submission from The vivid & versatile channel : for i in range(number), question in questions: ... instead of for i, question in zip(range(number), questions): ... -- messages: 411748 nosy: vividnversatile1 priority: normal severity: normal status: open title: Better for

[issue46536] Better for loop

2022-01-26 Thread Anonymous
Change by Anonymous : -- nosy: +me -vividnversatile1 resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue46505] Simplify exception handling code in py_compile

2022-01-26 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue46536] Better for loop

2022-01-26 Thread Eric V. Smith
Eric V. Smith added the comment: Thank you for the suggestion. This is unlikely to gain acceptance. zip is usable in places outside of for loops, whereas your suggestion appears to be only useful in for loops. In addition, I don't see a way to specify the "strict" option using your syntax.

[issue46537] zipfile crash on windows, detected during pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

2022-01-26 Thread Martin Forster
New submission from Martin Forster : pyth10n 3.10.1, windows x64 install of yodbc-4.0.32-cp310-cp310-win_amd64.whl crashes. pos: 74196 pos: 74226 pos: -3 ERROR: Could not install packages due to an OSError. Traceback (most recent call last): File "C:\git\idfunctiondb\venv\lib\site-packa

[issue46537] zipfile crash on windows, detected during pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

2022-01-26 Thread Christian Heimes
Christian Heimes added the comment: https://pypi.org/project/pyodbc/4.0.32/#files has no wheels for Python 3.10. Where did you get the binary wheels from? -- nosy: +christian.heimes type: crash -> behavior ___ Python tracker

[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: IMO making the assumption that "char" is signed or not in C code is bad. If Python has code like that, it must be signed to explicitly use one of these types: unsigned char or uint8_t, signed char or int8_t. Hopefully, Python can now use C99 since Python 3.

[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: In short, I did my checks on my side, and the merged change now LGTM. Thanks Christian for fixing it ;-) -- ___ Python tracker ___ _

[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue46537] zipfile crash on windows, detected during pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

2022-01-26 Thread Martin Forster
Martin Forster added the comment: it tried one built on my own, and the one from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyodbc -- ___ Python tracker ___

[issue46537] zipfile crash on windows, detected during pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

2022-01-26 Thread Martin Forster
Martin Forster added the comment: i opened a issue at pyodbc as well, https://github.com/mkleehammer/pyodbc/issues/1015 -- ___ Python tracker ___

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > Would it be possible to skip these tests when no changes to the parser > related code are made to speed up tests? Maybe, some CIs could export an environment variable which contains the list of modified files, and then each file would be able to decide if

[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread Ken Jin
Change by Ken Jin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Pytho

[issue46516] Use existing unbound_local_error label in DELETE_FAST opcode

2022-01-26 Thread Ken Jin
Ken Jin added the comment: Not sure why the merge message didn't appear here, but thanks! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker __

[issue46533] Specialize for staticmethods and classmethods

2022-01-26 Thread Ken Jin
Ken Jin added the comment: Ah woops, my bad, I mixed up the two concepts. Thanks for the thorough explanation here! -- ___ Python tracker ___

[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2022-01-26 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +29101 pull_request: https://github.com/python/cpython/pull/30922 ___ Python tracker ___ ___

[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2022-01-26 Thread Petr Viktorin
Petr Viktorin added the comment: Embarassingly, it seems it bust needs regen-importlib, at least for 3.10 -- ___ Python tracker ___ ___

[issue46527] enumerate no longer accepts iterable keyword argument

2022-01-26 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset ac0c6e128cb6553585af096c851c488b53a6c952 by Jelle Zijlstra in branch 'main': bpo-46527: allow calling enumerate(iterable=...) again (GH-30904) https://github.com/python/cpython/commit/ac0c6e128cb6553585af096c851c488b53a6c952 -- _

[issue46527] enumerate no longer accepts iterable keyword argument

2022-01-26 Thread Dong-hee Na
Dong-hee Na added the comment: So since no more regression is expected, I would like to propose merging the PR and once we need to change the implementation, we can revert Vectorcall anytime, Rollbacking Vectorcall will not raise any behavior regression so anytime we can rollback it. --

[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Eryk Sun
Eryk Sun added the comment: > AFAIK, the Win32_OperatingSystem caption is always ASCII. I think I was wrong here. The "Caption" field is localized, so the wmic.exe OEM encoded output to a pipe isn't reliable. The system OEM code page doesn't necessarily match the display/preferred language o

[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Steve Dower
Steve Dower added the comment: sys.getwindowsversion() is affected to Microsoft's minimal rebuilds of OS components causing core DLLs to have older versions than the release, and also to compatibility modes that may report earlier versions if API behaviour is being emulated. The best way fo

[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Steve Dower
Steve Dower added the comment: >> AFAIK, the Win32_OperatingSystem caption is always ASCII. > > I think I was wrong here. The "Caption" field is localized, so the wmic.exe > OEM encoded output to a pipe isn't reliable. Correct. And while "Windows" itself is never translated, the caption may

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2022-01-26 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29102 pull_request: https://github.com/python/cpython/pull/30923 ___ Python tracker ___ __

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
New submission from STINNER Victor : While working on the PEP 674 implementation, I noticed that PyDescr_NAME() and PyDescr_TYPE() macros are used as l-value by two projects: M2Crypto and mecab-python3. Both are code generated by SWIG. M2Crypto-0.38.0/src/SWIG/_m2crypto_wrap.c and mecab-pyth

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: pydescr_set_type.patch: Python patch to add PyDescr_SET_TYPE() and PyDescr_SET_NAME() functions. -- keywords: +patch Added file: https://bugs.python.org/file50585/pydescr_set_type.patch ___ Python tracker

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: pydescr_new.patch: Python patch adding the PyDescr_New() function. -- Added file: https://bugs.python.org/file50586/pydescr_new.patch ___ Python tracker

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: pythoncapi_compat_pydescr_new.patch: pythoncapi_compat patch adding PyDescr_New() function with tests. -- Added file: https://bugs.python.org/file50587/pythoncapi_compat_pydescr_new.patch ___ Python tracker

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: swig_pydescr_new.patch: SWIG patch adding PyDescr_New() and using it. -- Added file: https://bugs.python.org/file50588/swig_pydescr_new.patch ___ Python tracker

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
Change by STINNER Victor : Removed file: https://bugs.python.org/file50588/swig_pydescr_new.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50589/swig_pydescr_new.patch ___ Python tracker ___ ___ Python-bugs-list

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: Since making PyDescrObject opaque is not really worth it, I close this issue. I mean, it's worth it, but there are more important structures like PyObject, PyTypeObject or PyListObject. -- resolution: -> rejected stage: -> resolved status: open ->

[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2022-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 3eb3b4f270757f66c7fb6dcf5afa416ee1582a4b by Erlend Egeberg Aasland in branch 'main': bpo-43853: Expand test suite for SQLite UDF's (GH-27642) https://github.com/python/cpython/commit/3eb3b4f270757f66c7fb6dcf5afa416ee1582a4b -- nosy:

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: New changeset d4a85f104bf9d2e368f25c9a567eaaa2cc39a96a by Victor Stinner in branch 'main': bpo-35134: Add Include/cpython/descrobject.h (GH-30923) https://github.com/python/cpython/commit/d4a85f104bf9d2e368f25c9a567eaaa2cc39a96a --

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > The problem of the PyDescr_SET_NAME() and PyDescr_SET_Type() approach is that > SWIG code is outdated: it doesn't initialized the PyDescrObject.d_qualname > member added to Python 3.3 (bpo-13577, commit > 9d57481f043cb9b94bfc45c1ee041415d915cf8a). I check

[issue46538] [C API] Make the PyDescrObject structure opaque: PyDescr_NAME() and PyDescr_TYPE()

2022-01-26 Thread STINNER Victor
Change by STINNER Victor : -- title: [C API] Make the PyDescrObject structure opaque -> [C API] Make the PyDescrObject structure opaque: PyDescr_NAME() and PyDescr_TYPE() ___ Python tracker _

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > In the PyPI top 5000, I found two projects using PyDescr_TYPE() and > PyDescr_NAME() as l-value: M2Crypto and mecab-python3. In both cases, it was > code generated by SWIG I created bpo-46538 "[C API] Make the PyDescrObject structure opaque" to handle PyD

[issue46537] zipfile crash on windows, detected during pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

2022-01-26 Thread Martin Forster
Martin Forster added the comment: The wheel file was corrupt, due to git taking care of "CRLF/LF" conversion. Sorry for the fuss -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue46454] '0 -> /dev/null' is lost

2022-01-26 Thread Eryk Sun
Eryk Sun added the comment: > stdin is closed > os.open() is called and creates a new fd=0 > a call to os.dup2(fd, 0) is made but is a noop The dup2() silent noop case is a problem, but not the problem that's reported in msg43. The two examples for this issue are fd.py and fd2.py. In fd.

[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-01-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: Technically it should not provide the method according to the current design. get_write_buffer_limits() is not a part of public transports API, this method is defined by private class _FlowControlMixin only. WriteTransport requires only get_write_buffer_size(

[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-01-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: Forgot to write, after making the method public we can implement it in SSL transport easily. -- ___ Python tracker ___ _

[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-26 Thread epiphyte
epiphyte added the comment: For additional context, this was encountered when porting an application from threading to asyncio, and at the time we were still running the ioloop in its own thread as opposed to the mainthread. We no longer do that :D Updating the documentation to clarify that

[issue46520] `ast.unparse` produces syntactically illegal code for identifiers that look like reserved words

2022-01-26 Thread Kodiologist
Kodiologist added the comment: I've done very little work on CPython, but I do a lot of AST construction and call `ast.unparse` a lot in my work on Hylang, and I think this is a wart worth fixing. The real mistake was letting the user say `𝕕𝕖𝕗 = 1`, but that's been legal Python syntax for a l

[issue46520] `ast.unparse` produces syntactically illegal code for identifiers that look like reserved words

2022-01-26 Thread Kodiologist
Kodiologist added the comment: And yes, while this behavior will look strange, the only code that will parse to AST nodes that require it will be code that uses exactly the same trick. -- ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > Should the immutable flag also be applied to the heap types converted in and > before Python 3.9 before closing this issue? I don't think that Python 3.9 should be changed. It's too late. IMO this issue is not important enough to introduce a new type flag

[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: Please feel free to propose pull request for documentation tuning. -- ___ Python tracker ___ ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: In Python 3.11, 68 heap types have the Py_TPFLAGS_IMMUTABLETYPE flag: * _blake2.blake2b * _blake2.blake2s * _bz2.BZ2Compressor * _bz2.BZ2Decompressor * _csv.Dialect * _csv.reader * _csv.writer * _dbm.dbm * _gdbm.gdbm * _hashlib.HASH * _hashlib.HASHXOF * _hashl

[issue46465] Regression caused by CALL_FUNCTION specialization for C function calls

2022-01-26 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue42926] Split compiler into code-gen, optimizer and assembler.

2022-01-26 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: In Python 3.11, 41 types are declared explicitly with the Py_TPFLAGS_DISALLOW_INSTANTIATION flag: * _curses_panel.panel * _dbm.dbm * _gdbm.gdbm * _hashlib.HASH * _hashlib.HASHXOF * _hashlib.HMAC * _md5.md5 * _multibytecodec.MultibyteCodec * _sha1.sha1 * _sha25

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: Can we close this issue? Or is there a remaining task? -- ___ Python tracker ___ ___ Python-bugs-

  1   2   >