Re: How to 'ignore' an error in Python?

2023-04-29 Thread Phu Sam
Unsubscribe On Sat, Apr 29, 2023 at 7:05 PM Chris Angelico wrote: > On Sun, 30 Apr 2023 at 11:58, Chris Green wrote: > > > > Chris Angelico wrote: > > > On Sat, 29 Apr 2023 at 14:27, Kushal Kumaran > wrote: > > > > > > > > On Fri, Apr 28 2023 at 04:55:41 PM, Chris Green wrote: > > > > > I'm

Fwd: A typing question

2022-10-29 Thread Sam Ezeh
Do you want the following? ``` from typing import List, Optional class GLOBALS: foos: Optional[Foos] = None class Foo: def __init__(self): pass class Foos: Foos: List[Foo] = [] def __init__(self): pass GLOBALS.foos = Foos() ``` Kind regards, Sam Ezeh

Re: Virtual PUG-meeting: An applied introduction to Finite State Machines

2022-09-13 Thread Sam Ezeh
That seems interesting. Is this hosted online? And are there any suggested reading materials for those who might not be able to attend? Kind regards, Sam Ezeh On Tue, 13 Sept 2022 at 22:53, dn wrote: > An applied introduction to Finite State Machines > 0730 UTC, Wed 21 Sep 2022 > >

Re: Building on Windows

2022-07-02 Thread Sam Ezeh
desktop but in this scenario, the error was that single line and I can use paste sites where necessary. Kind regards, Sam Ezeh On Sat, 2 Jul 2022 at 15:27, Sam Ezeh wrote: > > I have a Windows virtual machine and I'm following the instructions on > the devguide [1] to build Pyth

Building on Windows

2022-07-02 Thread Sam Ezeh
acquainted with Windows and don't understand the solutions. Thanks in advance. Kind regards, Sam Ezeh [1]: https://devguide.python.org/compiler/ [2]: https://bugs.python.org/issue41213 [3]: https://bugs.python.org/issue33675 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python installation

2022-06-21 Thread Sam Ezeh
Inside my Windows virtual machine only entering `py` as the command brings up the repl, if that helps. Kind Regards, Sam Ezeh On Tue, 21 Jun 2022 at 18:15, Igor Korot wrote: > > Hi, > > On Tue, Jun 21, 2022 at 11:43 AM Brian Karinga wrote: > > > > Hello, > > &

Re: Seeking deeper understanding of python equality (==)

2022-05-06 Thread Sam Ezeh
Kind regards, Sam Ezeh On Fri, 6 May 2022 at 18:12, Jonathan Kaczynski wrote: > > Hi, > > I was recently trying to explain how python equality works and ran into a > gap in my knowledge. I haven't found any good pages going beneath a surface > level explanation of python e

Fwd: Do projects exist to audit PyPI-hosted packages?

2022-05-06 Thread Sam Ezeh
-- Forwarded message - From: Sam Ezeh Date: Fri, 6 May 2022, 15:29 Subject: Re: Do projects exist to audit PyPI-hosted packages? To: Skip Montanaro I've had similar thoughts in the past. I don't know of anything but I wonder if repositiories for other languages might have

Re: Why no list as dict key?

2022-04-20 Thread Sam Ezeh
Repeating the above points, here is an example of what would happen if you tried. Dictionaries require their keys to be immutable as under-the-hood they use hash tables and they'd fail when the underlying values are allowed to change. ``` [sam@samtop]: ~>$ python Python 3.10.2 (main, Jan 15 2

Re: Tuple unpacking inside lambda expressions

2022-04-20 Thread Sam Ezeh
I went back to the code recently and I remembered what the problem was. I was using multiprocessing.Pool.pmap which takes a callable (the lambda here) so I wasn't able to use comprehensions or starmap Is there anything for situations like these? Kind Regards, Sam Ezeh On Sat, 16 Apr 2022 at 22

Re: Tuple unpacking inside lambda expressions

