[issue31904] Python should support VxWorks RTOS

2020-12-16 Thread Peixing Xin
Change by Peixing Xin : -- pull_requests: +22676 pull_request: https://github.com/python/cpython/pull/23815 ___ Python tracker ___

[issue41804] test_epoll fails test_control_and_wait() randomly on aarch64 RHEL8 Refleaks 3.9

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: Oh, test_epoll failed on 3.9. So I backported my change to 3.8 and 3.9, to see if it helps or not. s390x RHEL8 Refleaks 3.9: https://buildbot.python.org/all/#builders/326/builds/159 Traceback (most recent call last): File

[issue41804] test_epoll fails test_control_and_wait() randomly on aarch64 RHEL8 Refleaks 3.9

2020-12-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +22675 pull_request: https://github.com/python/cpython/pull/23814 ___ Python tracker ___

[issue41804] test_epoll fails test_control_and_wait() randomly on aarch64 RHEL8 Refleaks 3.9

2020-12-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +22674 pull_request: https://github.com/python/cpython/pull/23813 ___ Python tracker

[issue42651] Recursive traceback crashes Python Interpreter

2020-12-16 Thread Xinmeng Xia
Change by Xinmeng Xia : -- title: Title: Recursive traceback crashes Python Interpreter -> Recursive traceback crashes Python Interpreter ___ Python tracker ___

[issue41960] Add globalns and localns to the inspect.signature and inspect.Signature.from_callable

2020-12-16 Thread Guido van Rossum
Guido van Rossum added the comment: It's been a while, I've lost context for this idea. What problem are you trying to solve here? Are there issues where people have reported problems that this would allow them to solve? -- ___ Python tracker

Re: Function returns old value

2020-12-16 Thread dn via Python-list
On 17/12/2020 16:06, Bischoop wrote: On 2020-12-17, dn wrote: Remember that posts to the list are archived, and thus may be searched. People experiencing similar problems in-future will be able to 'mine' the archives for help and advice. Using a/any pastebin is great for immediate sharing.

Re: Review, suggestion etc?

2020-12-16 Thread Bischoop
On 2020-12-17, Bischoop wrote: Accidently removed the paste, https://bpa.st/E3FQ -- https://mail.python.org/mailman/listinfo/python-list

Re: Function returns old value

2020-12-16 Thread Bischoop
On 2020-12-17, dn wrote: > Remember that posts to the list are archived, and thus may be searched. > People experiencing similar problems in-future will be able to 'mine' > the archives for help and advice. > > Using a/any pastebin is great for immediate sharing. Remember that in > this case

Re: Function returns old value

2020-12-16 Thread dn via Python-list
On 17/12/2020 15:40, Bischoop wrote: On 2020-12-12, Terry Reedy wrote: Don't post links to unknown sites. Reduce it to the minimum needed to exhibit the questionable behavior and include inline with the question. BTW bpa.st/+python is well known for code sharing among Python communities

Re: Function returns old value

2020-12-16 Thread Bischoop
On 2020-12-12, Terry Reedy wrote: > > Don't post links to unknown sites. Reduce it to the minimum needed to > exhibit the questionable behavior and include inline with the question. > >> How this functions should look properly? > > I've solved the problem. BTW bpa.st/+python is well known for

Review, suggestion etc?

2020-12-16 Thread Bischoop
I've done my biggest project that allowed me to learn a lot. It's basically simply Database with basic options >> https://bpa.st/FU4A . What sucks here is basically the find_people() I'll have to work on it yet to make it more useful. . If anyone was bored and wished to point me some wrong way

[issue17140] Document multiprocessing.pool.ThreadPool

2020-12-16 Thread Matt Wozniski
Change by Matt Wozniski : -- keywords: +patch nosy: +godlygeek nosy_count: 7.0 -> 8.0 pull_requests: +22673 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23812 ___ Python tracker

