-
Notifications
You must be signed in to change notification settings - Fork 264
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
Add support for python 3.8 #1315
Comments
We did say some while back that we'd support the current python version and one prior, so dropping 3.6 would fit that policy. However, that was as a result of wanting to use features that only came in with 3.6. I don't think we've wanted to use dataclasses or a walrus operator yet, so there isn't the same pressure to drop 3.6. We should perhaps change the policy (not sure if it's written anywhere) to be explicit about the python version we support - currently 3.6 and 3.7, about to become 3.6, 3.7 and 3.8. |
I'd like to start using data classes, which is a reason to drop 3.6. (See #1353 and the dataclasses I just added on the testing branch if curious why.) The failing tests for 3.8 are due to hypothesis and one of the changes in 3.8 (see here). We use an ancient version of hypothesis and the issue is fixed in more recent versions. I'm updating our use of hypothesis in #1288, after which we should be fine to enable 3.8. Alternatively we could start using the Python 3.9 is scheduled for October (~4 months) and we can support 3 trailing versions at that time. |
We could use attrs instead of data classes. It has more capabilities and is more or less the standard these days. |
I can't say I know enough about One [minor] point about |
I never write a class without using attrs any more! |
Ok great. I'll pin hypothesis at 5.19 for now as I'm fixing tests, and we can use dataclasses / attr for now. Unfortuantely neither approach has great serialization, so I'm using YAML on top of dataclasses for now, but it would be easy to switch to attrs if we want. |
This requires modifying https://github.com/Axelrod-Python/Axelrod/blob/master/.github/workflows/config.yml#L13:
to become:
And also modifying
setup.py
to reflect that3.8
is also supported: https://github.com/Axelrod-Python/Axelrod/blob/master/setup.py#L31I had a quick try and some tests failed. I know that the library works on 3.8 so it's just a question of figuring out what needs to be tweaked. I don't expect this to be a big thing.
@marcharper suggested dropping
3.6
I'd suggest that unless there is something that3.6
support is stopping us from doing then we should keep it.If we decide to drop
3.6
then we need to modifysetup.py
(the lower bound of python) but also the README.The text was updated successfully, but these errors were encountered: