-
Notifications
You must be signed in to change notification settings - Fork 6
use py7zr instead of pylzma #8
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
base: master
Are you sure you want to change the base?
Conversation
|
I made a second commit because I used a less elegant approach in the first one (unpacking to a temporary directory). |
| 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 updateand commit updated .lock file - make sure tests are passing through the means of
make testexecuted 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
There was a problem hiding this comment.
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.
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.