Skip to content

Commit

Permalink
Problem: python310 condition missing
Browse files Browse the repository at this point in the history
Solution: implement and document it
  • Loading branch information
gotcha committed Dec 2, 2021
1 parent cf6faa9 commit 2b6995c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/topics/variables-extending-and-substitutions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ python36 True if running Python 3.6
python37 True if running Python 3.7
python38 True if running Python 3.8
python39 True if running Python 3.9
python310 True if running Python 3.10
sys_version ``sys.version.lower()``
pypy True if running PyPy
jython True if running Jython
Expand Down
2 changes: 1 addition & 1 deletion src/zc/buildout/buildout.py
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ def _default_globals():

# minor python major_python_versions as python24, python25 ... python39
minor_python_versions = ('24', '25', '26', '27',
'30', '31', '32', '33', '34', '35', '36', '37', '38', '39')
'30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '310')
for v in minor_python_versions:
globals_defs['python' + v] = ''.join(major_python_versions[:2]) == v

Expand Down
2 changes: 1 addition & 1 deletion src/zc/buildout/tests/configparser.test
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ called by buildout::

# major and minor python versions, yes even python 3.5 and 3.6 are there , prospectively
# comment: this expression "is true" and not that long expression cannot span several lines
[s2: any([python2, python3, python24 , python25 , python26 , python27 , python30 , python31 , python32 , python33 , python34 , python35 , python36, python37, python38,python39]) ]
[s2: any([python2, python3, python24 , python25 , python26 , python27 , python30 , python31 , python32 , python33 , python34 , python35 , python36, python37, python38, python39, python310]) ]
b = 1

# common python interpreter types
Expand Down

0 comments on commit 2b6995c

Please sign in to comment.