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

Python3.12 #5722

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.12"

python:
install:
Expand Down
2 changes: 1 addition & 1 deletion docs/HOSTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

## Requirements

- Python 3.9
- Python 3.12
- PostgreSQL >= 10

On top of that, an object storage service is required in order to store the encrypted data blocks.
Expand Down
8 changes: 4 additions & 4 deletions docs/development/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To start hacking, follow the basic steps detailed below:

> Replace `C:/Strawberry/perl/bin/perl` with the correct installation path.

4. [`python v3.9`](https://www.python.org/)
4. [`python v3.12`](https://www.python.org/)

To install the correct python version, we use `pyenv` instead of relaying on a system package:

Expand Down Expand Up @@ -93,7 +93,7 @@ To start hacking, follow the basic steps detailed below:

```shell
# Install a specific Python version
pyenv install 3.9.10
pyenv install 3.12.0
```

5. [`poetry >=1.5.1`](https://python-poetry.org/docs/#installation)
Expand All @@ -116,10 +116,10 @@ To start hacking, follow the basic steps detailed below:

```shell
# Create the project virtual with the correct version of Python
poetry env use $(pyenv prefix 3.9.10)/bin/python -C server/pyproject.toml
poetry env use $(pyenv prefix 3.12.0)/bin/python -C server/pyproject.toml
```

> If you don't have installed `python` with `pyenv`, you need to replace `$(pyenv prefix 3.9.10)/bin/python` with the path where the python you want to use is located.
> If you don't have installed `python` with `pyenv`, you need to replace `$(pyenv prefix 3.12.0)/bin/python` with the path where the python you want to use is located.

## Hacking the Python server

Expand Down
51 changes: 13 additions & 38 deletions docs/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.9.10"
python = "^3.12.0"
sphinx = "<8.0.0"
sphinx-intl = "^2.1.0"
sphinx-rtd-theme = "^1.2.0"
Expand Down
2 changes: 1 addition & 1 deletion misc/version_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Tool(enum.Enum):

TOOLS_VERSION: Dict[Tool, str] = {
Tool.Rust: "1.71.1",
Tool.Python: "3.9.10",
Tool.Python: "3.12.0",
Tool.Poetry: "1.5.1",
Tool.Node: "18.12.0",
Tool.WasmPack: "0.11.0",
Expand Down
6 changes: 3 additions & 3 deletions server/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def build() -> None:
run("patchelf --version")

if sys.platform == "win32":
libparsec_path = "parsec/_parsec.cp39-win_amd64.pyd"
libparsec_path = "parsec/_parsec.cp312-win_amd64.pyd"
elif sys.platform == "darwin":
libparsec_path = "parsec/_parsec.cpython-39-darwin.so"
libparsec_path = "parsec/_parsec.cpython-312-darwin.so"
else:
libparsec_path = "parsec/_parsec.cpython-39-x86_64-linux-gnu.so"
libparsec_path = "parsec/_parsec.cpython-312-x86_64-linux-gnu.so"

build_strategy = (
os.environ.get("POETRY_LIBPARSEC_BUILD_STRATEGY", "always_build").strip().lower()
Expand Down
4 changes: 2 additions & 2 deletions server/packaging/server/server.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 1) Build stage
#

FROM python:3.9 AS builder
FROM python:3.12 AS builder

WORKDIR /server

Expand All @@ -29,7 +29,7 @@ RUN bash in-docker-build.sh
# 2) Bundle stage
#

FROM python:3.9-slim
FROM python:3.12-slim

LABEL org.opencontainers.image.source=https://github.com/Scille/parsec-cloud
LABEL org.opencontainers.image.description="Run the Parsec backend server."
Expand Down
2 changes: 1 addition & 1 deletion server/packaging/testbed-server/in-docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ pip install ./server

# Boto3/Botocore are pretty big dependencies and won't be used (given the testbed
# server only uses the memory storage)
rm -rf ./venv/lib/python3.9/site-packages/{boto3,botocore,pip,setuptools}
rm -rf ./venv/lib/python3.12/site-packages/{boto3,botocore,pip,setuptools}

(cd / && /work/venv/bin/python -m parsec.cli --version)
4 changes: 2 additions & 2 deletions server/packaging/testbed-server/testbed-server.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 1) Build stage
#

FROM python:3.9 AS builder
FROM python:3.12 AS builder

WORKDIR /work

Expand All @@ -29,7 +29,7 @@ RUN bash in-docker-build.sh
# 2) Bundle stage
#

FROM python:3.9-slim
FROM python:3.12-slim

LABEL org.opencontainers.image.source=https://github.com/Scille/parsec-cloud
LABEL org.opencontainers.image.description="Run a testbed parsec server to simplify mockup of an existing organization."
Expand Down
2 changes: 1 addition & 1 deletion server/parsec/backend/cli/sequester.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

import textwrap
from base64 import b64decode, b64encode
from contextlib import asynccontextmanager
from datetime import datetime
from pathlib import Path
from typing import AsyncGenerator, Dict, List, Tuple

import attr
import click
from async_generator import asynccontextmanager

from parsec._parsec import (
CryptoError,
Expand Down
Loading