Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Python 3.12. #53

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
resource_class: arm.medium
steps:
- run:
name: Install Python 3.11
name: Install Python 3.12
command: |
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt update
sudo apt install -y python3.11-dev python3.11-venv python3.11-distutils
sudo apt install -y python3.12-dev python3.12-venv python3.12-distutils
- run:
name: Setup Nox
command: |
python3.11 -m venv ~/bin/nox.venv
python3.12 -m venv ~/bin/nox.venv
~/bin/nox.venv/bin/pip install nox
cd ~/bin
ln -s nox.venv/bin/nox
Expand All @@ -60,15 +60,15 @@ jobs:
resource_class: arm.medium
steps:
- run:
name: Install Python 3.11
name: Install Python 3.12
command: |
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt update
sudo apt install -y python3.11-dev python3.11-venv python3.11-distutils
sudo apt install -y python3.12-dev python3.12-venv python3.12-distutils
- run:
name: Setup Nox
command: |
python3.11 -m venv ~/bin/nox.venv
python3.12 -m venv ~/bin/nox.venv
~/bin/nox.venv/bin/pip install nox
cd ~/bin
ln -s nox.venv/bin/nox
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
env:
SCIENCE_AUTH_API_GITHUB_COM_BEARER: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Setup Python 3.11
- name: Setup Python 3.12
uses: actions/setup-python@v4
if: matrix.os != 'macos-13-aarch64'
with:
python-version: 3.11
python-version: 3.12
- name: Setup Nox
run: pip install nox
- name: Checkout Lift
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/doc-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Setup Python 3.11
- name: Setup Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12
- name: Setup Nox
run: pip install nox
- name: Checkout Lift
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ jobs:
env:
SCIENCE_AUTH_API_GITHUB_COM_BEARER: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Setup Python 3.11
- name: Setup Python 3.12
uses: actions/setup-python@v4
if: matrix.os != 'macos-13-aarch64'
with:
python-version: 3.11
python-version: 3.12
- name: Setup Nox
run: pip install nox
- name: Checkout lift ${{ needs.determine-tag.outputs.release-tag }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Thank you in advance for your time and effort.
## Development Environment

You'll need just a few tools to hack on the scie-jump:
+ A Python 3.11 interpreter
+ A Python 3.12 interpreter
+ The [`nox`](https://nox.thea.codes/en/stable/) tool.

## Development Cycle
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ your $PATH somewhere.
The binaries are released via [GitHub Releases](https://github.com/a-scie/lift/releases)
for Windows x86_64 and Linux and macOS for both aarch64 and x86_64. For each of these platforms
there are two varieties, "thin" and "fat". The "fat" varieties are named `science-fat-*`, include
a hermetic CPython 3.11 distribution from the [Python Build Standalone]() project and are larger as
a result. The "thin" varieties have the CPython 3.11 distribution gouged out and are smaller as a
a hermetic CPython 3.12 distribution from the [Python Build Standalone]() project and are larger as
a result. The "thin" varieties have the CPython 3.12 distribution gouged out and are smaller as a
result. In its place a [`ptex`](https://github.com/a-scie/ptex) binary is included that fills in the
CPython 3.11 distribution by fetching it when the "thin" `science` binary is first run.
CPython 3.12 distribution by fetching it when the "thin" `science` binary is first run.

I run on Linux x86_64; so I install a stable release like so:
```
Expand All @@ -45,4 +45,4 @@ build instructions there.
## Contribute

See the [contribution guide](CONTRIBUTING.md) if you're interested in hacking on `science` or
improving its documentation.
improving its documentation.
44 changes: 26 additions & 18 deletions complete-platform.windows-amd64-py3.11.json → complete-platform.windows-amd64-py3.12.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
{
"marker_environment": {
"implementation_name": "cpython",
"implementation_version": "3.11.0",
"os_name": "nt",
"platform_machine": "AMD64",
"platform_python_implementation": "CPython",
"platform_release": "10",
"platform_system": "Windows",
"platform_version": "10.0.22621",
"python_full_version": "3.11.0",
"python_version": "3.11",
"sys_platform": "win32"
},
"path": "C:\\Program Files\\Python312\\python.exe",
"version": "3.12.0",
"requirement": "CPython==3.12.0",
"platform": "win_amd64-cp-3.12.0-cp312",
"venv": false,
"compatible_tags": [
"cp311-cp311-win_amd64",
"cp312-cp312-win_amd64",
"cp312-abi3-win_amd64",
"cp312-none-win_amd64",
"cp311-abi3-win_amd64",
"cp311-none-win_amd64",
"cp310-abi3-win_amd64",
"cp39-abi3-win_amd64",
"cp38-abi3-win_amd64",
Expand All @@ -25,8 +18,9 @@
"cp34-abi3-win_amd64",
"cp33-abi3-win_amd64",
"cp32-abi3-win_amd64",
"py311-none-win_amd64",
"py312-none-win_amd64",
"py3-none-win_amd64",
"py311-none-win_amd64",
"py310-none-win_amd64",
"py39-none-win_amd64",
"py38-none-win_amd64",
Expand All @@ -38,8 +32,9 @@
"py32-none-win_amd64",
"py31-none-win_amd64",
"py30-none-win_amd64",
"py311-none-any",
"py312-none-any",
"py3-none-any",
"py311-none-any",
"py310-none-any",
"py39-none-any",
"py38-none-any",
Expand All @@ -51,5 +46,18 @@
"py32-none-any",
"py31-none-any",
"py30-none-any"
]
],
"marker_environment": {
"implementation_name": "cpython",
"implementation_version": "3.12.0",
"os_name": "nt",
"platform_machine": "AMD64",
"platform_python_implementation": "CPython",
"platform_release": "11",
"platform_system": "Windows",
"platform_version": "10.0.22621",
"python_full_version": "3.12.0",
"python_version": "3.12",
"sys_platform": "win32"
}
}
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@
"sphinx_click",
]

# N.B.: Order is critical here for Sphinx to find our custom directive generated content, which
# resides in `.md` files.
# See: https://www.sphinx-doc.org/en/master/_modules/sphinx/project.html#Project.doc2path
source_suffix = {
".rst": "restructuredtext",
".md": "markdown",
".rst": "restructuredtext",
}

templates_path = [
Expand Down
10 changes: 5 additions & 5 deletions lift.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ description = "Ship your interpreted executables using science."
[[lift.interpreters]]
id = "cpython"
provider = "PythonBuildStandalone"
release = "20230826"
version = "3.11.5"
# By default science ships as a "thin" scie that fetches CPython 3.11 on first run.
release = "20231002"
version = "3.12.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that it matters for this PR - but worth noting to anyone who uses Python 3.12 later.

https://github.com/indygreg/python-build-standalone/releases/tag/20231002

CPython 3.12.0 now supported. These distributions should be considered beta quality since it is their initial release and typically there are both upstream bugs and bugs in our packaging in the initial release. So exercise caution before deploying to production.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I wanted to get on the test train early - someone has to. CI (nox) fully dogfoods; so I'm confident science is still production ready for the next release.

# By default science ships as a "thin" scie that fetches CPython 3.12 on first run.
# We use `science lift --invert-lazy cpython ...` when producing "fat" scies.
lazy = true

Expand All @@ -24,7 +24,7 @@ name = "docsite"
name = "science.pyz"

[[lift.commands]]
# This selects the `python` binary from within the CPython 3.11 interpreter distribution
# This selects the `python` binary from within the CPython 3.12 interpreter distribution
# (a tarball) provided by PythonBuildStandalone above.
exe = "#{cpython:python}"
args = [
Expand All @@ -33,7 +33,7 @@ args = [

[lift.commands.env]
# We strip any ambient SHIV_* env vars and set the SHIV_ROOT to ensure hermetic operation. Although
# `science` is a Python 3.11 shiv zipapp application under the covers; this should be opaque to the
# `science` is a Python 3.12 shiv zipapp application under the covers; this should be opaque to the
# end user. For their puposes `science` is just a native binary.
remove_re = [
"SHIV_.*",
Expand Down
Loading