mjishnu / pypdl

A concurrent pure python downloader with resume capablities
https://pypi.org/project/pypdl/
MIT License
44 stars 8 forks source link

SyntaxError in Python <3.12 #21

Closed KennyChenBasis closed 2 months ago

KennyChenBasis commented 2 months ago

Steps to reproduce:

  1. Run the example usage:
    
    from pypdl import Pypdl

dl = Pypdl() dl.start('http://example.com/file.txt')


### Expected result:
Download starts and completes.

### Actual result:

SyntaxError: f-string: expecting '}'

in pypdl/factory.py", line 219,
download_stats = f"Downloading...{" " * 95}\n"


The new f-string usage is only available in Python 3.12.

### Environment:
- Python 3.9.18
- pypdl 1.4.0
armin567ip commented 2 months ago

Same

mjishnu commented 2 months ago

forgot to test it on older versions I was testing on 3.12, sorry for the delay my pc was busted, fixed the issue in this commit https://github.com/mjishnu/pypdl/commit/30bac2339a0c89ec849b2334943f0f927ba5ff74 (working in python 3.8.10)

armin567ip commented 2 months ago

forgot to test it on older versions I was testing on 3.12, sorry for the delay my pc was busted, fixed the issue in this commit 30bac23 (working in python 3.8.10)

Should I upgrade now? pip install --upgrade pypdl like this?

mjishnu commented 2 months ago

forgot to test it on older versions I was testing on 3.12, sorry for the delay my pc was busted, fixed the issue in this commit 30bac23 (working in python 3.8.10)

Should I upgrade now? pip install --upgrade pypdl like this?

I didn't publish yet making few more changes. as a temp fix just manually apply the changes I made in the commit

mjishnu commented 2 months ago

Thanks for reporting, with v1.4.1 this should be fixed.