Issue 31826: Misleading __version__ attribute of modules in standard library
Created on 2017-10-20 13:21 by abukaj, last changed 2022-04-11 14:58 by admin.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 17977 | merged | cjw296, 2020-02-04 09:27 | |
| Messages (7) | |||
|---|---|---|---|
| msg304654 - (view) | Author: Jakub Mateusz Dzik (abukaj) | Date: 2017-10-20 13:21 | |
Several modules of the standard library (at least `re` and `csv`) have `__version__` strings.
The string is the same for Python 2.7-3.6:
>>> import re, csv; print(re.__version__, csv.__version__)
2.2.1 1.0
while documentation indicates changes in the modules.
Semantic versioning (recommended by PEP 440) suggests that at least minor version should change in such case.
I suspect it to be a "code fossil" which may be removed according to PEP 396.
|
|||
| msg304763 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2017-10-22 21:26 | |
I would support just removing the version attributes for csv and re. |
|||
| msg304765 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2017-10-22 21:27 | |
+1 for removing __version__ on all stdlib modules which are not externally maintained. |
|||
| msg304779 - (view) | Author: Alyssa Coghlan (ncoghlan) * ![]() |
Date: 2017-10-23 03:56 | |
+1 from me for dropping these, and noting which modules were affected in the Porting section of the 3.7 What's New (I'd be surprised if anyone was depending on them existing, but it doesn't hurt to mention it, and may help if someone is trying to figure out what changed) |
|||
| msg304780 - (view) | Author: Raymond Hettinger (rhettinger) * ![]() |
Date: 2017-10-23 06:15 | |
Please do leave version in the decimal module where it has a precise meaning, tracking a particular version of the spec that was implemented and tested. |
|||
| msg304823 - (view) | Author: Éric Araujo (eric.araujo) * ![]() |
Date: 2017-10-23 17:04 | |
The version in distutils is derived from sys.version and should be left as is too. Thanks! |
|||
| msg361340 - (view) | Author: Petr Viktorin (petr.viktorin) * ![]() |
Date: 2020-02-04 09:27 | |
PR for removing __version__ from mock: https://github.com/python/cpython/pull/17977 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:53 | admin | set | github: 76007 |
| 2020-02-04 10:54:36 | cryvate | set | nosy:
+ cryvate |
| 2020-02-04 09:32:47 | petr.viktorin | set | stage: patch review -> needs patch |
| 2020-02-04 09:27:22 | cjw296 | set | keywords:
+ patch stage: patch review pull_requests: + pull_request17717 |
| 2020-02-04 09:27:07 | petr.viktorin | set | nosy:
+ petr.viktorin messages: + msg361340 |
| 2017-10-23 17:04:40 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg304823 |
| 2017-10-23 06:15:42 | rhettinger | set | messages: + msg304780 |
| 2017-10-23 03:56:14 | ncoghlan | set | messages: + msg304779 |
| 2017-10-22 21:27:44 | pitrou | set | nosy:
+ pitrou messages:
+ msg304765 |
| 2017-10-22 21:26:10 | rhettinger | set | nosy:
+ rhettinger, ncoghlan messages: + msg304763 |
| 2017-10-20 19:04:30 | terry.reedy | set | nosy:
+ barry, serhiy.storchaka versions: + Python 3.7, - Python 3.4, Python 3.5 |
| 2017-10-20 13:21:04 | abukaj | create | |
