Skip to content

Conversation

@ksz16
Copy link

@ksz16 ksz16 commented Dec 8, 2025

In the new versions of Python (3.13 and 3.14) attempt to build pylzma ends with an error.
Replacing pylzma with py7zr should solve the problem.

@ksz16
Copy link
Author

ksz16 commented Dec 9, 2025

I made a second commit because I used a less elegant approach in the first one (unpacking to a temporary directory).
In the second one I used WriterFactory (as described in the link below).

https://py7zr.readthedocs.io/en/latest/advanced.html

CLI tool for downloading subtitles from napiprojekt.pl, fork of [gabrys/napi.py](https://github.com/gabrys/napi.py)

## prerequisites
- Python 3.7 or newer
Copy link
Owner

Choose a reason for hiding this comment

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

is it needed to drop support for 3.7 and 3.8?

Copy link
Author

Choose a reason for hiding this comment

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

is it needed to drop support for 3.7 and 3.8?

I'm afraid so, because for py7zr version 1.0.0, the minimum required version is Python 3.9, and the maximum is Python 3.13 (planned support for 3.14).

@@ -1,6 +1,6 @@
[tool.poetry]
name = "napi-py"
version = "1.2.4"
Copy link
Owner

Choose a reason for hiding this comment

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

if dropping the support is required, I think it should be 1.3.0

Copy link
Author

Choose a reason for hiding this comment

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

if dropping the support is required, I think it should be 1.3.0

Yes, that makes sense, and you're right.

self._length = 0
self._lock = threading.Lock()

def write(self, data: bytes) -> None:
Copy link
Owner

Choose a reason for hiding this comment

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

linter complains about returning type None instead of int as required by interface

I think there's a bit more work to make this change working with tests passing etc, i.e.

  • run poetry update and commit updated .lock file
  • make sure tests are passing through the means of make test executed in projects directory
  • add all required changes to this PR

The implementation itself makes sense, so there's just some boilerplate needed around python tooling. I may help you with it or base off of your changes and do it on my own but again, my spare time is super limited so can't promise doing it any time soon

Copy link
Author

Choose a reason for hiding this comment

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

As I mentioned when reporting the issue, I am not a Python expert. I admit that I did not perform exhaustive testing. I built a .whl package based on my commits and installed it locally using vevn. I have been using it for a few days instead of the old version, and everything seems to be working fine.
I will run poetry update and add a new poetry.lock. I will also try to run all the tests. I will try to do it myself, and if I have any problems, I will ask you for help. I just don't know when I'll have spare time - it might take me a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants