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

3.13 #23

Merged
merged 30 commits into from
Oct 9, 2024
Merged

3.13 #23

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b6ccf6d
feat: start to support 3.13
15r10nk Jun 5, 2024
2315258
fix: non default type params before type params with default values
15r10nk Jun 5, 2024
8c4f73b
fix: count MatchStar variables as none usable global names
15r10nk Jun 6, 2024
177a394
feat: more variation in string constants
15r10nk Jun 6, 2024
7c31dcd
fix: variable can not be nonlocal if it is declared global in the par…
15r10nk Jun 6, 2024
1867d41
fix: restrict match value patterns
15r10nk Jun 7, 2024
99f7988
fix: named-expressions inside list-comprehensions use the outside scope
15r10nk Jun 7, 2024
f86b3ae
fix: allow ListComp in type-scope
15r10nk Jun 13, 2024
7a03359
test: improved test output
15r10nk Jun 14, 2024
ab3c8b8
fix: made generator expressions valid inside class bases and type ann…
15r10nk Jun 14, 2024
8d3e7d4
fix: lambda is valid inside annotations
15r10nk Jun 14, 2024
9f76e4e
fix: allow SetComp in type-scope
15r10nk Jun 14, 2024
3784b37
fix: named expression is a valid base class
15r10nk Jun 14, 2024
be87db3
fix: dict comprehension is a valid base class
15r10nk Jun 14, 2024
8024eb7
fix: allow await in generator expressions
15r10nk Jun 17, 2024
51b504f
fix: no async generators in type aliases
15r10nk Jun 17, 2024
995b95e
fix: named expression cannot be used within a TypeVar bound
15r10nk Jun 17, 2024
e30fc1b
fix: Starred expression inside ClassDef.bases
15r10nk Jun 17, 2024
5416b25
fix: the same varibale can be declared global multiple times
15r10nk Jun 17, 2024
878ce5a
fix: no async code in type annotations
15r10nk Jun 17, 2024
99d16e6
fix: asynchronous comprehension outside of an asynchronous function
15r10nk Jun 18, 2024
54beefa
fix: asynchronous comprehension in TypeVar.bound
15r10nk Jun 18, 2024
ae57a41
ci: test with cpython 3.13
15r10nk Jun 25, 2024
2e55fcc
fix: { and } are not allowed in formatspec, because they can not be e…
15r10nk Sep 29, 2024
94ca450
chore: added License to pyproject.toml
15r10nk Sep 30, 2024
a31ec45
fix: correct probability spelling
15r10nk Sep 30, 2024
82b1e00
fix: fixed typing
15r10nk Oct 9, 2024
e22ab9a
docs: added found bugs to readme and some todos
15r10nk Sep 30, 2024
7075e2e
test: check that invalid code can not be generated by pysource-codegen
15r10nk Oct 9, 2024
21fe48a
chore: removed noxfile.py
15r10nk Oct 9, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- hooks:
- id: check-yaml
- id: check-ast
# - id: check-ast
- id: check-docstring-first
- id: check-merge-conflict
- id: trailing-whitespace
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@

### Fix

- changed propabilities to generate more expressions
- changed probabilities to generate more expressions
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,27 @@ find_issue()

### cpython

#### 3.12
* https://github.com/python/cpython/issues/109219
* https://github.com/python/cpython/issues/109823
* https://github.com/python/cpython/issues/109719
* https://github.com/python/cpython/issues/109627
* https://github.com/python/cpython/issues/109219
* https://github.com/python/cpython/issues/109118
* https://github.com/python/cpython/issues/109114
* https://github.com/python/cpython/issues/109889

#### 3.13
* https://github.com/python/cpython/issues/120367
* https://github.com/python/cpython/issues/120225
* https://github.com/python/cpython/issues/124746
* https://github.com/python/cpython/issues/124871

## Todo:

* [ ] refactor the existing code
* add better context information to `probability()`
* remove `fix()` function and move code into `probability()`
* [ ] use probabilities for the ast-nodes from existing python code (use markov chains)
* [x] support older python versions
* [ ] allow to customize the probabilities to generate code to test specific language features
Expand Down
597 changes: 597 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: OSI Approved :: MIT License",
]
dependencies = [
"astunparse >=1.6.3; python_version<'3.9' ",
Expand All @@ -37,6 +39,9 @@ Source = "https://github.com/15r10nk/pysource-codegen"
[tool.hatch.version]
path = "src/pysource_codegen/__init__.py"

[[tool.hatch.envs.hatch-test.matrix]]
python=["3.8","3.9","3.10","3.11","3.12","3.13"]

[tool.hatch.envs.hatch-test]
extra-dependencies=[
"rich>=12.0.0",
Expand All @@ -45,7 +50,7 @@ extra-dependencies=[
]

[[tool.hatch.envs.types.matrix]]
python=["3.8","3.9","3.10","3.11","3.12"]
python=["3.8","3.9","3.10","3.11","3.12","3.13"]

[tool.hatch.envs.types]
extra-dependencies = [
Expand Down
Loading
Loading