[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-16 Thread Jason R. Coombs
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +22672 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23010 ___ Python tracker ___

[issue42664] strptime(%c) fails to parse the output of strftime(%c)

2020-12-16 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker ___

[issue42664] strptime(%c) fails to parse the output of strftime(%c)

2020-12-16 Thread Eric V. Smith
Eric V. Smith added the comment: You have the parameters to strptime backward. >>> datetime.datetime.strptime(datetime.datetime.now().strftime("%c"), "%c") datetime.datetime(2020, 12, 16, 20, 51, 38) -- nosy: +eric.smith ___ Python tracker

[issue42090] zipfile.Path.joinpath API inconsistent with pathlib.Path.joinpath

2020-12-16 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue41478] Empty representation of AssertionError

2020-12-16 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42664] strptime(%c) fails to parse the output of strftime(%c)

2020-12-16 Thread sds
New submission from sds : >>> import datetime, locale >>> locale.getlocale() ('en_US', 'UTF-8') >>> datetime.datetime.strptime("%c",datetime.datetime.now().strftime("%c")) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/_strptime.py", line 568, in

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22671 pull_request: https://github.com/python/cpython/pull/23811 ___ Python tracker ___

[issue39041] Support GitHub Actions in CI

2020-12-16 Thread Daniel Hahler
Daniel Hahler added the comment: Brett, thanks for the reference. I've found https://discuss.python.org/t/coverage-report-in-github-ci-for-standard-library/2836/11, and https://bugs.python.org/issue40993 through it. -- ___ Python tracker

[issue39041] Support GitHub Actions in CI

2020-12-16 Thread Daniel Hahler
Change by Daniel Hahler : -- nosy: +blueyed -blueyed2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Cameron Simpson
On 16Dec2020 21:59, Chris Green wrote: >Cameron Simpson wrote: >> On 16Dec2020 18:51, Chris Green wrote: >> >The specific problem that finally prevented me from managing to get it >> >to work was a (Linux) .so file that had been built for Python 2 and, >> >as I don't have the source, I can't

