[issue45020] Freeze all modules imported during startup.

2021-09-30 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27030 pull_request: https://github.com/python/cpython/pull/28665 ___ Python tracker ___

[issue45020] Freeze all modules imported during startup.

2021-09-30 Thread Eric Snow
Eric Snow added the comment: New changeset 7e5c107541726b90d3f2e6e69ef37180cf58335d by Eric Snow in branch 'main': bpo-45020: Add more test cases for frozen modules. (gh-28664) https://github.com/python/cpython/commit/7e5c107541726b90d3f2e6e69ef37180cf58335d --

[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2021-09-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: Aaron: Your understanding of how LEGB works in Python is a little off. Locals are locals for the *entire* scope of the function, bound or unbound; deleting them means they hold nothing (they're unbound) but del can't actually stop them from being locals.

[issue45020] Freeze all modules imported during startup.

2021-09-30 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27029 pull_request: https://github.com/python/cpython/pull/28664 ___ Python tracker ___

[issue45333] += operator and accessors bug?

2021-09-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: This has nothing to do with properties, it's 100% about using augmented assignment with numpy arrays and mixed types. An equivalent reproducer is: a = np.array([1,2,3]) # Implicitly of dtype np.int64 a += 0.5 # Throws the same error, no properties

[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-09-30 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +27028 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28663 ___ Python tracker ___

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-09-30 Thread STINNER Victor
STINNER Victor added the comment: > See issue #32635, where Victor Stinner backported some commit (with > problematic location of '#include ') to 2.7 and 3.6 branches (which > was released in >=2.7.15 and >=3.6). crypt.h was added to Python.h by:

[issue45333] += operator and accessors bug?

2021-09-30 Thread chovey
chovey added the comment: import sys import numpy as np class Kinematics: def __init__(self, *, initial_position: np.ndarray, initial_velocity: np.ndarray): self._position = initial_position # meters self._velocity = initial_velocity # meters per second @property

[issue45333] += operator and accessors bug?

2021-09-30 Thread chovey
chovey added the comment: I confirm I do get this error: Exception has occurred: _UFuncOutputCastingError Cannot cast ufunc 'add' output from dtype('float64') to dtype('int64') with casting rule 'same_kind' I next will paste a minimum working example. --

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-30 Thread STINNER Victor
STINNER Victor added the comment: On Unix, PyCOND_TIMEDWAIT() is implemented with pthread_cond_timedwait(). If pthread_condattr_setclock() is available, it uses CLOCK_MONOTONIC. Otherwise, it uses CLOCK_REALTIME. The glibc 2.30 adds pthread_cond_clockwait() which could be used to use

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27027 pull_request: https://github.com/python/cpython/pull/28662 ___ Python tracker ___

[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-09-30 Thread Steve Dower
Steve Dower added the comment: Thanks Adam. This analysis is correct, and I think there are two parts to this. First, we probably need to add an os.path.realpath(path_to_venv) before we try and launch the environment. We *could* limit this to when it's under AppData, but I think limiting

[issue44751] crypt.h should be in _cryptmodule.c, not in public header

2021-09-30 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: > > This is fix for regression which was previously backported to 2.7 and 3.6 > > branches. > > I'm not sure what you mean. > > In Python 2.7 and Python 3.6, was already included by > Include/Python.h: See issue #32635, where Victor

[issue45333] += operator and accessors bug?

2021-09-30 Thread chovey
chovey added the comment: Let me get a minimum working example (MWE) developed and then I will return and paste it in here. Ball in my court. Than, you. -- ___ Python tracker

[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-09-30 Thread Adam Yoblick
Change by Adam Yoblick : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45337] Create venv with pip fails when target dir is under userappdata using Microsoft Store python

2021-09-30 Thread Adam Yoblick
New submission from Adam Yoblick : Repro steps: 1. Install Python 3.9 from the Microsoft Store 2. Try to create a virtual environment under the userappdata folder, using a command line similar to the following: "C:\Program

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 2cf76cf4ccd177b8d6d2bf21b5462258ae87522d by Łukasz Langa in branch '3.9': Revert "bpo-45229: Make datetime tests discoverable (GH-28615). (GH-28645)" (GH-28660) https://github.com/python/cpython/commit/2cf76cf4ccd177b8d6d2bf21b5462258ae87522d

[issue45336] Issue with xml.tree.ElementTree.write

2021-09-30 Thread ed wolf
New submission from ed wolf : When executing the following command after modifiy an xml file an error is prodcued. import xml.etree.ElementTree as ET rtexmlFile = 'Fox_CM3550A_SWP1_Rte_ecuc.arxml' rte_ecu_tree = ET.parse(rtexmlFile) root = rte_ecu_tree.getroot() rte_ecu_tree.write(rtexmlFile,

[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2021-09-30 Thread Aaron Smith
Aaron Smith added the comment: I encountered the similar behavior unexpectedly when dealing with LEGB scope of names. Take the following example run under Python 3.9.2: def doSomething(): x = 10 del x print(x) x = 5 doSomething() This produces a UnboundLocalError at print(x)

[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 1.0 -> 2.0 pull_requests: +27026 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28661 ___ Python tracker

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +27025 pull_request: https://github.com/python/cpython/pull/28660 ___ Python tracker ___

[issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone

2021-09-30 Thread Ian Fisher
New submission from Ian Fisher : The SQLite converter that the sqlite3 library automatically registers for TIMESTAMP columns (https://github.com/python/cpython/blob/main/Lib/sqlite3/dbapi2.py#L66) ignores the time zone even if it is present and always returns a naive datetime object. I

[issue45330] dulwich_log performance regression in 3.10

2021-09-30 Thread Irit Katriel
Irit Katriel added the comment: Looks like this is using a 3rd party module (dulwitch.repo). Could it be a new version of that? -- ___ Python tracker ___

[issue44841] filemode in repr of ZipInfo, but is not a ZipInfo attribute

2021-09-30 Thread Ronald Oussoren
Ronald Oussoren added the comment: The repr() output of a ZipInfo contains filemode, but it is not an attribute of those objects, see for a list of attributes and methods. Adding an @property for mode that extracts the mode

[issue45331] Can create enum of ranges, cannot create range enum. Range should be subclassable... or EnumMeta.__new__ should be smarter.

2021-09-30 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman nosy: +ethan.furman versions: +Python 3.11 -Python 3.9 ___ Python tracker ___

[issue45333] += operator and accessors bug?

2021-09-30 Thread Mark Dickinson
Mark Dickinson added the comment: Did you by any chance get an error message resembling the following? > "Cannot cast ufunc 'add' output from dtype('float64') to dtype('int64') with > casting rule 'same_kind'" (If you can give us a complete piece of code that we can run ourselves, that

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _save_and_remove_module in the old code did too much and too little. It tested that the fresh module is importable, saved the current state of the fresh module and its submodules and removed the fresh module and its submodules. Since it tested

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 993a130d3abe7684dc9c999874b4dd1d8ea55a2a by Serhiy Storchaka in branch '3.9': [3.9] bpo-45229: Make datetime tests discoverable (GH-28615). (GH-28645) https://github.com/python/cpython/commit/993a130d3abe7684dc9c999874b4dd1d8ea55a2a

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f7e99c98130a705f88348dde60adb98d5bfd8b98 by Serhiy Storchaka in branch '3.9': [3.9] bpo-40173: Fix test.support.import_helper.import_fresh_module() (GH-28654) (GH-28658)

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7873884d4730d7e637a968011b8958bd79fd3398 by Serhiy Storchaka in branch '3.10': [3.10] bpo-40173: Fix test.support.import_helper.import_fresh_module() (GH-28654) (GH-28657)

[issue45334] String Strip not working

2021-09-30 Thread Steven D'Aprano
Steven D'Aprano added the comment: Serhiy is correct. Please see the documentation. https://docs.python.org/3/library/stdtypes.html#str.strip If you are using version 3.9 or better, you can use removeprefix instead: https://docs.python.org/3/library/stdtypes.html#str.removeprefix

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2021-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27024 pull_request: https://github.com/python/cpython/pull/28658 ___ Python tracker ___

[issue45332] Decimal test and benchmark are broken

2021-09-30 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2021-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27023 pull_request: https://github.com/python/cpython/pull/28657 ___ Python tracker ___

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ec4d917a6a68824f1895f75d113add9410283da7 by Serhiy Storchaka in branch 'main': bpo-40173: Fix test.support.import_helper.import_fresh_module() (GH-28654) https://github.com/python/cpython/commit/ec4d917a6a68824f1895f75d113add9410283da7

[issue45333] += operator and accessors bug?

2021-09-30 Thread Eric V. Smith
Eric V. Smith added the comment: Please show what result you're getting, and what result you're expecting. "will not work" is not very helpful for us to replicate it. -- components: -2to3 (2.x to 3.x conversion tool) nosy: +eric.smith ___ Python

[issue45334] String Strip not working

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It works as intended (please re-read the documentation carefully). It strips all characters specified in the argument. It strips characters "c" and "p" and stops before character "u" because "monitorScript_" contains "c" and "p", but not "u". --

[issue45334] String Strip not working

2021-09-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- components: -Parser nosy: -pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45334] String Strip not working

2021-09-30 Thread Vigneshwar Elangovan
New submission from Vigneshwar Elangovan : string = "monitorScript_cpu.py" a = string.strip("monitorScript_") print(a) > getting output => u.py Should stip only "monitorScript_" but stripping additional 2 charaters "monitorScript_cp" Below code working fine: string =

[issue21736] Add __file__ attribute to frozen modules

2021-09-30 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27022 pull_request: https://github.com/python/cpython/pull/28656 ___ Python tracker ___

[issue45333] += operator and accessors bug?

2021-09-30 Thread chovey
New submission from chovey : We used get/set attribute accessors with private data, and suspect the beaviour we see with the += operator contains a bug. Below is our original implementation, followed by our fix. But, we feel the original implementation should have worked. Please advise.

[issue45325] Allow "p" in Py_BuildValue

2021-09-30 Thread Matt Wozniski
Matt Wozniski added the comment: > "!value" or "!!value" also has the issue if I understood correctly. No, just as "value != 0" is an int, so is "!value". -- ___ Python tracker

[issue45332] Decimal test and benchmark are broken

2021-09-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The test and the benchmark for the decimal module are broken in 3.10+. $ ./python Modules/_decimal/tests/deccheck.py Traceback (most recent call last): File "/home/serhiy/py/cpython/Modules/_decimal/tests/deccheck.py", line 50, in from

[issue45330] dulwich_log performance regression in 3.10

2021-09-30 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21736] Add __file__ attribute to frozen modules

2021-09-30 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27021 pull_request: https://github.com/python/cpython/pull/28655 ___ Python tracker ___

[issue32523] inconsistent spacing in changelog.html

2021-09-30 Thread Julien Palard
Julien Palard added the comment: This still happen, but it's hard to tell if it'll happen from blurb, as when it's two paragraphs consisting of a text and a list it does not happen, sphinx just put the list as a sublist and it's clean. I don't want to tell people stop using list, it's very

[issue10716] Modernize pydoc to use better HTML and separate CSS

2021-09-30 Thread Julien Palard
Julien Palard added the comment: Tried myself at it. I'm not a front-end guy, fasten your seatbelts. I tried to keep it minimal, but after some work the change is not that small, I focused on the HTML modernization only, not the design (to try to land at least a first step toward

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2021-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27020 pull_request: https://github.com/python/cpython/pull/28654 ___ Python tracker ___

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I just encountered this bug after rewriting datetime tests in issue45229. It is also the cause of issue40058. Not knowing about this issue I have wrote different patch than Hai Shi. It makes the code of import_fresh_module() clearer and fixes many other

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2021-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue45331] Can create enum of ranges, cannot create range enum. Range should be subclassable... or EnumMeta.__new__ should be smarter.

2021-09-30 Thread Sam Bishop
New submission from Sam Bishop : Range types are perfectly valid as values in an enum, like so. class EnumOfRanges(Enum): ZERO = range(0, 0) RANGE_A = range(1, 11) RANGE_B = range(11, 26) However unlike the other base types , 'int', 'str', 'float', etc. You cannot create a

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset b07fddd527efe67174ce6b0fdbe8dac390b16e4e by Pablo Galindo Salgado in branch 'main': Revert "bpo-45229: Make datetime tests discoverable (GH-28615)" (GH-28650)

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-30 Thread Irit Katriel
Irit Katriel added the comment: It’s not clear that LOAD_NONE/LOAD_COMMON_CONST are worth doing. Any way the docstring question is not necessarily related to that. -- ___ Python tracker

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-30 Thread Mark Shannon
Mark Shannon added the comment: Since the docstring itself will always be present (attached to the function object), removing a docstring from a co_consts tuple will only save one pointer (8 bytes). Given that, it would appear that (d) uses *more* memory than (b). For the sqlalchemy

[issue10716] Modernize pydoc to use better HTML and separate CSS

2021-09-30 Thread Julien Palard
Change by Julien Palard : -- pull_requests: +27019 pull_request: https://github.com/python/cpython/pull/28651 ___ Python tracker ___

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue40058 and issue40173. -- dependencies: +Running test_datetime twice fails with: module 'datetime' has no attribute '_divide_and_round', test.support.import_fresh_module fails to correctly block submodules when fresh is specified

[issue45330] dulwich_log performance regression in 3.10

2021-09-30 Thread Ken Jin
New submission from Ken Jin : Somewhere between May02-May11, dulwich_log benchmark on pyperformance had a major performance regression on the 3.10 branch. https://speed.python.org/timeline/?exe=12==dulwich_log=1=200=off=on=on For a start, we could git bisect with pyperformance. FWIW, I

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-30 Thread Ken Jin
Ken Jin added the comment: @Pablo > I disagree. This is a regression/bug and we don't advertise "known bugs" in > the what's new, the same for any other bugfix that has been delayed until > 3.10.1 Alright, in hindsight 3.10 What's New was a bad suggestion on my part. I wonder if there's a

[issue36841] Supporting customization of float encoding in JSON

2021-09-30 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +27018 pull_request: https://github.com/python/cpython/pull/28650 ___ Python tracker ___

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Seems this is not a new bug: I agree, is unfortunate. But sadly is breaking all buildbots and therefore is hiding other issues and making the 'test-with-buildbots' label not useful. I would prefer to revert until we have a fix (and not land the

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems this is not a new bug: $ ./python -m test test_datetime test_datetime -m test_divide_and_round 0:00:00 load avg: 2.36 Run tests sequentially 0:00:00 load avg: 2.36 [1/2] test_datetime 0:00:00 load avg: 2.36 [2/2] test_datetime test test_datetime

[issue45325] Allow "p" in Py_BuildValue

2021-09-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > But I am not in strict opposition against this feature. It is just that I > have fixed so many bugs, that I try to search potential flaws and drawbacks > in any new feature. Now you know about this, and you can decide whether the > benefit is

[issue45329] pyexpat: segmentation fault when `--with-system-expat` is specified

2021-09-30 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45329] pyexpat: segmentation fault when `--with-system-expat` is specified

2021-09-30 Thread TAGAMI Yukihiro
Change by TAGAMI Yukihiro : -- keywords: +patch pull_requests: +27017 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28649 ___ Python tracker ___

[issue36841] Supporting customization of float encoding in JSON

2021-09-30 Thread Min RK
Min RK added the comment: We just ran into this in Jupyter where we've removed a pre-processing step for data structures passed to json.dumps, which took care of this, but was expensive https://github.com/jupyter/jupyter_client/pull/706 My expectation was that our `default` would be called

[issue45329] pyexpat: segmentation fault when `--with-system-expat` is specified

2021-09-30 Thread TAGAMI Yukihiro
New submission from TAGAMI Yukihiro : Some tests, which are related to pyexpat, get failed with `./configure --with-system-expat`. ``` 11 tests failed: test_minidom test_multiprocessing_fork

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-30 Thread Inada Naoki
Inada Naoki added the comment: My machine at the office (used for benchmarking) is hanged up and I need to go to the office to reboot. So I don't have benchmark machine for now. Please prioritize LOAD_NONE/LOAD_COMMON_CONST than this. It is hard to maintain merged branches. Merging

[issue36841] Supporting customization of float encoding in JSON

2021-09-30 Thread Min RK
Change by Min RK : -- nosy: +minrk nosy_count: 5.0 -> 6.0 pull_requests: +27016 pull_request: https://github.com/python/cpython/pull/28648 ___ Python tracker ___

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-30 Thread Inada Naoki
Inada Naoki added the comment: I used this tool to count co_const size and numbers. https://github.com/faster-cpython/tools/pull/6 Target is asyncio in the main branch. main (b34dd58f): Total: 31 files; 1,068 code objects; 12,741 lines; 39,208 opcodes; 3,880 total size of co_consts; 738

[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-30 Thread Mark Shannon
Mark Shannon added the comment: I strongly favor (b) over (d). (d) adds more complexity to MAKE_FUNCTION. MAKE_FUNCTION represents a measurable fraction of execution time for many programs. The more flags and branches it has, the harder it is to optimize. --

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Unfortunately, this PR28615 seems to have broken a bunch of buildbots. For instance: https://buildbot.python.org/all/#/builders/75/builds/172/steps/5/logs/stdio ``` test_divide_and_round (test.datetimetester.TestModule_Pure) ... ok

[issue41226] Supporting `strides` in `memoryview.cast`

2021-09-30 Thread Vedran Čačić
Vedran Čačić added the comment: I surely don't understand what the third argument means. What's (1, 2) there, and what stride does it produce? -- nosy: +veky ___ Python tracker

[issue45323] unexpected behavior on first match case _

2021-09-30 Thread Joël Bourgault
Joël Bourgault added the comment: Complement: the Python tutorial presents the "magic _" in the following section, close to its end: https://docs.python.org/3/tutorial/introduction.html#numbers > In interactive mode, the last printed expression is assigned to the variable > _. --

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset b34dd58fee707b8044beaf878962a6fa12b304dc by Victor Stinner in branch 'main': bpo-41710: Document _PyTime_t API in pytime.h (GH-28647) https://github.com/python/cpython/commit/b34dd58fee707b8044beaf878962a6fa12b304dc --

[issue45325] Allow "p" in Py_BuildValue

2021-09-30 Thread STINNER Victor
STINNER Victor added the comment: > I think that the risk for other formatting parameters is smaller, because you > know, that there are different formatting parameters for different integer > and floating point types, and for pointers, and you know that you should care > about truncation

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27015 pull_request: https://github.com/python/cpython/pull/28647 ___ Python tracker ___

[issue45309] asyncio task can not be used to open_connection and read data.

2021-09-30 Thread 穆兰
Change by 穆兰 : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45309] asyncio task can not be used to open_connection and read data.

2021-09-30 Thread 穆兰
Change by 穆兰 : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45323] unexpected behavior on first match case _

2021-09-30 Thread Joël Bourgault
Change by Joël Bourgault : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___ ___

[issue45323] unexpected behavior on first match case _

2021-09-30 Thread Joël Bourgault
Joël Bourgault added the comment: I obtain the reported behaviour using `python -m doctests .md` in a Gitlab pipeline, so it is likely that the execution is similar to the Python interpreter. Therefore, I am satisfied by your answer, so I close this 'bug'; thanks a lot! Now, about the fact

[issue45328] http.client.HTTPConnection doesn't work without TCP_NODELAY

2021-09-30 Thread Rodrigo
Change by Rodrigo : -- nosy: +rtobar nosy_count: 1.0 -> 2.0 pull_requests: +27014 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28646 ___ Python tracker

[issue41710] acquire(timeout) of threading.Lock and threading.Condition is affected by jumps in system time: Python should use sem_clockwait(CLOCK_MONOTONIC)

2021-09-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 37b8294d6295ca12553fd7c98778be71d24f4b24 by Victor Stinner in branch 'main': bpo-41710: PyThread_acquire_lock_timed() clamps the timout (GH-28643) https://github.com/python/cpython/commit/37b8294d6295ca12553fd7c98778be71d24f4b24 --

[issue45325] Allow "p" in Py_BuildValue

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > But isn't that risk the same for other formatting parameters? I think that the risk for other formatting parameters is smaller, because you know, that there are different formatting parameters for different integer and floating point types, and for

[issue45328] http.client.HTTPConnection doesn't work without TCP_NODELAY

2021-09-30 Thread R
New submission from R : I'm working on trying to run python under SerenityOS. At the moment, SerenityOS doesn't implement the TCP_NODELAY socket option. This makes the HTTPConnection.connect() method raise an OSError for an operation that is otherwise optional. Additionally, the connection

[issue40059] Provide a toml module in the standard library

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

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27013 pull_request: https://github.com/python/cpython/pull/28645 ___ Python tracker ___

[issue45327] Reading from a file is stuck infinitely when the file name is Boolean

2021-09-30 Thread Vinayak Hosamani
Vinayak Hosamani added the comment: Thanks for the clarification Eric. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45327] Reading from a file is stuck infinitely when the file name is Boolean

2021-09-30 Thread Eric V. Smith
Eric V. Smith added the comment: The issue is that False is causing a read from stdin, since False == 0. >>> open(0).readlines() test ['test\n'] Here I typed "test", followed by Ctrl-D (end of file). readlines() then completed and printed its result. I think the basic answer here is "don't

[issue45327] Reading from a file is stuck infinitely when the file name is Boolean

2021-09-30 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Interpreter Core -Library (Lib) title: json loads is stuck infinitely when the file name is Boolean -> Reading from a file is stuck infinitely when the file name is Boolean type: -> behavior ___ Python

[issue45327] json loads is stuck infinitely when the file name is Boolean

2021-09-30 Thread Eric V. Smith
Eric V. Smith added the comment: You can demonstrate this without the json module: # python2 >>> open(False) Traceback (most recent call last): File "", line 1, in TypeError: coercing to Unicode: need string or buffer, bool found # python3 >>> open(False).readlines() The python3 version

[issue45327] json loads is stuck infinitely when the file name is Boolean

2021-09-30 Thread Vinayak Hosamani
New submission from Vinayak Hosamani : Below snippet works fine on Python2 >>> import json >>> tc_report_file = False >>> tc_data = json.load(open(tc_report_file)) Traceback (most recent call last): File "", line 1, in TypeError: coercing to Unicode: need string or buffer, bool found >>>