
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2014-02-11 19:22 bypitrou, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| sys_at_exit.py | vstinner,2015-03-09 09:31 | |||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 8096 | merged | ZackerySpytz,2018-07-04 22:59 | |
| Messages (10) | |||
|---|---|---|---|
| msg211001 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2014-02-11 19:22 | |
For some reason they are wiped to fix so-called reference leaks:http://hg.python.org/cpython/rev/9639a73afa47/This changeset is one of the culprits of the problems inissue19255. | |||
| msg237604 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2015-03-09 08:41 | |
I don't understand this bug report. Can you elaborate? What is the current behaviour? What is the expected behaviour? | |||
| msg237617 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2015-03-09 09:20 | |
The behaviour is explained in the subject line and in the linked changeset: for some reason sys.flags and sys.float_info are explicitly wiped during shutdown. But those are simple immutable objects, there is no reason to wipe them.The expected behaviour is, of course, that those objects keep their proper value during shutdown (e.g. when looked up from destructors). | |||
| msg237620 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2015-03-09 09:31 | |
sys_at_exit.py: script to reproduce the issue.The changeset9639a73afa47 explicitly added sys.flags and sys.float_info to sys_deletes, list of symbols that must be cleared at exit.So if I understand correctly the issue, the question is why the change was made. Antoine wants to keep these symbols alive during Python shutdown. | |||
| msg237621 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2015-03-09 09:32 | |
@Antoine: Can you maybe propose a patch to fix this issue?I see that you selected Python 3.4 & 3.5. Why Python 3.4 and not 2.7? (Maybe fixing Python 3.5 is enough?) | |||
| msg237622 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2015-03-09 09:32 | |
I really don't care about 2.7 for minor fixes is the reason why :-)(also, I don't know if the bug exists there in the first place) | |||
| msg321071 -(view) | Author: Zackery Spytz (ZackerySpytz)*![]() | Date: 2018-07-05 03:42 | |
This behaviour is present in 2.7. | |||
| msg331426 -(view) | Author: Zackery Spytz (ZackerySpytz)*![]() | Date: 2018-12-09 12:34 | |
Ping. | |||
| msg343970 -(view) | Author: Petr Viktorin (petr.viktorin)*![]() | Date: 2019-05-30 11:08 | |
New changeset249b7d59d8038f9017fc95dc28a3ce3494aaf832 by Petr Viktorin (Zackery Spytz) in branch 'master':bpo-20602: Do not clear sys.flags and sys.float_info during shutdown (GH-8096)https://github.com/python/cpython/commit/249b7d59d8038f9017fc95dc28a3ce3494aaf832 | |||
| msg344323 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-06-02 21:31 | |
Honestly, I'm not sure that this issue is really a major bug. I don't think that it's worth it to backport the change. It's more a subtle change in Python finalization which is super fragile code. I prefer to only change the master branch, so I close the issue. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:58 | admin | set | github: 64801 |
| 2019-06-02 21:31:33 | vstinner | set | status: open -> closed resolution: fixed messages: +msg344323 stage: patch review -> resolved |
| 2019-05-30 11:08:36 | petr.viktorin | set | nosy: +petr.viktorin messages: +msg343970 |
| 2018-12-09 12:34:21 | ZackerySpytz | set | messages: +msg331426 |
| 2018-07-05 03:42:09 | ZackerySpytz | set | nosy: +ZackerySpytz messages: +msg321071 versions: + Python 2.7, Python 3.6, Python 3.7, Python 3.8, - Python 3.4, Python 3.5 |
| 2018-07-04 22:59:54 | ZackerySpytz | set | keywords: +patch stage: patch review pull_requests: +pull_request7695 |
| 2015-03-09 09:32:45 | pitrou | set | messages: +msg237622 |
| 2015-03-09 09:32:05 | vstinner | set | messages: +msg237621 |
| 2015-03-09 09:31:24 | vstinner | set | files: +sys_at_exit.py messages: +msg237620 |
| 2015-03-09 09:20:55 | pitrou | set | messages: +msg237617 |
| 2015-03-09 08:41:41 | vstinner | set | messages: +msg237604 |
| 2015-03-09 08:26:32 | BreamoreBoy | set | versions: + Python 3.5 |
| 2014-02-12 17:45:23 | vstinner | set | nosy: +vstinner |
| 2014-02-11 19:22:01 | pitrou | create | |