[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-16 Thread CrocoDuck
CrocoDuck added the comment: Hi, I somehow missed the other issue while searching for something similar to this, sorry about that. The main issue is that files pickled with python 3.9.0 cannot be read back by using python 3.9.0 if they contain a `uname_result` object. As for expecting

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Angelico
On Thu, Dec 17, 2020 at 9:06 AM Chris Green wrote: > > Also, make note of the specific Python 2 version where your software > > works - the CPython API does change somewhat sometimes. > > > I still have python 2. The issue is that the programs need modules > which come from a PPA to support

[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-16 Thread Jason R. Coombs
Jason R. Coombs added the comment: The PR for the related issue does address pickling. Do you expect pickles to work across Python versions? -- ___ Python tracker ___

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Green
Cameron Simpson wrote: > On 16Dec2020 18:51, Chris Green wrote: > >The specific problem that finally prevented me from managing to get it > >to work was a (Linux) .so file that had been built for Python 2 and, > >as I don't have the source, I can't build for Python 3. > > ChrisA I think

[issue37961] Tracemalloc traces do not include original stack trace length

2020-12-16 Thread miss-islington
miss-islington added the comment: New changeset 78062e07bc7c3b47ffdcdec786b259dda376370c by Miss Islington (bot) in branch '3.9': bpo-37961: Fix regression in tracemalloc.Traceback.__repr__ (GH-23805) https://github.com/python/cpython/commit/78062e07bc7c3b47ffdcdec786b259dda376370c

[issue39041] Support GitHub Actions in CI

2020-12-16 Thread Brett Cannon
Brett Cannon added the comment: Your question is best directed at https://discuss.python.org/c/core-workflow/8, Daniel. -- ___ Python tracker ___

[issue42125] linecache cannot get source for the __main__ module with a custom loader

2020-12-16 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42415] python3.lib in Python3.9.0 Windows distribution does not contain PyObject_CallNoArgs symbol

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: Thanks David Hewitt for the bug report, and Zackery Spytz for your fix! 3.9 fix: commit 166286849048eccadecf02b242dbc4042b780944 Author: Victor Stinner Date: Wed Dec 16 22:41:47 2020 +0100 Add symbols of the stable ABI to python3dll.c (GH-23598)

[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 166286849048eccadecf02b242dbc4042b780944 by Victor Stinner in branch '3.9': Add symbols of the stable ABI to python3dll.c (GH-23598) (GH-23801) https://github.com/python/cpython/commit/166286849048eccadecf02b242dbc4042b780944 --

[issue37194] Move new vector private declarations to the internal C API

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 166286849048eccadecf02b242dbc4042b780944 by Victor Stinner in branch '3.9': Add symbols of the stable ABI to python3dll.c (GH-23598) (GH-23801) https://github.com/python/cpython/commit/166286849048eccadecf02b242dbc4042b780944 --

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 166286849048eccadecf02b242dbc4042b780944 by Victor Stinner in branch '3.9': Add symbols of the stable ABI to python3dll.c (GH-23598) (GH-23801) https://github.com/python/cpython/commit/166286849048eccadecf02b242dbc4042b780944 --

[issue37961] Tracemalloc traces do not include original stack trace length

2020-12-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +22670 pull_request: https://github.com/python/cpython/pull/23809 ___ Python tracker

[issue37961] Tracemalloc traces do not include original stack trace length

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 051b9818671625d125dee8198e0d2af5ad4c85b8 by Daniel Hahler in branch 'master': bpo-37961: Fix regression in tracemalloc.Traceback.__repr__ (GH-23805) https://github.com/python/cpython/commit/051b9818671625d125dee8198e0d2af5ad4c85b8 --

[issue42663] zoneinfo does not support full range of allowed transition hours in fallback string

2020-12-16 Thread Paul Ganssle
New submission from Paul Ganssle : TZif files consist of a list of transitions followed by a POSIX TZ var-style string of a form like "AAA3BBB,M3.2.0/01:30,M11.1.0/02:15:45", which decodes to "AAA (UTC-3) is the standard time and BBB (UTC-2) is the DST time, DST applies starting at 02:15:45

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Angelico
On Thu, Dec 17, 2020 at 8:26 AM Cameron Simpson wrote: > > On 16Dec2020 18:51, Chris Green wrote: > >The specific problem that finally prevented me from managing to get it > >to work was a (Linux) .so file that had been built for Python 2 and, > >as I don't have the source, I can't build for

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Cameron Simpson
On 16Dec2020 18:51, Chris Green wrote: >The specific problem that finally prevented me from managing to get it >to work was a (Linux) .so file that had been built for Python 2 and, >as I don't have the source, I can't build for Python 3. ChrisA I think suggested keeping a Python 2.7 install

[issue42662] Propose: Data model explict about __annotations__ key ordering.

2020-12-16 Thread Paul Bryan
Paul Bryan added the comment: Retracting. -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42662] Propose: Data model explict about __annotations__ key ordering.

2020-12-16 Thread Paul Bryan
Change by Paul Bryan : -- keywords: +patch pull_requests: +22668 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23808 ___ Python tracker ___

[issue42662] Propose: Data model explict about __annotations__ key ordering.

2020-12-16 Thread Paul Bryan
New submission from Paul Bryan : Currently the data model documentation does not specify the order of keys in __annotations__ dictionary. It is currently in the order that arguments or attributes are declared. I propose to make this explicit. Rationale: Having order explicitly specified in

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Angelico
On Thu, Dec 17, 2020 at 7:27 AM MRAB wrote: > > On 2020-12-16 19:16, Chris Angelico wrote: > > On Thu, Dec 17, 2020 at 6:06 AM Chris Green wrote: > >> > >> Some time ago (in July) I asked some questions here > >> about problems migrating some code from Python 2 to Python 3. > >> > >> The

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread MRAB
On 2020-12-16 19:16, Chris Angelico wrote: On Thu, Dec 17, 2020 at 6:06 AM Chris Green wrote: Some time ago (in July) I asked some questions here about problems migrating some code from Python 2 to Python 3. The specific problem that finally prevented me from managing to get it to work was a

Re: Fwd: bug in download

2020-12-16 Thread Terry Reedy
On 12/16/2020 12:15 PM, Erick Willum wrote: Begin forwarded message: From: Erick Willum Date: 16 December 2020 at 15:53:40 GMT To: python-list@python.org Subject: bug in download Hallo and good afternoon, Having installed python (big thank you) and sublime text, i get the next message

Re: dict.get(key, default) evaluates default even if key exists

2020-12-16 Thread Grant Edwards
On 2020-12-16, Dennis Lee Bieber wrote: > On Tue, 15 Dec 2020 20:08:53 + (UTC), Mark Polesky via Python-list > declaimed the following: > >>behavior, and I can't remember any programming language in which it's >>different. > > https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_name

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-16 Thread Paul Ganssle
Paul Ganssle added the comment: > Adding a static assertion about the signedness of uint8_t looks meaningless > to me. My proposal is to add a static assertion that `day` is an unsigned type. In the code it would look something like it does in the backports.zoneinfo code

Re: Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Angelico
On Thu, Dec 17, 2020 at 6:06 AM Chris Green wrote: > > Some time ago (in July) I asked some questions here > about problems migrating some code from Python 2 to Python 3. > > The specific problem that finally prevented me from managing to get it > to work was a (Linux) .so file that had been

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I propose to change types of function parameters and local variables. In any case the constructor checks the range of parameters, so there is no problem with packing them into compact structure. This will help to avoid errors of implicit conversion

Python 2 to Python 3 .so library incompatibility - need help

2020-12-16 Thread Chris Green
Some time ago (in July) I asked some questions here about problems migrating some code from Python 2 to Python 3. The specific problem that finally prevented me from managing to get it to work was a (Linux) .so file that had been built for Python 2 and, as I don't have the source, I can't build

[issue42661] Hashlib Bug

2020-12-16 Thread Zachary Ware
Zachary Ware added the comment: `hashlib` is part of the standard library and thus does not need to be (and should not be :)) installed via pip. -- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-16 Thread Paul Ganssle
Paul Ganssle added the comment: There are at least two issues with this: 1. This is a constructor for a struct, and the struct would really unnecessarily balloon in size if we switched everything over to be 32-bit integers (which I think is your suggestion?). This is not a major concern

