[issue24916] In sysconfig, don't rely on sys.version format

2020-03-21 Thread STINNER Victor


STINNER Victor  added the comment:

Since this issue has been closed, I closed PR 10321 and PR 18487.

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2020-03-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 684d2b9a071fa8e54749e0eec3c16aafcd642ed4 by Serhiy Storchaka in 
branch 'master':
bpo-24916: Remove an outdated comment. (GH-19101)
https://github.com/python/cpython/commit/684d2b9a071fa8e54749e0eec3c16aafcd642ed4


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2020-03-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2020-03-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +18461
pull_request: https://github.com/python/cpython/pull/19101

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2020-03-17 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2020-03-17 Thread Thomas Kluyver


Thomas Kluyver  added the comment:

Serhiy, I think you fixed the part that was actually likely to cause problems a 
few years ago in issue #25985 & commit 885bdc4946890f4bb80557fab80c3874b2cc4d39 
. Using sys.version[:3] to get a short version like 3.8 was what I wanted to 
fix.

People are presumably still trying to change the other bits because there's 
still a FIXME comment. If we're happy with the current code, I think we can 
remove that comment and close the issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What is the problem with the current code?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2020-02-12 Thread STINNER Victor


STINNER Victor  added the comment:

The "py_version" variable of sysconfig is discussed since 2015 but... it's 
unused. It is supposed to build paths. Does it really make sense to build a 
path which contains "+"? It can confuse some application which may associate a 
special meaning to "+".

What about simply removing this variable? Does anyone know if it's used in the 
wild?

To me it sounds surprising to have a different path for alpha, beta and release 
candidate releases. Usually, Python paths only contain MAJOR.MINOR versions, no 
alpha, beta or rc marker. Nor "+" marker.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2020-02-12 Thread Daniel Bengtsson


Change by Daniel Bengtsson :


--
pull_requests: +17860
pull_request: https://github.com/python/cpython/pull/18487

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2018-11-04 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Following up on 
https://github.com/python/cpython/pull/10321#discussion_r230604393 I would like 
to summarise here what's been going on, in order to move the discussion here 
forward. I've tried to make a PR for this issue, in which _PY_VERSION in 
Lib/sysconfig.py and py_version in Lib/distutils/command/install.py are updated 
to get their value from sys.version_info instead of sys.version. This PR 
removes the '+' from both so the issue remains, if we want to keep the '+' info 
or not.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2018-11-04 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +9623

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2018-10-31 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

I'm working on changing _PY_VERSION to get its value from sys.version_info 
instead of sys.version, but I am not sure what the best way is to map between a 
release stage to the corresponding letter(release->rc). Could someone help me a 
tiny bit with this one?

--
nosy: +lys.nikolaou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2018-10-28 Thread Ned Deily


Ned Deily  added the comment:

Noted in passing: while Lib/distutils/sysconfig.py has not implemented 
"py_version", I see now that Lib/distutils/command/install.py does have 
something very similar to Lib/sysconfig.py so whatever (if anything) is changed 
in one should also be changed in the other.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2016-02-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Most changes were committed in issue25985. Only _PY_VERSION is left. I have no 
strong opinion about this, but +0 for keeping "+".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2016-02-10 Thread Ned Deily

Ned Deily added the comment:

My understanding is that the "+" is added to the PY_VERSION in 
Include/patchlevel.h by the release management process after any tagged 
release, whether pre-release or final.  So '+" is supposed to be set whenever 
CPython is built from anything other than an official tagged revision.  AFAICT, 
"py_version" and friends were added to sysconfig when sysconfig was initially 
moved out of distutils (in fa69e891edf4) to become its own standalone module as 
part of the last big set of distutils enhancements which were later largely 
reverted, ending up with two versions of sysconfig: the newer standalone 
sysconfig.py and with the older distutils/sysconfig.py.  It appears 
"py_version" and friends have never been implemented in the 
distutils/sysconfig.py so it's likely that they aren't used much in the wild 
but it would be nice to not break the current compatibility.  Perhaps expanding 
sys.version_info to contain the "modified" (?) ("+") field would be a good idea 
or possibly adding a new value to
  "releaselevel".  As it currently stands:

$ /usr/local/bin/python3.5
Python 3.5.1 (v3.5.1:37a07cee5969, Dec  5 2015, 21:12:44)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version
'3.5.1 (v3.5.1:37a07cee5969, Dec  5 2015, 21:12:44) \n[GCC 4.2.1 (Apple Inc. 
build 5666) (dot 3)]'
>>> sys.version_info
sys.version_info(major=3, minor=5, micro=1, releaselevel='final', serial=0)

$ ./python
Python 3.5.1+ (default, Feb 11 2016, 14:00:02)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version_info
sys.version_info(major=3, minor=5, micro=1, releaselevel='final', serial=0)
>>> sys.version
'3.5.1+ (default, Feb 11 2016, 14:00:02) \n[GCC 4.2.1 Compatible Apple LLVM 
7.0.2 (clang-700.1.81)]'

It seems wrong that one cannot use sys.version_info to distinguish between a 
release build and a post-release development build.  

I'm nosying Georg and Benjamin for institutional memory picking.

--
nosy: +benjamin.peterson, georg.brandl, ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2016-02-10 Thread Martin Panter

Martin Panter added the comment:

I just added the dependency to reflect that the patch here will need updating.

The main concern here is Thomas’s question: does it matter that py_version 
loses prerelease info?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2016-02-10 Thread STINNER Victor

STINNER Victor added the comment:

@Serhiy: Can you please take a look since this issue now depends on your issue 
#25985?

--
nosy: +haypo, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2016-02-08 Thread Martin Panter

Martin Panter added the comment:

Issue 25985 also touches the _PY_VERSION_SHORT parts of this.

--
dependencies: +Use sys.version_info instead of sys.version
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24916] In sysconfig, don't rely on sys.version format

2015-08-22 Thread Thomas Kluyver

New submission from Thomas Kluyver:

sysconfig currently calculates various formats of the Python version number by 
chopping up the sys.version string. This has a FIXME by it in the code, because 
the the format of sys.version is not guaranteed.

With this patch, the config variables 'py_version', 'py_version_short' and 
'py_version_nodot' are instead generated from sys.version_info, which has a 
specified structure:
https://docs.python.org/3/library/sys.html#sys.version_info

One piece of information is lost by this change: after a pre-release, a + is 
added to the version string - e.g. '3.5.0b4+' means an unreleased version 
somewhere after 3.5.0b4. I can't find any structured representation of this 
information, so 'py_version' no longer contains it. I'm not sure whether it 
matters: I can't find anything using the 'py_version' config variable.

--
components: Library (Lib)
files: sysconfig-version-fixme.patch
keywords: patch
messages: 248989
nosy: takluyver
priority: normal
severity: normal
status: open
title: In sysconfig, don't rely on sys.version format
Added file: http://bugs.python.org/file40227/sysconfig-version-fixme.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com