[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-31 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread miss-islington
miss-islington added the comment: New changeset 95b001fe6766f491f4356f8bcf23d6895bab2342 by Miss Islington (bot) in branch '3.10': bpo-23325: Fix SIG_IGN and SIG_DFL int comparison in signal module (GH-31759) https://github.com/python/cpython/commit/95b001fe6766f491f4356f8bcf23d6895bab2342

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread miss-islington
miss-islington added the comment: New changeset c8a47e76a391c8818bf10a282cdcd3bb5c23ebf6 by Christian Heimes in branch 'main': bpo-23325: Fix SIG_IGN and SIG_DFL int comparison in signal module (GH-31759) https://github.com/python/cpython/commit/c8a47e76a391c8818bf10a282cdcd3bb5c23ebf6

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +29876 pull_request: https://github.com/python/cpython/pull/31768 ___ Python tracker

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agree. There were too many changes in this code, and making SIG_DFL and SIG_IGN functions exposes some issues with sharing objects between interpreters. It is easier to keep them integers for now. -- ___ Python

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread Christian Heimes
Christian Heimes added the comment: My PR 31759 removes the assumption of small int singletons and replaces C comparison with PyObject_RichCompareBool() Py_EQ calls. I still prefer Serhiy's solution, but it may cause backwards incompatible breakage. My fix can be backported to 3.9 and 3.10

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-03-08 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +29871 pull_request: https://github.com/python/cpython/pull/31759 ___ Python tracker ___

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-01-21 Thread Christian Heimes
Christian Heimes added the comment: Understood, thanks! A trivial fix for the integer comparison bug would solve my issue: --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -527,21 +527,20 @@ signal_signal_impl(PyObject *module, int signalnum, PyObject *handler)

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It may take a time, because the module initialization code has been completely rewritten. -- ___ Python tracker ___

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-01-20 Thread Christian Heimes
Christian Heimes added the comment: Serhiy, could you please rebase your PR to tip of main branch? I'd like to try it out. -- nosy: +christian.heimes versions: +Python 3.11, Python 3.9 ___ Python tracker

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2020-06-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2018-08-25 Thread Xiang Zhang
Xiang Zhang added the comment: I miss that. So this change seems to be user transparent and make more sense then. -- nosy: +vstinner ___ Python tracker ___

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2018-08-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Numerical values of signal numbers are standardized. signal.signal(15, handler) is valid. SIGTERM is just a handy name for the constant 15. But SIG_DFL and SIG_IGN are not integers in C (they are special pointers), and it is not declared anywhere that

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2018-08-25 Thread Xiang Zhang
Xiang Zhang added the comment: I'm afraid this could break old codes so not sure it's worth or not. I've seen code like `SIGTERM = 15; signal.signal(SIGTERM, handler)`. I won't be surprised to see a handcraft SIG_DFL/IGN. -- nosy: +xiang.zhang versions: +Python 3.8 -Python 3.5

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2018-08-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +8393 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2015-07-21 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: -ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23325 ___ ___ Python-bugs-list

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2015-03-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Currently the action parameter of signal.signal() can be SIG_DFL, SIG_IGN, or a callable Python object. Would be just a callable Python object. This is simpler. The main benefit is that they will be better look in pydoc output. --

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2015-03-19 Thread Ethan Furman
Ethan Furman added the comment: Thanks for the explanation, point taken. However, it seems to me that changing the type of the constants from 'int' to 'function' is backwards incompatible, will break code, and is probably not worth it (and would require a deprecation period if it was worth

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2015-03-17 Thread Ethan Furman
Ethan Furman added the comment: A private method is being added to Enum to better support Enum replacement of constants, part of which includes changing __reduce_ex__ to return the string of the name. These changes answer points 1 and 4. Point 2 would be nice, but seems somewhat less

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2015-01-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In C the SIG_DFL and SIG_IGN macros expand into integral expressions that are not equal to an address of any function. In Python they are int objects with platform depended values. Second argument of the signal() function should be SIG_DFL, SIG_IGN, or a