Fwd: bug in download

2020-12-16 Thread Erick Willum
Begin forwarded message: > From: Erick Willum > Date: 16 December 2020 at 15:53:40 GMT > To: python-list@python.org > Subject: bug in download > > Hallo and good afternoon, > > Having installed python (big thank you) and sublime text, i get the next > message when trying to download numpy

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-12-16 Thread miss-islington
miss-islington added the comment: New changeset dd262ef46d2e2fff4c413cfa5faa9e72cd36220e by Miss Islington (bot) in branch '3.8': bpo-38323: Add guard clauses in MultiLoopChildWatcher. (GH-22756) https://github.com/python/cpython/commit/dd262ef46d2e2fff4c413cfa5faa9e72cd36220e --

[issue42661] Hashlib Bug

2020-12-16 Thread Samit Mohnot
New submission from Samit Mohnot : Complete output (6 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\Username\AppData\Local\Temp\pip-install-uyjqlzx9\hashlib_973e0ee3f102447498d1d4dca94b7942\setup.py", line 68 print "unknown OS, please

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-12-16 Thread miss-islington
miss-islington added the comment: New changeset bf0eed3e60acc7e4969a4fae940bc615fa924c30 by Miss Islington (bot) in branch '3.9': bpo-38323: Add guard clauses in MultiLoopChildWatcher. (GH-22756) https://github.com/python/cpython/commit/bf0eed3e60acc7e4969a4fae940bc615fa924c30 --

[issue39101] IsolatedAsyncioTestCase freezes when exception is raised

2020-12-16 Thread miss-islington
miss-islington added the comment: New changeset 9d409d6b474c188feca6213b9601e06f97715b72 by Miss Islington (bot) in branch '3.9': bpo-39101: Fixes BaseException hang in IsolatedAsyncioTestCase. (GH-22654) https://github.com/python/cpython/commit/9d409d6b474c188feca6213b9601e06f97715b72

Re: Python concurrent.futures.ProcessPoolExecutor

2020-12-16 Thread MRAB
On 2020-12-16 16:04, Rob Rosengard wrote: Warning: I am new to this group Warning: I am not an expert at Python, I've written a few small programs, and spend 20 hours of online classes, and maybe a book or two. Warning: I am new to trying to use concurrent.futures.ProcessPoolExecutor - Prior

[issue39101] IsolatedAsyncioTestCase freezes when exception is raised

2020-12-16 Thread miss-islington
miss-islington added the comment: New changeset d549d0b5575b390431b7b26999151f79f74d4516 by Miss Islington (bot) in branch '3.8': bpo-39101: Fixes BaseException hang in IsolatedAsyncioTestCase. (GH-22654) https://github.com/python/cpython/commit/d549d0b5575b390431b7b26999151f79f74d4516

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-12-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +22666 pull_request: https://github.com/python/cpython/pull/23806 ___ Python tracker

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-12-16 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 66d3b589c44fcbcf9afe1e442d9beac3bd8bcd34 by Chris Jerdonek in branch 'master': bpo-38323: Add guard clauses in MultiLoopChildWatcher. (#22756) https://github.com/python/cpython/commit/66d3b589c44fcbcf9afe1e442d9beac3bd8bcd34 --

Re: Python concurrent.futures.ProcessPoolExecutor

2020-12-16 Thread Dan Stromberg
On Wed, Dec 16, 2020 at 9:23 AM Israel Brewster wrote: > > On Dec 16, 2020, at 7:04 AM, Rob Rosengard > wrote: > > > > Warning: I am new to this group > > Warning: I am not an expert at Python, I've written a few small > programs, and spend 20 hours of online classes, and maybe a book or two.

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-12-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +22667 pull_request: https://github.com/python/cpython/pull/23807 ___ Python tracker ___

[issue39041] Support GitHub Actions in CI

2020-12-16 Thread Daniel Hahler
Daniel Hahler added the comment: Is it planned to enable coverage uploads for PRs? This would really help with seeing if code (to be merged) is covered etc. -- nosy: +blueyed2 ___ Python tracker

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I propose to change the type of day to int. It will remove any objections againsy the range check and make the code less error-prone for integer overflow and sign loss. -- ___ Python tracker

[issue41354] filecmp.cmp documentation does not match actual code

2020-12-16 Thread Scott
Scott added the comment: I suggest changing the documentation rather than the code. The mix up is in the wording. Documentation below "If shallow is true, files with identical os.stat() signatures are taken to be equal. Otherwise, the contents of the files are compared." The "Otherwise"

[issue1571878] Improvements to socket module exceptions

2020-12-16 Thread Irit Katriel
Irit Katriel added the comment: This was indeed done by now - all these exception types now extend OSErrors, the hierarchy is very close to the one suggested here (with the exception of the AddressError superclass, which I don't think is that useful to have), and they have an errno field

Re: Python concurrent.futures.ProcessPoolExecutor

2020-12-16 Thread Israel Brewster
> On Dec 16, 2020, at 7:04 AM, Rob Rosengard wrote: > > Warning: I am new to this group > Warning: I am not an expert at Python, I've written a few small programs, > and spend 20 hours of online classes, and maybe a book or two. > Warning: I am new to trying to use

[issue42556] unittest.mock.patch() cannot properly mock methods

2020-12-16 Thread Mario Corchero
Mario Corchero added the comment: Right, I believe this is indeed broken. This code: ``` class A: def m(self, a=None): pass from unittest import mock with mock.patch.object(A, "m", autospec=True): A.m.side_effect = print A().m(1) ``` prints: <__main__.A object at 0x7f69cc7dc6a0>

Re: dict.get(key, default) evaluates default even if key exists

2020-12-16 Thread Ethan Furman
On 12/16/20 3:08 AM, Peter J. Holzer wrote: On 2020-12-15 13:07:25 -0800, Ethan Furman wrote: On 12/15/20 9:07 AM, Mark Polesky via Python-list wrote: D = {'a':1} def get_default(): print('Nobody expects this') return 0 print(D.get('a', get_default())) Python has

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-16 Thread Paul Ganssle
Paul Ganssle added the comment: > Just my two cents, this isn't just "some compilers". Everything from gcc, > msvc, C# to the rust compiler complain about this sort of code. As they > should, this is effectively dead code. They complain because most of the time it's a sign that people were

Re: dict.get(key, default) evaluates default even if key exists

2020-12-16 Thread Ethan Furman
On 12/16/20 1:44 AM, Chris Angelico wrote: On Wed, Dec 16, 2020 at 8:43 PM Loris Bennett wrote: Paul Bryan writes: On Wed, 2020-12-16 at 10:01 +0100, Loris Bennett wrote: OK, I get the point about when the default value is generated and that potentially being surprising, but in the

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-16 Thread Ammar Askar
Ammar Askar added the comment: > Some compilers complain about checking `day < 0`, because `day` is an > unsigned type Just my two cents, this isn't just "some compilers". Everything from gcc, msvc, C# to the rust compiler complain about this sort of code. As they should, this is

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-16 Thread Paul Ganssle
Paul Ganssle added the comment: As I mentioned, it's a style issue. Yes this did not introduce any user-observable bugs, nor should it have changed the machine code emitted by the assembly on any competent compiler. The issue is that I had deliberately chosen to do a "redundant" check to

[issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: Paul created a follow-up issue: bpo-42660. -- ___ Python tracker ___ ___ Python-bugs-list

[issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7492b55ea0ca993c353b6373341b92e40faa9c4d by Miss Islington (bot) in branch '3.9': bpo-40686: Fix compiler warnings on _zoneinfo.c (GH-23614) (GH-23804) https://github.com/python/cpython/commit/7492b55ea0ca993c353b6373341b92e40faa9c4d

[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue42189. -- components: +Library (Lib) nosy: +jaraco, serhiy.storchaka ___ Python tracker ___

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think there is any problem *now*. The type of day is uint8_t, it cannot be negative. BTW, why is it uint8_t? Would not be easier to use type int by default? I doubt that it saves memory or makes the code faster. -- nosy:

Python concurrent.futures.ProcessPoolExecutor

2020-12-16 Thread Rob Rosengard
Warning: I am new to this group Warning: I am not an expert at Python, I've written a few small programs, and spend 20 hours of online classes, and maybe a book or two. Warning: I am new to trying to use concurrent.futures.ProcessPoolExecutor - Prior to writing this question I updated to

[issue23915] [doc] traceback set with BaseException.with_traceback() pushed back on raise

2020-12-16 Thread Julien Palard
Change by Julien Palard : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23915] [doc] traceback set with BaseException.with_traceback() pushed back on raise

2020-12-16 Thread Julien Palard
Julien Palard added the comment: New changeset c590c2338e5a36cf3ce5b55e6d366a0675ed1db5 by Irit Katriel in branch 'master': bpo-23915: update and elucidate documentation of with_traceback (GH-23680) https://github.com/python/cpython/commit/c590c2338e5a36cf3ce5b55e6d366a0675ed1db5

[issue37961] Tracemalloc traces do not include original stack trace length

2020-12-16 Thread daniel hahler
Change by daniel hahler : -- nosy: +blueyed nosy_count: 2.0 -> 3.0 pull_requests: +22665 pull_request: https://github.com/python/cpython/pull/23805 ___ Python tracker ___

[issue42660] _zoneinfo.c incorrectly checks bounds of `day` variable in calenderrule_new

2020-12-16 Thread Paul Ganssle
New submission from Paul Ganssle : This is a code style issue — in https://github.com/python/cpython/pull/23614, a regression was deliberately introduced to satisfy an overzealous compiler. The `day` variable has logical bounds `0 <= day <= 6`. In the original code, both sides of this

[issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: Fixing these compiler warnings helps PR 18532 "[workflow] Use MSVC problem matcher for Windows action build". -- ___ Python tracker ___

[issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: The 3 compiler warnings are now fixed in master, and a 3.9 backport will land as soon as the CI tests pass. Thanks everyone who helped to fix these warnings. I know that the solution is not perfect, but we have to deal with C language limitations.

[issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit

2020-12-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +22664 pull_request: https://github.com/python/cpython/pull/23804 ___ Python tracker

[issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset aefb69b23f056c61e82ad228d950f348de090c70 by Victor Stinner in branch 'master': bpo-40686: Fix compiler warnings on _zoneinfo.c (GH-23614) https://github.com/python/cpython/commit/aefb69b23f056c61e82ad228d950f348de090c70 --

[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-16 Thread Karl Nelson
Karl Nelson added the comment: I am fairly sure this is a Python "bug" in the sense that there was some change in undocumented change in requirements and the distutils pattern for building a module no longer reflects that requirement. That said very likely JPype is the only module to be

[issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: The problem can be simplified to this x.c file: --- static int invalid_day(unsigned int day) { return (day < 0 || day > 6); } int main() { invalid_day(3); return 0; } --- GCC emits the warning: $ gcc x.c -o x -O3 -Wall -Wextra x.c: In function

[issue42659] Objects of uname_result Class Cannot be Successfully Pickled

2020-12-16 Thread CrocoDuck
New submission from CrocoDuck : See the code example below. ```python import platform import pickle pack = { 'uname_result': platform.uname() } with open('test.pickle', 'wb') as f: pickle.dump(pack, f, protocol=pickle.HIGHEST_PROTOCOL) with open('test.pickle', 'rb') as f: data =

[issue42246] Implement PEP 626 -- Precise line numbers for debugging

2020-12-16 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +22663 pull_request: https://github.com/python/cpython/pull/23803 ___ Python tracker ___

[issue42615] Redundant jump instructions due to deleted unreachable bytecode blocks

2020-12-16 Thread Om G
Change by Om G : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42629] PyObject_Call not behaving as documented

2020-12-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: Pingback from #42033. Proper fix for that issue likely involves moving the work for copying kwargs into PyObject_Call, which would fix this bug by side-effect. -- nosy: +josh.r ___ Python tracker

[issue42033] Seemingly unnecessary complexification of foo(**kw)

2020-12-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: Even if making a copy is necessary when the underlying function receives the dict "raw", preemptively performing the copy (before knowing if the function being called is a Vectorcall function) means that when it's a Vectorcall function (e.g. all

[issue42238] Deprecate suspicious.py?

2020-12-16 Thread Julien Palard
Julien Palard added the comment: I created https://github.com/python/cpython/pull/23802 with a port of the "wrong backtick detector" (at least, one aspect from it) from suspicious to rstlint. I dropped the suspicious check three weeks ago, and found a single committed issue since then,

[issue42238] Deprecate suspicious.py?

2020-12-16 Thread Julien Palard
Change by Julien Palard : -- pull_requests: +22662 pull_request: https://github.com/python/cpython/pull/23802 ___ Python tracker ___

[issue42415] python3.lib in Python3.9.0 Windows distribution does not contain PyObject_CallNoArgs symbol

2020-12-16 Thread STINNER Victor
STINNER Victor added the comment: commit fcc6935384b933fbe1a1ef659ed455a3b74c849a Author: Victor Stinner Date: Wed Dec 16 15:08:23 2020 +0100 Add symbols of the stable ABI to python3dll.c (GH-23598) Add the following symbols to python3dll.c: * PyFrame_GetCode

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-12-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22659 pull_request: https://github.com/python/cpython/pull/23801 ___ Python tracker ___

[issue42415] python3.lib in Python3.9.0 Windows distribution does not contain PyObject_CallNoArgs symbol

2020-12-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 7.0 -> 8.0 pull_requests: +22658 pull_request: https://github.com/python/cpython/pull/23801 ___ Python tracker ___

[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2020-12-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22661 pull_request: https://github.com/python/cpython/pull/23801 ___ Python tracker ___

  1   2   >