[issue35346] Modernize Lib/platform.py code

2018-12-14 Thread STINNER Victor
STINNER Victor added the comment: I close the issue. I made that changes that I wanted :-) Serhiy: reopen the issue or open a new one if you want to remove the try/except ImportError around "import plistlib". -- dependencies: -Problems with handling the file command output in

[issue35346] Modernize Lib/platform.py code

2018-12-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4aa917c5feaec07a6f6db87b34185ab6180e20ee by Victor Stinner in branch 'master': bpo-35346: Cleanup platform.architecture() (GH-11130) https://github.com/python/cpython/commit/4aa917c5feaec07a6f6db87b34185ab6180e20ee --

[issue35346] Modernize Lib/platform.py code

2018-12-12 Thread STINNER Victor
STINNER Victor added the comment: > Top-imported warnings is not used. Fixed by commit b8e689a6e8134e88f857a55e50b6a4977967e385. > struct.calcsize('P') is always success. I wrote PR 11130 for that. Note: struct.calcsize('P') always works on Python 2.7 as well. > plistlib is always

[issue35346] Modernize Lib/platform.py code

2018-12-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +10361 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35346] Modernize Lib/platform.py code

2018-12-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset b0e0877629e3df4bc3042fd424e96f197b2e9fa4 by Victor Stinner in branch 'master': bpo-35346: Drop Mac OS 9 support from platform (GH-10959) https://github.com/python/cpython/commit/b0e0877629e3df4bc3042fd424e96f197b2e9fa4 --

[issue35346] Modernize Lib/platform.py code

2018-12-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3a521f0b6167628f975c773b56c7daf8d33d6f40 by Victor Stinner in branch 'master': bpo-35346, platform: replace os.popen() with subprocess (GH-10786) https://github.com/python/cpython/commit/3a521f0b6167628f975c773b56c7daf8d33d6f40 --

[issue35346] Modernize Lib/platform.py code

2018-12-05 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +10205 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35346] Modernize Lib/platform.py code

2018-12-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset b8e689a6e8134e88f857a55e50b6a4977967e385 by Victor Stinner in branch 'master': bpo-35346, platform: import subprocess in _syscmd_file() (GH-10892) https://github.com/python/cpython/commit/b8e689a6e8134e88f857a55e50b6a4977967e385 --

[issue35346] Modernize Lib/platform.py code

2018-12-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +10131 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35346] Modernize Lib/platform.py code

2018-12-03 Thread STINNER Victor
STINNER Victor added the comment: Another issue with Python 2 compatibility (I addition to platform.dist() removal) of Lib/platform.py from master: it uses re.ASCII which doesn't exist in Python 2.7. -- ___ Python tracker

[issue35346] Modernize Lib/platform.py code

2018-11-29 Thread STINNER Victor
STINNER Victor added the comment: > Now in order to keep the module more or less up-to-date, it still > required regular updates, so the plan was to have it updated in the > current versions of Python, but allow it to be used in older Python > versions as well. That was the compromise to have

[issue35346] Modernize Lib/platform.py code

2018-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ok, let me add some history here: When I created the platform module it was clear that this would be a module which will frequently need updates, since platforms evolve faster than Python does. I had developed this with a larger number of contributors

[issue35346] Modernize Lib/platform.py code

2018-11-29 Thread STINNER Victor
STINNER Victor added the comment: > Please keep Python 2.7 compatibility. It should be possible to copy the > module back into Python 2.7 and use it there. I don't understand why someone would like to copy Lib/platform.py from the master branch to Python 2.7? Python 2.7 already provides the

[issue35346] Modernize Lib/platform.py code

2018-11-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please keep Python 2.7 compatibility. It should be possible to copy the module back into Python 2.7 and use it there. This is not hard to do and allows it to fulfill its purpose as platform detection module even while part of the stdlib. --

[issue35346] Modernize Lib/platform.py code

2018-11-29 Thread STINNER Victor
STINNER Victor added the comment: > Should we keep compatibility with 2.7? I don't think that the master branch (Python 3.8) has to be compatible with Python 2.7. -- ___ Python tracker

[issue35346] Modernize Lib/platform.py code

2018-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: While we are here, look at other outdated code: * Top-imported warnings is not used. * struct.calcsize('P') is always success. * plistlib is always available. Should we keep compatibility with 2.7? -- nosy: +serhiy.storchaka

[issue35346] Modernize Lib/platform.py code

2018-11-29 Thread Brett Cannon
Brett Cannon added the comment: It's because the module was originally kept compatible with Python 1.5.2: https://www.python.org/dev/peps/pep-0291/#backward-compatible-packages-modules-and-tools -- nosy: +brett.cannon ___ Python tracker

[issue35346] Modernize Lib/platform.py code

2018-11-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +Problems with handling the file command output in platform.architecture() ___ Python tracker ___

[issue35346] Modernize Lib/platform.py code

2018-11-28 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +10030 stage: -> patch review ___ Python tracker ___ ___

[issue35346] Modernize Lib/platform.py code

2018-11-28 Thread STINNER Victor
New submission from STINNER Victor : Lib/platform.py still contains code to support Python 2.3. It's maybe time to modernize it. platform imports subprocess since commit fc990e942fb55be78e8352f4913749e91cac381d. The two calls to os.popen() can now be replaced with subprocess.Popen.