[ ENH ] Python 3.7 Support
hysrx opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
As you detailed in this issue, a reason for a lack of Python 3.6 support was the implementation of dataclasses. I followed up with PyPy now supporting 3.7 and now support dataclasses.
I did a test and yes, dataclasses are supported.
Python 3.7.4 (87875bf2dfd8, Sep 24 2020, 07:27:16)
[PyPy 7.3.2-alpha0 with MSC v.1927 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>> import hentai
>>>> doujin = hentai.Hentai(177013)
>>>> print(doujin.tags[0])
Tag(id=19018, type='tag', name='dark skin', url='/tag/dark-skin/', count=21056)
>>>> doujin.tags[0].id
19018
>>>> type(doujin.tags[0])
<class 'hentai.hentai.Tag'>
Describe the solution you'd like
As Python 3.7 has dataclasses inbuilt, there is no need for a backport of dataclasses and supporting Python 3.7 would only require the following patch:
- assert sys.version_info.minor > 7
+ assert sys.version_info.minor >= 7
- raise RuntimeError("Hentai requires Python 3.8+!")
+ raise RuntimeError("Hentai requires Python 3.7+!")
Release 1.2 closes this issue. My last deployment to PyPI for python 3.8 seem to have failed because the previous job for 3.7 already finished, which appereantly caused a name collusion for 3.8, so my takeaway from this is that is suffices to build once for the older version. Anyway, hope this helps.