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

Declare Python 3.4 as incompatible #807

Merged
merged 1 commit into from May 6, 2021

Conversation

jgosmann
Copy link
Contributor

@jgosmann jgosmann commented May 6, 2021

Python 3.4 testing has been dropped in #608, but it was not declared as incompatible in setup.py because the code base was expected to still work with Python 3.4 for a while. This compatibility finally broke with the 21.1.0 release. At least one of the problematic commits is e09b1d6 introducing an import of the typing module not available in Python 3.4.

Trying to import attr with Python 3.4 gives the following exception:

>>> import attr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/gosmannj/Documents/projects/attrs/.venv/lib/python3.4/site-packages/attr/__init__.py", line 7, in <module>
    from . import converters, exceptions, filters, setters, validators
  File "/Users/gosmannj/Documents/projects/attrs/.venv/lib/python3.4/site-packages/attr/converters.py", line 8, in <module>
    from ._make import NOTHING, Factory, pipe
  File "/Users/gosmannj/Documents/projects/attrs/.venv/lib/python3.4/site-packages/attr/_make.py", line 34, in <module>
    import typing
ImportError: No module named 'typing'

Alternatively, it might be a possibility to add the typing backport as dependency for Python 3.4 installs. But I suppose this is not desired as official Python 3.4 support has been dropped.

Python 3.4 testing has been dropped in python-attrs#608, but it was not declared as
incompatible in setup.py because the code base was expected to still
work with Python 3.4 for a while. This compatibility finally broke with
the 21.1.0 release. At least one of the problematic commits is
e09b1d6 introducing an import of
the typing module not available in Python 3.4.
@hynek
Copy link
Member

hynek commented May 6, 2021

Ah yes I wanted to test it before releasing but found it too cumbersome to find a working 3.4. 🙈

Copy link
Member

@hynek hynek left a comment

Choose a reason for hiding this comment

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

Thanks!

@hynek hynek merged commit 966c220 into python-attrs:main May 6, 2021
@J-M0
Copy link

J-M0 commented May 6, 2021

Hi @hynek, I just encountered this in my CI. Would you consider yanking 21.1.0 and posting a new release with the correct python_requires so that pip installs the correct version?

@hynek
Copy link
Member

hynek commented May 7, 2021

Yes, I was thinking that (I'll yank once 21.2 is out).

@hynek
Copy link
Member

hynek commented May 7, 2021

21.2 is on PyPI, 21.1 is yanked.

blueyed added a commit to blueyed/pytest that referenced this pull request May 21, 2021
blueyed added a commit to blueyed/pytest that referenced this pull request May 22, 2021
syncrostone added a commit to gkane26/PsychRNN that referenced this pull request May 27, 2021
See python-attrs/attrs#807, thank you to @mwaskom for finding this
syncrostone added a commit to murraylab/PsychRNN that referenced this pull request May 27, 2021
* fix bug in creating training weights directory

* Remove Py 3.4 testing

See python-attrs/attrs#807, thank you to @mwaskom for finding this

Co-authored-by: Jasmine Stone <jasminetstone@gmail.com>
@takluyver
Copy link

Just a heads up: unfortunately it seems that the last pip version compatible with Python 3.4 predates yanking packages, so it still finds 21.1.0. So those of us still testing on 3.4 have to work around this by specifying attrs <21.

This isn't a criticism - it's just part of the reality of keeping older things working. I just thought I'd leave a note here for anyone else wondering why the problem doesn't seem to be solved. 🙂

@hynek
Copy link
Member

hynek commented Jul 4, 2021

Aw crap, I hoped/thought yanking’s served-side. :(

Thanks for letting us know Thomas!

@takluyver
Copy link

No worries. Unfortunately, I think there's no way it could be purely server side and still allow the yanked version to be installed if that specific version is pinned, because pip doesn't tell the server that it's looking for a specific version.

llimeht added a commit to llimeht/i18nspector that referenced this pull request Oct 28, 2021
The attrs release 21 is incompatible with Python 3.4 and while yanked, the
pip that would be around with Python 3.4 doesn't understand yanking and
so installs it anyway.

See python-attrs/attrs#807
llimeht added a commit to llimeht/i18nspector that referenced this pull request Oct 28, 2021
The attrs release 21 is incompatible with Python 3.4 and while yanked, the
pip that would be around with Python 3.4 doesn't understand yanking and
so installs it anyway.

See python-attrs/attrs#807
llimeht added a commit to llimeht/i18nspector that referenced this pull request Oct 28, 2021
The attrs release 21 is incompatible with Python 3.4 and while yanked, the
pip that would be around with Python 3.4 doesn't understand yanking and
so installs it anyway.

See python-attrs/attrs#807
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.

None yet

4 participants