Skip to content

Commit

Permalink
Merge pull request #229 from ivanyu/python3-12
Browse files Browse the repository at this point in the history
Support Python 3.12
  • Loading branch information
ivanyu authored Nov 14, 2023
2 parents e73534d + c8a20d3 commit cb8e23d
Show file tree
Hide file tree
Showing 9 changed files with 324 additions and 383 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr_and_main_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- check_and_test_pyheap_ui
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3

Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dumper-docker-image:
(cd pyheap && $(MAKE) docker-image)

.PHONY: integration-tests
integration-tests: integration-tests-3-8 integration-tests-3-9 integration-tests-3-10 integration-tests-3-11
integration-tests: integration-tests-3-8 integration-tests-3-9 integration-tests-3-10 integration-tests-3-11 integration-tests-3-12

define run_integration_test
cd integration_tests && \
Expand All @@ -53,3 +53,7 @@ integration-tests-3-10: pyheap/dist/pyheap_dump dumper-docker-image
.PHONY: integration-tests-3-11
integration-tests-3-11: pyheap/dist/pyheap_dump dumper-docker-image
$(call run_integration_test,3.11,test-target-docker-images-3-11)

.PHONY: integration-tests-3-12
integration-tests-3-12: pyheap/dist/pyheap_dump dumper-docker-image
$(call run_integration_test,3.12,test-target-docker-images-3-12)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ It does not require any modification to the target program code, CPython code or

The dumper needs the following:
1. GDB must be installed where the dumper runs (e.g. on the machine host), but is not needed near a target process (e.g. in a container).
2. CPython 3.8 - 3.11.
2. CPython 3.8 - 3.12.
3. Docker CLI for working with Docker containers directly (e.g. calling `docker inspect`).

## Compatibility
Expand All @@ -21,7 +21,7 @@ The dumper needs the following:

The dumper has been tested on x86 (x86_64) and ARM (AArch64) processors.

The dumper is compatible with a target process running on CPython 3.8 - 3.11.
The dumper is compatible with a target process running on CPython 3.8 - 3.12.

The target process were tested in the following OSes:
- Alpine Linux;
Expand Down Expand Up @@ -206,7 +206,7 @@ Integration tests run on CI. However, end-to-end tests that use the real GDB can
make clean integration-tests
```
You need [pyenv](https://github.com/pyenv/pyenv) with Python 3.8, 3.9, 3.10, and 3.11 installed and [Poetry](https://python-poetry.org/).
You need [pyenv](https://github.com/pyenv/pyenv) with Python 3.8, 3.9, 3.10, 3.11, and 3.12 installed and [Poetry](https://python-poetry.org/).
## License
Expand Down
7 changes: 7 additions & 0 deletions integration_tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,12 @@ test-target-docker-images-3-11: e2e_docker/inferior-simple.py
$(call build_image,3.11,ubuntu,22.04)
$(call build_image,3.11,fedora,36)

.PHONY: test-target-docker-images-3-12
test-target-docker-images-3-12: e2e_docker/inferior-simple.py
$(call build_image,3.12,alpine,3.12.0-alpine3.18)
$(call build_image,3.12,debian,3.12-slim-bullseye)
$(call build_image,3.12,ubuntu,23.10)
$(call build_image,3.12,fedora,39)

e2e_docker/inferior-simple.py:
cp ../test_inferiors/inferior-simple.py $@
488 changes: 228 additions & 260 deletions pyheap-ui/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyheap-ui/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = [{include = "pyheap_ui", from = "src"}]
python = "^3.8"
Flask = "^2.2.2"
Jinja2 = "^3.1.2"
typing-extensions = "^4.4.0"
typing-extensions = "^4.8.0"
tqdm = "^4.64.1"

[tool.poetry.dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions pyheap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dist/pyheap_dump: build/requirements.txt build-src
mkdir -p dist
poetry run pex \
--requirement=build/requirements.txt \
--python-shebang '#!/usr/bin/env python' \
--sources-directory=build/src \
--entry-point=pyheap_dump:main \
--output-file=$@
Expand Down
185 changes: 73 additions & 112 deletions pyheap/poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyheap/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ authors = ["Ivan Yurchenko <ivan@ivanyu.me>"]
license = "Apache License 2.0"

[tool.poetry.dependencies]
python = ">=3.8,<3.12"
pyelftools = "^0.29"
python = ">=3.8,<3.13"
pyelftools = "^0.30"

[tool.poetry.dev-dependencies]
pytest = "^7.1"
black = "^22.6"
black = "^23.10"
pex = "^2.1"

[tool.pytest.ini_options]
Expand Down

0 comments on commit cb8e23d

Please sign in to comment.