2022-04-20 Thread Sam Ezeh
This also works great! Kind Regards, Sam Ezeh On Tue, 19 Apr 2022 at 12:03, Antoon Pardon wrote: > > Op 16/04/2022 om 23:36 schreef Sam Ezeh: > > Two questions here. > > > > Firstly, does anybody know of existing discussions (e.g. on here or on > > python-ideas

Enums and nested classes

2022-04-20 Thread Sam Ezeh
(Enum): a = 1 b = 2 class Inner(Enum): foo = 10 bar = 11 ``` ``` class Outer(Enum): a = 1 b = 2 class Inner: c = None def __init__(self): ``` Kind Regards, Sam Ezeh -- https://mail.python.org/mailman/listinfo/python

Re: Proposal: Syntax for attribute initialisation in __init__ methods

2022-04-20 Thread Sam Ezeh
I'll see if I can find out how positional only and keyword only arguments are used in __init__ methods in the wild and I'll see if there have been any other discussions talking about what this approach could offer. On Sun, 17 Apr 2022 at 02:54, dn wrote: > > On 17/04/2022 09.20, Sam Ezeh

Re: Tuple unpacking inside lambda expressions

2022-04-16 Thread Sam Ezeh
wrote: > > On Sun, 17 Apr 2022 at 07:37, Sam Ezeh wrote: > > > > Two questions here. > > > > Firstly, does anybody know of existing discussions (e.g. on here or on > > python-ideas) relating to unpacking inside lambda expressions? > > > > I found myse

Fwd: Proposal: Syntax for attribute initialisation in __init__ methods

2022-04-16 Thread Sam Ezeh
I've just seen Pablo's very recent post on python-ideas so I thought I'd link it here. [1] [1]: https://mail.python.org/archives/list/python-id...@python.org/message/SCXHEWCHBJN3A7DPGGPPFLSTMBLLAOTX/ Kind Regards, Sam Ezeh On Fri, 15 Apr 2022 at 22:57, Ethan Furman wrote: > > On 4/15

Fwd: Proposal: Syntax for attribute initialisation in __init__ methods

2022-04-16 Thread Sam Ezeh
ve is that even if this is useful, it might still fall to the same fate. [1]: https://mail.python.org/archives/list/python-id...@python.org/message/SCTXSEKOWDRDGVXXOEB7JUC6WE7XKGMO/ On Fri, 15 Apr 2022 at 22:30, dn wrote: > > On 15/04/2022 23.19, Sam Ezeh wrote: > ... > >

Tuple unpacking inside lambda expressions

2022-04-16 Thread Sam Ezeh
(*job), jobs ) ``` Secondly, for situations like these, do you have any go-to methods of rewriting these while maintaining clarity? Kind Regards, Sam Ezeh -- https://mail.python.org/mailman/listinfo/python-list

Proposal: Syntax for attribute initialisation in __init__ methods

2022-04-15 Thread Sam Ezeh
at least 3 of their arguments as attributes with the same name. ``` [sam@samtop]: ~/Documents/git/presearch>$ presearch -f queries/attribute_initialisation.py sources/ Running queries... Out of 1526 classes defining __init__, there were 290 (19.0%) classes whose __init__ functions assigned all

Re: Functionality like local static in C

2022-04-14 Thread Sam Ezeh
function.variable) ... function.variable += 1 ... >>> function.variable = 1 >>> function() 1 >>> function() 2 >>> ``` If necessary, the variable can be initialised inside the function too. Kind Regards, Sam Ezeh On Thu, 14 Apr 2022 at 16:36, Sam Ezeh wrote: > > I've seen

[issue47184] multiprocessing.set_start_method force argument is not documented

2022-04-05 Thread Sam Ezeh
Sam Ezeh added the comment: It's quite weird, the documentation says set_start_method "should not be used more than once in the program" twice. The source code also contains the following line ``` # Type of default context -- underlying context can be set at most once ``` I

[issue47184] multiprocessing.set_start_method force argument is not documented

2022-04-05 Thread Sam Ezeh
Change by Sam Ezeh : -- keywords: +patch nosy: +sam_ezeh nosy_count: 2.0 -> 3.0 pull_requests: +30395 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32339 ___ Python tracker <https://bugs.python.org/i

[issue15795] Zipfile.extractall does not preserve file permissions

2022-04-04 Thread Sam Ezeh
Sam Ezeh added the comment: I don't know what the best course of action would be but if preserving permissions needs to be back-ported, could the default permission preservation flag in 3.11+ be the one to preserve safe permissions and then make it so that the previous versions (<3

[issue30964] Mention ensurepip in package installation docs

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- pull_requests: -30352 ___ Python tracker <https://bugs.python.org/issue30964> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39064] ValueError in zipfile.ZipFile

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- pull_requests: +30353 pull_request: https://github.com/python/cpython/pull/32291 ___ Python tracker <https://bugs.python.org/issue39

[issue30964] Mention ensurepip in package installation docs

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- nosy: +sam_ezeh nosy_count: 3.0 -> 4.0 pull_requests: +30352 pull_request: https://github.com/python/cpython/pull/32291 ___ Python tracker <https://bugs.python.org/issu

[issue39064] ValueError in zipfile.ZipFile

2022-04-03 Thread Sam Ezeh
Sam Ezeh added the comment: Yes, of course. -- ___ Python tracker <https://bugs.python.org/issue39064> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39064] ValueError in zipfile.ZipFile

2022-04-03 Thread Sam Ezeh
Sam Ezeh added the comment: One way of doing this is by making the central directory offset negative by first taking the zip file containing just an EOCD record and then listing the total size of the central directory records as positive. ``` Python 3.11.0a4+ (heads/bpo-39064:eb1935dacf

[issue39064] ValueError in zipfile.ZipFile

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- nosy: +sam_ezeh ___ Python tracker <https://bugs.python.org/issue39064> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15795] Zipfile.extractall does not preserve file permissions

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- pull_requests: +30350 pull_request: https://github.com/python/cpython/pull/32289 ___ Python tracker <https://bugs.python.org/issue15

[issue15795] Zipfile.extractall does not preserve file permissions

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- nosy: +sam_ezeh ___ Python tracker <https://bugs.python.org/issue15795> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47200] Add ZipInfo.mode property

2022-04-02 Thread Sam Ezeh
Change by Sam Ezeh : -- pull_requests: +30323 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32252 ___ Python tracker <https://bugs.python.org/issu

[issue47200] Add ZipInfo.mode property

2022-04-02 Thread Sam Ezeh
New submission from Sam Ezeh : Initially, I was looking at bpo-18262 and saw the following Stack Overflow thread that was linked. https://stackoverflow.com/questions/434641/how-do-i-set-permissions-attributes-on-a-file-in-a-zip-file-using-pythons-zip/6297838 I've attached a patch that gives

[issue47135] Allow decimal.localcontext to accept keyword arguments to set context attributes

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : -- pull_requests: +30313 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32242 ___ Python tracker <https://bugs.python.org/issu

[issue47135] Allow decimal.localcontext to accept keyword arguments to set context attributes

2022-04-01 Thread Sam Ezeh
Sam Ezeh added the comment: This is what functionality looks like when supplying incorrect attribute names with the patch. Python 3.11.0a6+ (heads/bpo-47135-dirty:d4bb38f82b, Apr 1 2022, 20:01:56) [GCC 11.1.0] on linux Type "help", "copyright", "credits" or

[issue47135] Allow decimal.localcontext to accept keyword arguments to set context attributes

2022-04-01 Thread Sam Ezeh
Sam Ezeh added the comment: I've uploaded a patch and it seems to work, which I'm very proud of. I'll create some tests, amend documentation and create a news entry. After that, I'll create a pull request on GitHub. -- keywords: +patch Added file: https://bugs.python.org/file50713

[issue47135] Allow decimal.localcontext to accept keyword arguments to set context attributes

2022-04-01 Thread Sam Ezeh
Sam Ezeh added the comment: I'm looking into adding this > Seems reasonable to me, but I think a full implementation would want to throw > an error for keyword args that don't already exist as context attributes > (otherwise typos would fail silently) For _pydecimal, I think t

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : -- pull_requests: +30300 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32225 ___ Python tracker <https://bugs.python.org/issu

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : Added file: https://bugs.python.org/file50711/sam_ezeh.patch ___ Python tracker <https://bugs.python.org/issue32547> ___ ___ Python-bugs-list mailin

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : Removed file: https://bugs.python.org/file50710/sam_ezeh.patch ___ Python tracker <https://bugs.python.org/issue32547> ___ ___ Python-bugs-list m

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : Added file: https://bugs.python.org/file50710/sam_ezeh.patch ___ Python tracker <https://bugs.python.org/issue32547> ___ ___ Python-bugs-list mailin

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Change by Sam Ezeh : Removed file: https://bugs.python.org/file50709/sam_ezeh.patch ___ Python tracker <https://bugs.python.org/issue32547> ___ ___ Python-bugs-list m

[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-04-01 Thread Sam Ezeh
Sam Ezeh added the comment: I've submitted a patch that introduces code that raises TypeError at construction if `fieldnames` is not a sequence -- keywords: +patch nosy: +sam_ezeh Added file: https://bugs.python.org/file50709/sam_ezeh.patch

[issue4833] Explicit directories for zipfiles

2022-03-28 Thread Sam Ezeh
Sam Ezeh added the comment: I've submitted the above patch. I created the ZipFile.mkdir function, created the necessary tests and wrote the documentation. I think it is ready for review. -- Added file: https://bugs.python.org/file50705/sam_ezeh.patch

[issue4833] Explicit directories for zipfiles

2022-03-28 Thread Sam Ezeh
Change by Sam Ezeh : -- keywords: +patch pull_requests: +30238 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32160 ___ Python tracker <https://bugs.python.org/iss

[issue4833] Explicit directories for zipfiles

2022-03-27 Thread Sam Ezeh
Sam Ezeh added the comment: I'm looking into adding ZipFile.mkdir -- ___ Python tracker <https://bugs.python.org/issue4833> ___ ___ Python-bugs-list mailin

[issue4833] Explicit directories for zipfiles

2022-03-27 Thread Sam Ezeh
Change by Sam Ezeh : -- nosy: +sam_ezeh ___ Python tracker <https://bugs.python.org/issue4833> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14265] Fully qualified test name in failure output

2022-03-27 Thread Sam Ezeh
Sam Ezeh added the comment: The provided patch wasn't entirely compatible with the current upstream code. I used the patch file to apply the changes to `Lib/unittest/case.py`, resolved the remaining conflicts with the patches to the test files and amended existing tests for the library. I

[issue14265] Fully qualified test name in failure output

2022-03-27 Thread Sam Ezeh
Change by Sam Ezeh : -- keywords: +patch pull_requests: +30218 pull_request: https://github.com/python/cpython/pull/32138 ___ Python tracker <https://bugs.python.org/issue14

[issue14265] Fully qualified test name in failure output

2022-03-27 Thread Sam Ezeh
Change by Sam Ezeh : -- nosy: +dignissimus ___ Python tracker <https://bugs.python.org/issue14265> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2022-03-11 Thread Sam Bull
Sam Bull added the comment: There is still an issue here. I proposed a possible solution at: https://github.com/python/cpython/pull/28149#issuecomment-1007823782 You can also scroll up through the lengthy discussion to see how I reached that conclusion. I've not had time yet to actually try

[issue46771] Add some form of cancel scopes

2022-02-20 Thread Sam Bull
Sam Bull added the comment: > We could store the nonces in a single CancelledError instead. Indeed, my initial proposal was exactly that, but after learning about ExceptionGroup, I thought that was a cleaner approach. -- ___ Python trac

[issue46771] Add some form of cancel scopes

2022-02-20 Thread Sam Bull
Sam Bull added the comment: > Previously, when the task was cancelled twice, only one CancelledError was > raised. Now it would raise a BaseExceptionGroup instead. I was under the impression that ExceptionGroup was somewhat backwards compatible, in that you could still use `

[issue46771] Add some form of cancel scopes

2022-02-20 Thread Sam Bull
Sam Bull added the comment: Actually, in your counter proposal, you say: > Such context managers should still keep track of whether they cancelled the > task themselves or not, and if they did, they should always call t.uncancel(). But, if we are using nonces on the CancelledError t

[issue46771] Add some form of cancel scopes

2022-02-20 Thread Sam Bull
Sam Bull added the comment: > This should be solved when using the cancel count -- the explicit cancel > bumps the cancel count so the cancel scope (i.e. timeout()) will not raise > TimeoutError. It will probably work in this case. But, what about more complex cases? If th

[issue46771] Add some form of cancel scopes

2022-02-20 Thread Sam Bull
Sam Bull added the comment: > If the task is already pending a cancellation targeted at a cancel scope, the > task itself cannot be cancelled anymore since calling cancel() again on the > task is a no-op. This would be solved by updating the cancel message on the > second call

[issue45098] asyncio.CancelledError should contain more information on cancellations

2022-02-19 Thread Sam Bull
Sam Bull added the comment: I think there's still a problem, in that the user still expects a task to be cancelled in the example previously: https://github.com/aio-libs/async-timeout/issues/229#issuecomment-908502523 If we encounter the race condition where the timeout cancels the task

[issue46660] datetime.timestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts
Change by Sam Roberts : -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue46660> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46660] datetime.timestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts
Sam Roberts added the comment: this seems like an expected discrepancy because of a difference in the mechanism used for aware datatimes vs. naive datetimes, although I'm not sure I understand why the computation with naive datetimes uses the mktime() function rather than invoking

