Skip to content

Build/allow python 3.11 #992

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

Merged
merged 3 commits into from
Jul 20, 2025
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.18.1
current_version = 1.18.2

[bumpversion:file:src/zxbc/version.py]
search = VERSION: Final[str] = "{current_version}"
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[v1.18.2](https://github.com/boriel-basic/zxbasic/tree/v1.18.1)
===
+ ! Allows installation with `pip install` in python 3.11 environments
+ * Add `hmirror.bas` library

[v1.18.1](https://github.com/boriel-basic/zxbasic/tree/v1.18.1)
===
+ ! Fixes crash on simple cast from i32 to u32 and vice versa
Expand Down
12 changes: 6 additions & 6 deletions docs/archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ repository (git).
You can contribute to ZX BASIC by reporting possible bugs or improvement suggestions at the
[forum](http://www.boriel.com/forum) or in social media.

The latest stable version is <span style={{color: "green"}}>**1.18.1**</span>.
The latest stable version is <span style={{color: "green"}}>**1.18.2**</span>.
Click on the desired icon below to download the package suitable for your platform:

* [<img src="https://zxbasic.readthedocs.io/en/docs/img/win32.png" alt="win32zip" width="32px"/>
https://www.boriel.com/files/zxb/zxbasic-1.18.1-win32.zip](https://www.boriel.com/files/zxb/zxbasic-1.18.1-win32.zip)
https://www.boriel.com/files/zxb/zxbasic-1.18.2-win32.zip](https://www.boriel.com/files/zxb/zxbasic-1.18.2-win32.zip)
<br />Windows .exe zip package. No install needed, just uncompress it in a directory of your choice.
<br/>&nbsp;
* [<img src="https://zxbasic.readthedocs.io/en/docs/img/macos.png" alt="macostargz" width="32px"/>
https://www.boriel.com/files/zxb/zxbasic-1.18.1-macos.tar.gz](https://www.boriel.com/files/zxb/zxbasic-1.18.1-macos.tar.gz)
https://www.boriel.com/files/zxb/zxbasic-1.18.2-macos.tar.gz](https://www.boriel.com/files/zxb/zxbasic-1.18.2-macos.tar.gz)
<br />Mac OS x64 package. No install needed, just uncompress it in a directory of your choice (needs Python installed
in your system).
<br/>&nbsp;
* [<img src="https://zxbasic.readthedocs.io/en/docs/img/linux.png" alt="macostargz" width="32px"/>
https://www.boriel.com/files/zxb/zxbasic-1.18.1-linux64.tar.gz](https://www.boriel.com/files/zxb/zxbasic-1.18.1-linux64.tar.gz)
https://www.boriel.com/files/zxb/zxbasic-1.18.2-linux64.tar.gz](https://www.boriel.com/files/zxb/zxbasic-1.18.2-linux64.tar.gz)
<br />Linux x64 binary package. No install needed, just uncompress it in a directory of your choice.
<br/>&nbsp;
* [<img src="https://zxbasic.readthedocs.io/en/docs/img/zip-package.png" alt="zip" width="32px"/>
https://www.boriel.com/files/zxb/zxbasic-1.18.1.zip](https://www.boriel.com/files/zxb/zxbasic-1.18.1.zip)
https://www.boriel.com/files/zxb/zxbasic-1.18.2.zip](https://www.boriel.com/files/zxb/zxbasic-1.18.2.zip)
<br />Windows, Linux, Mac zip package, with python scripts. Requires python installed in your system.
<br/>&nbsp;
* [<img src="https://zxbasic.readthedocs.io/en/docs/img/driver-down.png" alt="tar.gz" width="32px"/>
https://www.boriel.com/files/zxb/zxbasic-1.18.1.tar.gz](https://www.boriel.com/files/zxb/zxbasic-1.18.1.tar.gz)
https://www.boriel.com/files/zxb/zxbasic-1.18.2.tar.gz](https://www.boriel.com/files/zxb/zxbasic-1.18.2.tar.gz)
<br />Windows, Linux, Mac tar.gz package, with python scripts. Requires python installed in your system.

### What's new
Expand Down
451 changes: 216 additions & 235 deletions poetry.lock

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zxbasic"
version = "1.18.1"
version = "1.18.2"
description = "Boriel's ZX BASIC Compiler"
authors = ["Jose Rodriguez <[email protected]>"]
license = "AGPL-3.0-or-later"
Expand All @@ -14,7 +14,7 @@ classifiers = [
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.11',
]

keywords = ['compiler', 'zxspectrum', 'BASIC', 'z80'] # arbitrary keywords
Expand All @@ -25,11 +25,11 @@ packages = [

[tool.poetry.scripts]
zxbc = 'src.zxbc:main'
zxbasm = 'src.zxbasm.zxbasm:main'
zxbpp = 'src.zxbpp.zxbpp:entry_point'
zxbasm = 'src.zxbasm:main'
zxbpp = 'src.zxbpp:entry_point'

[tool.poetry.dependencies]
python = "^3.12"
python = "^3.11"

[tool.poetry.group.dev.dependencies]
pytest = "*"
Expand Down Expand Up @@ -110,7 +110,7 @@ follow_imports = "skip"

[tool.ruff]
line-length = 120
target-version = "py310"
target-version = "py311"
exclude = [
"src/ply" # PLY, external 3rd party tool
]
Expand Down Expand Up @@ -139,6 +139,7 @@ ignore = [
"PLR0912",
"PLR0913",
"PLR0915",
"PLW1641",
"PLR1714",
"PLR1730",
"PLR2004",
Expand Down
10 changes: 0 additions & 10 deletions src/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +0,0 @@
import sys

PYTHON_VERSION = 3, 10 # Minimum python version required

if tuple(sys.version_info) < PYTHON_VERSION:
sys.stderr.write(
"%s Error: Python version %s or higher is required\n"
% (sys.argv[0], (".".join(str(x) for x in PYTHON_VERSION)))
)
sys.exit(1)
2 changes: 1 addition & 1 deletion src/api/python_version_check.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from typing import Final

MINIMUM_REQUIRED_PYTHON_VERSION: Final[tuple[int, int]] = (3, 12)
MINIMUM_REQUIRED_PYTHON_VERSION: Final[tuple[int, int]] = (3, 11)


def init():
Expand Down
2 changes: 1 addition & 1 deletion src/arch/z80/backend/_16bit.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def mul16(cls, ins: Quad) -> list[str]:
output.append("push hl")
return output

output.append("ld de, %i" % op2)
output.append(f"ld de, {op2}")
else:
if op2[0] == "_": # stack optimization
op1, op2 = op2, op1
Expand Down
2 changes: 1 addition & 1 deletion src/zxbasm/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "1.18.1"
VERSION = "1.18.2"
2 changes: 1 addition & 1 deletion src/zxbc/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from typing import Final

VERSION: Final[str] = "1.18.1"
VERSION: Final[str] = "1.18.2"