Skip to content

Commit 7d8ecb6

Browse files
authored
Merge pull request #106 from dflook/python313
Python 3.13
2 parents 1f1acfb + 04488d2 commit 7d8ecb6

25 files changed

+8265
-76
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
release:
1717
runs-on: ubuntu-latest
1818
container:
19-
image: danielflook/python-minifier-build:python3.12-2024-01-12
19+
image: danielflook/python-minifier-build:python3.13-2024-09-15
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v3

.github/workflows/release_test.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
sdist: ${{ steps.package.outputs.sdist }}
1515
wheel: ${{ steps.package.outputs.wheel }}
1616
container:
17-
image: danielflook/python-minifier-build:python3.12-2024-01-12
17+
image: danielflook/python-minifier-build:python3.13-2024-09-15
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v3
@@ -50,7 +50,7 @@ jobs:
5050
outputs:
5151
wheel: ${{ steps.package.outputs.wheel }}
5252
container:
53-
image: danielflook/python-minifier-build:python2.7-2024-01-12
53+
image: danielflook/python-minifier-build:python2.7-2024-09-15
5454
steps:
5555
- uses: actions/download-artifact@v3
5656
with:
@@ -76,7 +76,7 @@ jobs:
7676
runs-on: ubuntu-latest
7777
needs: [package_python3]
7878
container:
79-
image: danielflook/python-minifier-build:python3.12-2024-01-12
79+
image: danielflook/python-minifier-build:python3.13-2024-09-15
8080
steps:
8181
- uses: actions/download-artifact@v3
8282
with:
@@ -106,10 +106,10 @@ jobs:
106106
strategy:
107107
fail-fast: false
108108
matrix:
109-
python: ["2.7", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
109+
python: ["2.7", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
110110
package_type: [sdist, wheel]
111111
container:
112-
image: danielflook/python-minifier-build:python${{ matrix.python }}-2024-01-12
112+
image: danielflook/python-minifier-build:python${{ matrix.python }}-2024-09-15
113113
steps:
114114
- uses: actions/download-artifact@v3
115115
with:
@@ -149,7 +149,7 @@ jobs:
149149
matrix:
150150
package_type: [sdist, wheel]
151151
container:
152-
image: danielflook/python-minifier-build:python3.12-2024-01-12
152+
image: danielflook/python-minifier-build:python3.13-2024-09-15
153153
steps:
154154
- uses: actions/download-artifact@v3
155155
with:
@@ -159,9 +159,9 @@ jobs:
159159
- name: Install package
160160
run: |
161161
if [[ "${{ matrix.package_type }}" == "sdist" ]]; then
162-
pip3.12 install dist/${{needs.package_python3.outputs.sdist}}
162+
pip3.13 install dist/${{needs.package_python3.outputs.sdist}}
163163
else
164-
pip3.12 install dist/${{needs.package_python3.outputs.wheel}}
164+
pip3.13 install dist/${{needs.package_python3.outputs.wheel}}
165165
fi
166166
167167
- name: Checkout
@@ -172,7 +172,7 @@ jobs:
172172

173173
- name: Test typing
174174
run: |
175-
pip3.12 install mypy types-setuptools
175+
pip3.13 install mypy types-setuptools
176176
mypy --strict typing_test/test_typing.py
177177
178178
if mypy --strict typing_test/test_badtyping.py; then

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python: ["python2.7", "python3.3", "python3.4", "python3.5", "python3.6", "python3.7", "python3.8", "python3.9", "python3.10", "python3.11", "python3.12", "pypy", "pypy3"]
16+
python: ["python2.7", "python3.3", "python3.4", "python3.5", "python3.6", "python3.7", "python3.8", "python3.9", "python3.10", "python3.11", "python3.12", "python3.13", "pypy", "pypy3"]
1717
container:
18-
image: danielflook/python-minifier-build:${{ matrix.python }}-2024-01-12
18+
image: danielflook/python-minifier-build:${{ matrix.python }}-2024-09-15
1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v3

.github/workflows/test_corpus.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
type: string
1313
description: 'Git ref to compare against'
1414
required: true
15-
default: '2.8.1'
15+
default: '2.10.0'
1616
regenerate-results:
1717
type: boolean
1818
description: 'Regenerate results'
@@ -44,10 +44,10 @@ jobs:
4444
strategy:
4545
fail-fast: false
4646
matrix:
47-
python: ["2.7", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
47+
python: ["2.7", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
4848
ref: ["${{ inputs.ref }}", "${{ inputs.base-ref }}"]
4949
container:
50-
image: danielflook/python-minifier-build:python${{ matrix.python }}-2024-01-12
50+
image: danielflook/python-minifier-build:python${{ matrix.python }}-2024-09-15
5151
volumes:
5252
- /corpus:/corpus
5353
- /corpus-results:/corpus-results
@@ -103,7 +103,7 @@ jobs:
103103
needs: generate_results
104104
runs-on: self-hosted
105105
container:
106-
image: danielflook/python-minifier-build:python3.12-2024-01-12
106+
image: danielflook/python-minifier-build:python3.13-2024-09-15
107107
volumes:
108108
- /corpus-results:/corpus-results
109109
if: ${{ always() }}
@@ -140,4 +140,4 @@ jobs:
140140
141141
- name: Generate Report
142142
run: |
143-
python3.12 workflow/corpus_test/generate_report.py /corpus-results ${{ inputs.ref }} $(<sha.txt) ${{ inputs.base-ref }} $(<base-sha.txt) >> $GITHUB_STEP_SUMMARY
143+
python3.13 workflow/corpus_test/generate_report.py /corpus-results ${{ inputs.ref }} $(<sha.txt) ${{ inputs.base-ref }} $(<base-sha.txt) >> $GITHUB_STEP_SUMMARY

.github/workflows/verify_release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python: ["2.7", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
19+
python: ["2.7", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2020
container:
21-
image: danielflook/python-minifier-build:python${{ matrix.python }}-2024-01-12
21+
image: danielflook/python-minifier-build:python${{ matrix.python }}-2024-09-15
2222
steps:
2323
- name: Test
2424
run: |

.github/workflows/xtest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python: ["python2.7", "python3.3", "python3.4", "python3.5", "python3.6", "python3.7", "python3.8", "python3.9", "python3.10", "python3.11", "python3.12", "pypy3"]
16+
python: ["python2.7", "python3.3", "python3.4", "python3.5", "python3.6", "python3.7", "python3.8", "python3.9", "python3.10", "python3.11", "python3.12", "python3.13", "pypy3"]
1717
container:
18-
image: danielflook/python-minifier-build:${{ matrix.python }}-2024-01-12
18+
image: danielflook/python-minifier-build:${{ matrix.python }}-2024-09-15
1919
steps:
2020
- name: Cleanup
2121
run: |

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Transforms Python source code into its most compact representation.
44

55
[Try it out!](https://python-minifier.com)
66

7-
python-minifier currently supports Python 2.7 and Python 3.3 to 3.12. Previous releases supported Python 2.6.
7+
python-minifier currently supports Python 2.7 and Python 3.3 to 3.13. Previous releases supported Python 2.6.
88

99
* [PyPI](https://pypi.org/project/python-minifier/)
1010
* [Documentation](https://dflook.github.io/python-minifier/)
@@ -110,7 +110,7 @@ and outputs source code compatible with the version of the interpreter it is run
110110
This means that if you minify code written for Python 3.11 using python-minifier running with Python 3.12,
111111
the minified code may only run with Python 3.12.
112112

113-
python-minifier runs with and can minify code written for Python 2.7 and Python 3.3 to 3.12.
113+
python-minifier runs with and can minify code written for Python 2.7 and Python 3.3 to 3.13.
114114

115115
## Usage
116116

corpus_test/generate_report.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def report(results_dir: str, minifier_ref: str, minifier_sha: str, base_ref: str
315315
| Python Version | Valid Corpus Entries | Average Time | Minified Size | Larger than original | Recursion Error | Unstable Minification | Exception |
316316
|----------------|---------------------:|-------------:|--------------:|---------------------:|----------------:|----------------------:|----------:|'''
317317

318-
for python_version in ['2.7', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']:
318+
for python_version in ['2.7', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']:
319319
try:
320320
summary = result_summary(results_dir, python_version, minifier_sha)
321321
except FileNotFoundError:
@@ -358,11 +358,11 @@ def format_size_change_detail() -> str:
358358
)
359359

360360
if ENHANCED_REPORT:
361-
yield from report_larger_than_original(results_dir, ['3.12'], minifier_sha)
362-
yield from report_larger_than_base(results_dir, ['3.12'], minifier_sha, base_sha)
363-
yield from report_slowest(results_dir, ['3.12'], minifier_sha)
364-
yield from report_unstable(results_dir, ['2.7', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'], minifier_sha)
365-
yield from report_exceptions(results_dir, ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'], minifier_sha)
361+
yield from report_larger_than_original(results_dir, ['3.13'], minifier_sha)
362+
yield from report_larger_than_base(results_dir, ['3.13'], minifier_sha, base_sha)
363+
yield from report_slowest(results_dir, ['3.13'], minifier_sha)
364+
yield from report_unstable(results_dir, ['2.7', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'], minifier_sha)
365+
yield from report_exceptions(results_dir, ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'], minifier_sha)
366366

367367

368368
def main():

docker/Dockerfile-fedora40

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
FROM fedora:40 AS python3.13
2+
3+
# CircleCI required tools
4+
RUN dnf install -y \
5+
git \
6+
tar \
7+
gzip \
8+
gpg \
9+
ca-certificates \
10+
&& dnf clean all && rm -rf /var/cache/dnf/*
11+
12+
# Development tools
13+
RUN dnf install -y \
14+
@development-tools \
15+
findutils \
16+
zlib-devel \
17+
bzip2-devel \
18+
ncurses-devel \
19+
gdbm-devel \
20+
openssl-devel \
21+
sqlite-devel \
22+
tk-devel \
23+
libuuid-devel \
24+
readline-devel \
25+
libnsl2-devel \
26+
xz-devel \
27+
libffi-devel \
28+
wget \
29+
&& git clone https://github.com/python/cpython.git \
30+
&& cd cpython \
31+
&& git checkout v3.13.0rc2 \
32+
&& ./configure \
33+
&& make \
34+
&& make install \
35+
&& cd .. \
36+
&& rm -rf cpython \
37+
&& dnf clean all && rm -rf /var/cache/dnf/*
38+
39+
# Other packages required for tests
40+
RUN dnf install -y \
41+
bzip2 \
42+
&& dnf clean all && rm -rf /var/cache/dnf/*
43+
44+
RUN pip3 install tox==4.18.1
45+
46+
WORKDIR /tmp/work
47+
ENTRYPOINT ["/bin/bash"]

docker/Dockerfile-fuzz

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM fedora:38 AS fuzz
1+
FROM fedora:40 AS fuzz
22

33
RUN dnf install -y \
44
python3 \

0 commit comments

Comments
 (0)