[issue46660] datetime.timestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts
Sam Roberts added the comment: the first sentence should have read: datetime.timestamp() fails for naive-datetime values prior to the start of the epoch, but for some reason works properly for aware-datetime values prior to the start of the epoch. -- title: datetime.fromtimestamp

[issue46660] datetime.fromtimestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts
Change by Sam Roberts : -- title: datetime.datetime.fromtimestamp -> datetime.fromtimestamp() fails for naive-datetime values prior to the start of the epoch ___ Python tracker <https://bugs.python.org/issu

[issue46660] datetime.datetime.fromtimestamp

2022-02-06 Thread Sam Roberts
New submission from Sam Roberts : Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32 datetime.fromtimestamp() fails for naive-datetime values prior to the start of the epoch, but for some reason works properly for aware-datetime values prior

[issue38633] shutil.copystat fails with PermissionError in WSL

2022-01-19 Thread Sam Park
Sam Park added the comment: FWIW I just ran into this today on Ubuntu 18.04 container on GKE 1.21.5-gke.1302 and on a Ubuntu-with-Docker underlying node (if that's relevant). Applying the monkeypatch solves the issue as well. -- nosy: +sam.park

[issue46205] test.libregrtest: Race condition in runtest_mp leads to hangs (never exits)

2022-01-07 Thread Sam Gross
Change by Sam Gross : -- keywords: +patch pull_requests: +28673 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30470 ___ Python tracker <https://bugs.python.org/issu

[issue46205] Race condition in runtest_mp leads to hangs (never exits)

2021-12-30 Thread Sam Gross
Change by Sam Gross : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue46205> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46205] Race condition in runtest_mp leads to hangs (never exits)

