Skip to content
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

Support for Python 3.6? #6

Open
ycopin opened this issue Jan 7, 2021 · 11 comments
Open

Support for Python 3.6? #6

ycopin opened this issue Jan 7, 2021 · 11 comments

Comments

@ycopin
Copy link

ycopin commented Jan 7, 2021

Hi, the v0.1 which is pip-installed with Python 3.6 fails with

  File ".../VirtualEnv/Python3.6/lib/python3.6/site-packages/sphinxcontrib/email.py", line 15, in <module>
    rot_13_trans = string.maketrans(
AttributeError: module 'string' has no attribute 'maketrans'

but later versions only support Python 3.7+.

@lcnittl
Copy link
Member

lcnittl commented Jan 17, 2021

Thank you for your report, and sorry for the late reply - seems like I was not watching this repo...

Indeed, during revamping, support for python < 3.7 was dropped. I'll have to look into the code to see if there are any problem when shipped with e.g. py 3.6.

Would you be able to test the package on your system, and let me know if there are problem when you run it on py 3.6? If installation via pip is not possible, cloning the repository and then running pip install . inside the folder should work I think.

@ycopin
Copy link
Author

ycopin commented Jan 17, 2021

Trying using Python 3.6:

  File "/home/ycopin/Softwares/VirtualEnvs/Python3.6/lib/python3.6/site-packages/sphinxcontrib/email/__init__.py", line 1
    from __future__ import annotations
                                     ^
SyntaxError: future feature annotations is not defined

@lcnittl
Copy link
Member

lcnittl commented Jan 17, 2021 via email

@lcnittl
Copy link
Member

lcnittl commented Jan 18, 2021

Would you be okay with a release that pins the last commit which is py 3.6 compatible ( d7a1de0 )?

Alternatively, you could install this version directly with

pip install git+https://github.com/sphinx-contrib/email@d7a1de03b477918da3c91949012d37ead2a8fbd4

which you can even deposit in a requirements.txt file, along with your other requirements (in this case I just put sphinx>=1.8 as an example.

git+https://github.com/sphinx-contrib/email@d7a1de03b477918da3c91949012d37ead2a8fbd4
Sphinx>=1.8  # 

and then install it with pip install -r requirements.txt

Would this solve your issue?

@lcnittl
Copy link
Member

lcnittl commented Jan 18, 2021

If you prefer to have a release with up to date features compatible with py 3.6, I could also arrange that.

Not very happy to revert the beautiful py 3.9 style annotations, but as [py 3.6's end-of-life}(https://endoflife.date/python) is still 11 months away, I can probably also not say no to this 😄

Just let me know what works best for you,
cheers

@ycopin
Copy link
Author

ycopin commented Jan 18, 2021

Thanks for the feedback. It's not clear to me what you want to do, but it would be very helpful to provide a version pip-compatible w/ py3.6. As for now, it falls back to v0.1, which is py3-incompatible by 2 lines only in email.py (I corrected them locally):

15c15
< rot_13_trans = string.maketrans(
---
> rot_13_trans = str.maketrans(
60d59
<     text = text.decode('utf-8').encode('utf-8')
78d76
< 

Or you offer d7a1de0 as 1st py3.6-compatible version (which is equally working fine).

@lcnittl
Copy link
Member

lcnittl commented Jan 18, 2021

Or you offer d7a1de0 as 1st py3.6-compatible version (which is equally working fine).

Yes, I was planning to do this, but then I would run into problems with the setup.cfg not stating py3.6.

Can you please test, whether b063fb7 works for you?

pip install git+https://github.com/sphinx-contrib/email@b063fb7ad8b0b409ba00d5090bd4eb095dee889d

I will release this as v0.3.5 on PyPI as soon as I have your positive feedback.

Plus, like this, all newer features (like the auto-mode) are also available.

@ycopin
Copy link
Author

ycopin commented Jan 18, 2021

b063fb7 seems to be working fine for me.

@lcnittl
Copy link
Member

lcnittl commented Jan 18, 2021

Excellent! Should now be pip-installable: https://pypi.org/project/sphinxcontrib-email/0.3.5/

@ycopin
Copy link
Author

ycopin commented Jan 18, 2021

Excellent! Should now be pip-installable: https://pypi.org/project/sphinxcontrib-email/0.3.5/

Plain pip install sphinxcontrib-email still installs v0.1. Does pypi take a bit to update?

@lcnittl
Copy link
Member

lcnittl commented Jan 18, 2021

Maybe there is some dependency which is not compatible with py36. Can you try running

pip install --no-cache-dir --upgrade sphinxcontrib-email

?

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

No branches or pull requests

2 participants