Skip to content

Commit

Permalink
- switch Python 3.12 to non-future and change with-future-python beha…
Browse files Browse the repository at this point in the history
…vior
  • Loading branch information
dataflake committed Oct 5, 2023
1 parent 8f22a5d commit a63b5ce
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 22 deletions.
8 changes: 5 additions & 3 deletions config/c-code/manylinux-install.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ yum -y install libffi-devel
tox_env_map() {
case $1 in
{% if with_future_python %}
*"cp312"*) echo 'py312';;
*"cp313"*) echo 'py313';;
{% endif %}
*"cp37"*) echo 'py37';;
*"cp38"*) echo 'py38';;
*"cp39"*) echo 'py39';;
*"cp310"*) echo 'py310';;
*"cp311"*) echo 'py311';;
*"cp312"*) echo 'py312';;
*) echo 'py';;
esac
}
Expand All @@ -45,15 +46,16 @@ tox_env_map() {
for PYBIN in /opt/python/*/bin; do
if \
{% if with_future_python %}
[[ "${PYBIN}" == *"cp312"* ]] || \
[[ "${PYBIN}" == *"cp313"* ]] || \
{% endif %}
[[ "${PYBIN}" == *"cp311"* ]] || \
[[ "${PYBIN}" == *"cp312"* ]] || \
[[ "${PYBIN}" == *"cp37"* ]] || \
[[ "${PYBIN}" == *"cp38"* ]] || \
[[ "${PYBIN}" == *"cp39"* ]] || \
[[ "${PYBIN}" == *"cp310"* ]] ; then
{% if with_future_python %}
if [[ "${PYBIN}" == *"cp312"* ]] ; then
if [[ "${PYBIN}" == *"cp313"* ]] ; then
"${PYBIN}/pip" install --pre -e /io/
"${PYBIN}/pip" wheel /io/ --pre -w wheelhouse/
else
Expand Down
3 changes: 2 additions & 1 deletion config/c-code/tox.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ envlist =
py39,py39-pure
py310,py310-pure
py311,py311-pure
{% if with_future_python %}
py312,py312-pure
{% if with_future_python %}
py313,py313-pure
{% endif %}
{% if with_pypy %}
pypy3
Expand Down
7 changes: 5 additions & 2 deletions config/config-package.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
Generated from:
https://github.com/zopefoundation/meta/tree/master/config/{config_type}
--> """
FUTURE_PYTHON_VERSION = "3.12.0-rc.3"
FUTURE_PYTHON_VERSION = ""
DEFAULT = object()


Expand Down Expand Up @@ -226,7 +226,10 @@ def with_pypy(self):

@cached_property
def with_future_python(self):
return self._set_python_config_value('future-python')
if FUTURE_PYTHON_VERSION:
return self._set_python_config_value('future-python')
else:
return False

@cached_property
def with_docs(self):
Expand Down
6 changes: 4 additions & 2 deletions config/default/tests.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ jobs:
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["3.12", "py312"]
{% if with_future_python %}
- ["%(future_python_version)s", "py312"]
- ["%(future_python_version)s", "py313"]
{% endif %}
{% if with_pypy %}
- ["pypy-3.9", "pypy3"]
Expand Down Expand Up @@ -75,7 +76,8 @@ jobs:
# macOS/Python 3.11+ is set up for universal2 architecture
# which causes build and package selection issues.
- { os: ["macos", "macos-11"], config: ["3.11", "py311"] }
- { os: ["macos", "macos-11"], config: ["%(future_python_version)s", "py312"] }
- { os: ["macos", "macos-11"], config: ["3.12", "py312"] }
- { os: ["macos", "macos-11"], config: ["%(future_python_version)s", "py313"] }
{% endif %}
{% for line in gha_additional_exclude %}
%(line)s
Expand Down
3 changes: 2 additions & 1 deletion config/default/tox-envlist.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ envlist =
py39
py310
py311
{% if with_future_python %}
py312
{% if with_future_python %}
py313
{% endif %}
{% if with_pypy %}
pypy3
Expand Down
8 changes: 3 additions & 5 deletions config/default/tox-testenv.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package = wheel
wheel_build_env = .pkg
{% endif %}
{% if with_future_python %}
pip_pre = py312: true
pip_pre = py313: true
{% endif %}
deps =
{% for line in testenv_deps %}
Expand All @@ -15,16 +15,14 @@ deps =
{% if with_sphinx_doctests and with_future_python %}
Sphinx
{% endif %}
{% if testenv_setenv or with_future_python %}
setenv =
{% if testenv_setenv %}
{% for line in testenv_setenv %}
%(line)s
{% endfor %}
{% if with_future_python %}
{% endif %}
py312: VIRTUALENV_PIP=23.1.2
py312: PIP_REQUIRE_VIRTUALENV=0
{% endif %}
{% endif %}
{% if testenv_commands_pre %}
commands_pre =
{% for line in testenv_commands_pre %}
Expand Down
6 changes: 2 additions & 4 deletions config/toolkit/tox.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ deps =
{% for line in testenv_deps %}
%(line)s
{% endfor %}
{% if testenv_setenv or with_future_python %}
setenv =
{% if testenv_setenv %}
{% for line in testenv_setenv %}
%(line)s
{% endfor %}
{% if with_future_python %}
{% endif %}
py312: VIRTUALENV_PIP=23.1.2
py312: PIP_REQUIRE_VIRTUALENV=0
{% endif %}
{% endif %}
commands_pre =
{% if testenv_commands_pre %}
{% for line in testenv_commands_pre %}
Expand Down
6 changes: 2 additions & 4 deletions config/zope-product/tox.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ deps =
{% for line in testenv_deps %}
%(line)s
{% endfor %}
{% if testenv_setenv or with_future_python %}
setenv =
{% if testenv_setenv %}
{% for line in testenv_setenv %}
%(line)s
{% endfor %}
{% if with_future_python %}
{% endif %}
py312: VIRTUALENV_PIP=23.1.2
py312: PIP_REQUIRE_VIRTUALENV=0
{% endif %}
{% endif %}
commands_pre =
{% if testenv_commands_pre %}
{% for line in testenv_commands_pre %}
Expand Down

0 comments on commit a63b5ce

Please sign in to comment.