2021-12-30 Thread Sam Gross
Change by Sam Gross : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue46205> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46205] Race condition in runtest_mp leads to hangs (never exits)

2021-12-30 Thread Sam Gross
New submission from Sam Gross : The runtest_mp.py has a race condition between checking for worker.is_alive() and processing the queue that can lead to indefinite hangs. The hang happens when the all the results from the self.output queue are processed but at least one of the workers hasn't

[issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition

2021-12-02 Thread Sam Bull
Sam Bull added the comment: It has been addressed, PR should be merged this week: https://github.com/python/cpython/pull/28149 Like most open source projects, it just needed someone to actually propose a fix. -- ___ Python tracker <ht

[issue45838] Incorrect line numbers in GDB Python backtraces [3.9]

2021-11-18 Thread Sam Gross
Change by Sam Gross : -- keywords: +patch pull_requests: +27860 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29628 ___ Python tracker <https://bugs.python.org/issu

[issue45838] Incorrect line numbers in GDB Python backtraces [3.9]

2021-11-18 Thread Sam Gross
New submission from Sam Gross : Starting in Python 3.6 the line numbers table contains a *signed* byte indicating line delta. The calculation in Tools/gdb/libpython.py was not updated to handle signed bytes leading to incorrect line numbers when running "py-bt" (or printing fram

[issue45835] Race condition in test_queue can lead to test failures

2021-11-17 Thread Sam Gross
Change by Sam Gross : -- pull_requests: +27844 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29601 ___ Python tracker <https://bugs.python.org/issu

[issue45835] Race condition in test_queue can lead to test failures

2021-11-17 Thread Sam Gross
Change by Sam Gross : -- keywords: +patch Added file: https://bugs.python.org/file50447/issue45835_repro.patch ___ Python tracker <https://bugs.python.org/issue45

[issue45835] Race condition in test_queue can lead to test failures

2021-11-17 Thread Sam Gross
New submission from Sam Gross : The test_queue suite has a race condition that can lead to test failures in test_many_threads, test_many_threads_nonblock, and test_many_threads_timeout. Consumers are signaled to exit by a sentinel value (None). The sentinel values are at the end of the input

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-17 Thread Sam Gross
Change by Sam Gross : -- pull_requests: +27843 pull_request: https://github.com/python/cpython/pull/29600 ___ Python tracker <https://bugs.python.org/issue42

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-11-15 Thread Sam Gross
Sam Gross added the comment: The `pthread_exit` behavior has been a problem for PyTorch and related libraries since Python 3.9. The PyTorch team has tried working around the problems without success (i.e. they keep getting bug reports involving crashes in PyEval_SaveThread/RestoreThread

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-15 Thread Sam Gross
Change by Sam Gross : -- keywords: +patch nosy: +colesbury nosy_count: 2.0 -> 3.0 pull_requests: +27812 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29564 ___ Python tracker <https://bugs.python.org/i

[issue45809] Race condition in WeakKeyDictionary/WeakKeyDictionary

2021-11-15 Thread Sam Gross
Sam Gross added the comment: The attached patch (issue45809-repro.patch) introduces artificial delays to make reproduction of the underlying issue easier. To reproduce the issue: patch -p1 < issue45809-repro.patch ./python -m test test_weakref -m test_threaded_weak_value_dict_deepc

[issue45809] Race condition in WeakKeyDictionary/WeakKeyDictionary

2021-11-15 Thread Sam Gross
New submission from Sam Gross : The issue described issue7105 (and maybe issue7060) still exists due to a race condition in WeakKeyDictionary. This shows up as test failure that looks like: test test_weakref failed -- Traceback (most recent call last): File "Lib/test/test_weakr

[issue14527] How to link with a non-system libffi?

2021-10-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue14527> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45598] setup.py grep_headers_for() is broken by design

2021-10-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue45598> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue45350> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45643] SIGSTKFLT is missing from the signals module on Linux

2021-10-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue45643> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45256] Remove the usage of the C stack in Python to Python calls

