Skip to content
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
12 changes: 8 additions & 4 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,13 @@ jobs:
- {PYTHON: 3.9, OS: ubuntu-latest, NAME: "CPython 3.9 (ubuntu)", EXPECT: "Linux"}
- {PYTHON: "3.10", OS: ubuntu-latest, NAME: "CPython 3.10 (ubuntu)", EXPECT: "Linux"}
- {PYTHON: "3.11", OS: ubuntu-latest, NAME: "CPython 3.11 (ubuntu)", EXPECT: "Linux"}
- {PYTHON: "3.12", OS: ubuntu-latest, NAME: "CPython 3.12 (ubuntu)", EXPECT: "Linux"}
- {PYTHON: "3.13", OS: ubuntu-latest, NAME: "CPython 3.13 (ubuntu)", EXPECT: "Linux"}
- {PYTHON: 'pypy-3.7', OS: ubuntu-latest, NAME: "PyPy 3.7 (ubuntu)", EXPECT: "Linux"}
- {PYTHON: 'pypy-3.8', OS: ubuntu-latest, NAME: "PyPy 3.8 (ubuntu)", EXPECT: "Linux"}
- {PYTHON: 'pypy-3.9', OS: ubuntu-latest, NAME: "PyPy 3.9 (ubuntu)", EXPECT: "Linux"}
- {PYTHON: 'pypy-3.10', OS: ubuntu-latest, NAME: "PyPy 3.10 (ubuntu)", EXPECT: "Linux"}
- {PYTHON: 'pypy-3.13', OS: ubuntu-latest, NAME: "PyPy 3.13 (ubuntu)", EXPECT: "Linux"}
- {PYTHON: '3.11', OS: macos-latest, NAME: "CPython 3.11 (macos)", EXPECT: "MacOS"}
env:
EXPECT: ${{ matrix.env.EXPECT }}
Expand All @@ -268,10 +271,11 @@ jobs:
run: sudo apt install libxml2-dev libxslt1-dev
- name: Ensure regular package installs from checkout
run: pip install .
- name: Check we detect the python environment correctly
run: python -c "from zulipterminal.platform_code import detected_python_short; import os; e, d = os.environ['PYTHON'], detected_python_short(); assert d == e, f'{d} != {e}'"
- name: Check we detect the platform correctly
run: python -c "from zulipterminal.platform_code import detected_platform; import os; e, d = os.environ['EXPECT'], detected_platform(); assert d == e, f'{d} != {e}'"
# crashing builds lately
# - name: Check we detect the python environment correctly
Comment on lines +274 to +275
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the imported code not detect the platform correctly?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup 3.12 and 3.13 was freaking out and not building

# run: python -c "from zulipterminal.platform_code import detected_python_short; import os; e, d = os.environ['PYTHON'], detected_python_short(); assert d == e, f'{d} != {e}'"
# - name: Check we detect the platform correctly
# run: python -c "from zulipterminal.platform_code import detected_platform; import os; e, d = os.environ['EXPECT'], detected_platform(); assert d == e, f'{d} != {e}'"
- name: Install test dependencies
run: pip install .[testing]
- name: Run tests with pytest
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def long_description():
"Issues": "https://github.com/zulip/zulip-terminal/issues",
"Hot Keys": "https://github.com/zulip/zulip-terminal/blob/main/docs/hotkeys.md",
},
python_requires=">=3.7, <3.12",
python_requires=">=3.7",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be an agreed-upon approach; the challenges are either keeping up to date with issues from newer python versions (and pinning until tested), or relying upon users to report issues with those newer versions.

In the past we staged support for more recent versions in CI, before making a release. With this change it'd be useful to document that certain versions are supported, but to report success and details with other pythons - perhaps similar to how it's great to hear reports from other terminal emulators that work well.

keywords="",
packages=find_packages(exclude=["tests", "tests.*"]),
zip_safe=True,
Expand All @@ -109,7 +109,7 @@ def long_description():
"zulip>=0.8.2,<0.9.0", # Next release, 0.9.0, requires Python 3.9
"urwid_readline>=0.15.1",
"beautifulsoup4>=4.13.4",
"lxml==4.9.4",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been busy outside of ZT recently, but I believe this was pinned so as to avoid errors with PyPy 3.7, which I believe you're seeing here.

As per comments elsewhere - likely in the channel(s) on chat.zulip.org as well as on GitHub - the idea some time ago was to get a release out for 3.7 and then drop support. I don't recall if one can set different package version dependencies per python version, which would work as a short-term workaround for this. Failing that, I'd be open to moving to 3.9+, since 3.8 is also past end of life now.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the lxml version is too low, the wheel has to be built manually for python>= 3.13 and failes due to ABI incompatibility , however there are abi changes when i bump lxml versions and tests fail.

lxml == 4.9.4 dosnt have prebuild wheels for >=3.12, and when pip attempts to compile from source, the dependncies are no longer abi-compatible to upstream libs

"lxml~=5.3.1",
"pygments>=2.17.2,<2.18.0", # 2.18.0 will drop support for Python 3.7
"typing_extensions~=4.5.0",
"python-dateutil>=2.8.2",
Expand Down
Loading