[issue42590] Something like Rust's std::sync::Mutex – combining a mutex primitive and a piece of data it's protecting

2020-12-07 Thread Jakub Stasiak
New submission from Jakub Stasiak : I've been wondering if it's worth it to have something like Rust's std::sync::Mutex[1] which is used like this: let data = Mutex::new(0); { let mut unlocked = data.lock().unwrap(); *unlocked += 1; } // unlocked is no longer

[issue42589] doc: Wrong "from" keyword link in Exceptions doc

2020-12-07 Thread Irit Katriel
New submission from Irit Katriel : In the Exceptions doc: https://docs.python.org/3/library/exceptions.html#built-in-exceptions In the sentence "The expression following from must be an exception or None." "from" is a keyword which links to

[issue42588] Improvements to graphlib.TopologicalSorter.static_order() documentation

2020-12-07 Thread Ran Benita
Ran Benita added the comment: Hmm I realize after the fact that since the equivalent code snippet (which is actually the implementation) is a generator, then it is actually correct that prepare() isn't called until it is iterated. So the documentation for this is not incorrect. Still, I

[issue42588] Improvements to graphlib.TopologicalSorter.static_order() documentation

2020-12-07 Thread Ran Benita
New submission from Ran Benita : One issue and one suggestion. Issue: The documentation of prepare() says: > If any cycle is detected, CycleError will be raised which is what happens. The documentation of static_order() says that static_order() is equivalent to: def static_order(self):

[issue42587] test_buffer fails on Python built with GCC 11

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: test_buffer also fails with GCC 11 on Python 3.8 built without LTO nor PGO, just -Og (./configure --enable-pydebug). PPC64LE Fedora Rawhide Refleaks 3.8: https://buildbot.python.org/all/#/builders/398/builds/101 test.pythoninfo: sysconfig[CFLAGS]:

[issue42587] test_buffer fails on Python built with GCC 11

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: Copy of Miro Hrončok's email to Fedora python-devel list: https://lists.fedoraproject.org/archives/list/python-de...@lists.fedoraproject.org/thread/ADKCB6HXGZHJPYX5LSJ7422FITYSOAL3/ Hello. I've been notified that many of the Python interpreters started

[issue42587] test_buffer fails on Python built with GCC 11

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: On Python 3.6/x86-64, Python does crash in libregrtest while loading test_code: 0:01:13 load avg: 2.23 [ 56/406] test_code Fatal Python error: Segmentation fault Current thread 0x7f5a6864d740 (most recent call first): File

[issue42587] test_buffer fails on Python built with GCC 11

2020-12-07 Thread STINNER Victor
New submission from STINNER Victor : PPC64LE Fedora Rawhide LTO 3.x: https://buildbot.python.org/all/#/builders/448/builds/433 FAIL: test_memoryview_cast (test.test_buffer.TestBufferProtocol) FAIL: test_memoryview_cast_1D_ND (test.test_buffer.TestBufferProtocol) FAIL:

[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: It's a problem with 3.9 only as far as I know. The fix has been merged to master (3.10) and 3.9 . I will check with 3.8 but I don't think it will be a problem since 3.8 has a different code path. You can check the PR merged for more discussion.

[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Valeriu Predoi
Valeriu Predoi added the comment: Note however, that the need I have for my type of functionality is fulfilled and all works fine for Python 3.7 and 3.8, I noticed the problem only for 3.9 - the OP in that issue says their versions affected include 3.8 (maybe it creeps up for 3.8.6 or

[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Valeriu Predoi
Valeriu Predoi added the comment: Indeed so! Sorry, I only glossed over that one before posting mine, now that I looked at it more carefully you are right, it does need a check on None and not calling the __bool__ member, which is affecting functionally passing an ndarray as spec - what

[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread mattip
mattip added the comment: the PR is awaiting approval/merge -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks, this looks like a duplicate of https://bugs.python.org/issue42532 -- ___ Python tracker ___

[issue42583] JSON.dumps() creates invalid JSON with single quotes

2020-12-07 Thread Kjartan Hrafnkelsson
Change by Kjartan Hrafnkelsson : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Valeriu Predoi
Valeriu Predoi added the comment: Hello mate, yes it used to work fine with Python 3.8, no issue with Python 3.9 and numpy if you call mock as ob = mg.Mock(spec=np.array([4, 4])) this results in a nice exception being raised: Traceback (most recent call last): File

[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I don't have Python 3.9 with numpy to test this. Does this used to work with python 3.8? Does using numpy produce any error or traceback in 3.9? -- nosy: +xtreak ___ Python tracker

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-12-07 Thread Tal Einat
Change by Tal Einat : -- Removed message: https://bugs.python.org/msg382632 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-12-07 Thread E. Paine
E. Paine added the comment: Removed Alex from nosy because the link was an advertisement for an essay writer. -- nosy: -alexwriter2003 ___ Python tracker ___

[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Valeriu Predoi
New submission from Valeriu Predoi : Hey guys, the new unittest.mock.Mock for Python 3.9 can not accept a spec arg if it is a numpy array, it'll accept all other types but not ndarray, have a look at this quick minimal code: import numpy as np from unittest import mock as mg ob =

[issue42585] Segmentation fault on Linux with multiprocess queue

2020-12-07 Thread Stegle, Julien
Stegle, Julien added the comment: By removing the use the of "spawn" context for multiprocessing everything works fine. Does the "spawn" context have a different behavior on Linux ? -- ___ Python tracker

[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-12-07 Thread Alex Writer
Alex Writer added the comment: Testing with a minimal tkinter app (see code below) gives similar behavior, so this appears to be an issue with tkinter https://goo.gl/2DqXGj and/or tcl/tk. import tkinter text = tkinter.Text() -- nosy: +alexwriter2003

[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-07 Thread Irit Katriel
Irit Katriel added the comment: This just came up again in issue42561 so I went ahead and created the PR. -- ___ Python tracker ___

[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-07 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Usually literal_eval() is used with short one-line input. For what large > documents do you use it? I kind of agree with Serhiy on this, nearly every use case I've encountered was simple, single-line expression. Though, by seeing Irit's patch I think the

[issue28964] AST literal_eval exceptions provide no information about line number

2020-12-07 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +22543 pull_request: https://github.com/python/cpython/pull/23677 ___ Python tracker ___

[issue42532] spec_arg's __bool__ is called while initializing NonCallableMock

2020-12-07 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- pull_requests: +22542 pull_request: https://github.com/python/cpython/pull/23676 ___ Python tracker ___

[issue42585] Segmentation fault on Linux with multiprocess queue

2020-12-07 Thread Stegle, Julien
New submission from Stegle, Julien : Hi, I'm experiencing segmentation fault issues when running inside a Docker container (tested with python:3.8.6, python:3.8.6-slim, python:3.6.8 & python:3.6.8-slim). On windows everything works fine, but when running on Docker when I try to put a

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2020-12-07 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Steve Dower: It should be fairly easy to add a CI check that validates the source checksums, so you don't need to do it manually every time. I can throw up a simple GH workflow for the sqlite branch if you want. --

[issue30459] PyList_SET_ITEM could be safer

2020-12-07 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.9 ___ Python tracker ___

[issue30459] PyList_SET_ITEM could be safer

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: Thanks Espie Marc for the bug report, it's now fixed in the master branch. IMO not only clang users will benefit of a better defined API. For example, it should help other Python implementation to implement such API, without the weird side effects of a

[issue30459] PyList_SET_ITEM could be safer

2020-12-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0ef96c2b2a291c9d2d9c0ba42bbc1900a21e65f3 by Victor Stinner in branch 'master': bpo-30459: Cast the result of PyCell_SET to void (GH-23654) https://github.com/python/cpython/commit/0ef96c2b2a291c9d2d9c0ba42bbc1900a21e65f3 --

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2020-12-07 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +ned.deily, steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2020-12-07 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22541 pull_request: https://github.com/python/cpython/pull/23675 ___ Python tracker ___

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2020-12-07 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +22540 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23674 ___ Python tracker

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2020-12-07 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : SQLite 3.34.0 was released 2020-12-01: https://www.sqlite.org/releaselog/3_34_0.html Compiles fine on master, and tests are completing without error. -- components: Library (Lib) messages: 382625 nosy: erlendaasland priority: normal

[issue38660] Checking if two regexes are equal should test if they are functionally equivalent

2020-12-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42583] JSON.dumps() creates invalid JSON with single quotes

2020-12-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42578] Add tip when encountering UnicodeDecode/EncodeError in open()

2020-12-07 Thread Inada Naoki
Inada Naoki added the comment: How do you think about PEP-597? https://www.python.org/dev/peps/pep-0597/ -- nosy: +methane ___ Python tracker ___

[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-12-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +22539 pull_request: https://github.com/python/cpython/pull/23673 ___ Python tracker ___

[issue41889] enum: Mixin and int base class regression in 3.8.6

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

[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-12-07 Thread Ethan Furman
Ethan Furman added the comment: New changeset c266736ec1f9ebef38b134ceb4832df015711b38 by Ethan Furman in branch 'master': bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487) https://github.com/python/cpython/commit/c266736ec1f9ebef38b134ceb4832df015711b38 --

[issue42559] random.getrandbits: Should it be explicit that it returns unsigned/non-negative integer?

2020-12-07 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: Raymond Hettinger: Thanks for acking it would be a useful change! ZackerySpytz: Thanks for making a patch! -- ___ Python tracker ___

<    1   2