2021-10-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue45256> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue44525> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue44828> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45484] test_pickle segfault on s390x RHEL7 LTO 3.x

2021-10-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue45484> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45668] Some PGO tests are failing when building with --enable-optimizations --disable-test-modules

2021-10-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue45668> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2021-10-27 Thread Sam Gross
Change by Sam Gross : -- pull_requests: +27513 pull_request: https://github.com/python/cpython/pull/29249 ___ Python tracker <https://bugs.python.org/issue28

[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2021-10-27 Thread Sam Gross
Change by Sam Gross : -- keywords: +patch pull_requests: +27510 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29246 ___ Python tracker <https://bugs.python.org/issu

[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2021-10-27 Thread Sam Gross
Sam Gross added the comment: Antoine Pitrou already fixed the "noddy4" example (now renamed to "custom4") and updated the newtypes_tutorial, but I think it's still worth mentioning PyObject_GC_Untrack in a few additional places. -- __

[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2021-10-27 Thread Sam Gross
Change by Sam Gross : -- assignee: docs@python -> colesbury ___ Python tracker <https://bugs.python.org/issue28737> ___ ___ Python-bugs-list mailing list Un

[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-10-25 Thread Sam Bull
Sam Bull added the comment: Can I get a review? https://github.com/python/cpython/pull/29202 Seems like a simple mistake given the original description of this issue: > 1. the inner task is completed and the outer task will receive the result – > transport and protocol in this ca

[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-10-24 Thread Sam Bull
Change by Sam Bull : -- nosy: +dreamsorcerer nosy_count: 10.0 -> 11.0 pull_requests: +27471 pull_request: https://github.com/python/cpython/pull/29202 ___ Python tracker <https://bugs.python.org/issu

[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue45433> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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

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

2021-09-29 Thread Sam James
Change by Sam James : -- nosy: +thesamesam ___ Python tracker <https://bugs.python.org/issue44751> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45098] asyncio.CancelledError should contain more information on cancellations

2021-09-04 Thread Sam Bull
New submission from Sam Bull : There are awkward edge cases caused by race conditions when cancelling tasks which make it impossible to reliably cancel a task. For example, in the async-timeout library there appears to be no way to avoid suppressing an explicit t.cancel

[issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition

2021-09-03 Thread Sam Bull
Change by Sam Bull : -- nosy: +dreamsorcerer nosy_count: 8.0 -> 9.0 pull_requests: +26587 pull_request: https://github.com/python/cpython/pull/28149 ___ Python tracker <https://bugs.python.org/issu

[issue44815] asyncio.gather no DeprecationWarning if task are passed

2021-08-02 Thread Sam Bull
Change by Sam Bull : -- pull_requests: +26076 pull_request: https://github.com/python/cpython/pull/27569 ___ Python tracker <https://bugs.python.org/issue44

[issue44815] asyncio.gather no DeprecationWarning if task are passed

2021-08-02 Thread Sam Bull
Sam Bull added the comment: There is another issue with asyncio.sleep() too, if the passed argument is 0. This also tripped up the tests in aiohttp (though I've also used an explicit 0 in production code to yield back to the loop). -- ___ Python

[issue44815] asyncio.gather no DeprecationWarning if task are passed

2021-08-02 Thread Sam Bull
Change by Sam Bull : -- keywords: +patch pull_requests: +26075 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27568 ___ Python tracker <https://bugs.python.org/issu

  1   2   3   4   5   6   >