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 Python 3.9 #4759

Merged
merged 13 commits into from Mar 18, 2021
Merged

Support Python 3.9 #4759

merged 13 commits into from Mar 18, 2021

Conversation

itsvinayak
Copy link
Contributor

@itsvinayak itsvinayak commented Aug 26, 2020

Resolves #4757

@Gallaecio
Copy link
Member

I’m thinking it would be best to:

  • Switch the 3 Python 3.8 jobs at the end to Python 3.9, as those jobs are meant to make sure that everything works with the latest Python.
  • Add a 3.8 job right after the 3.7 one (one identical to the current PYPI_RELEASE_JOB one).
  • Remove PYPI_RELEASE_JOB from the 3.9 job, there must only be one PYPI_RELEASE_JOB job and an unreleased Python version is probably not the best choice to build our PyPI packages.

@Gallaecio
Copy link
Member

Gallaecio commented Aug 26, 2020

I don’t think I explained myself very well, sorry. I meant the 3 Python jobs at the end of the whole job list:

    - env: TOXENV=py PYPI_RELEASE_JOB=true
      python: 3.8
      dist: bionic
    - env: TOXENV=extra-deps
      python: 3.8	      
      dist: bionic	      
    - env: TOXENV=asyncio	    
      python: 3.8	      
      dist: bionic	      

Please re-read my previous comment taking that into account, hopefully it makes more sense.

As for the static tests (security, flake, etc.), it probably makes sense to upgrade them as you did, even though I did not had that among my goals originally. However, please keep their current order, even if the docs one stays at 3.7. And switch pylint also to 3.9; I know it failed, we’ll have to figure out why and fix that.

@itsvinayak
Copy link
Contributor Author

@Gallaecio ,


matrix:
  include:
    - env: TOXENV=py 
      python: 3.9-dev
      dist: bionic
    - env: TOXENV=extra-deps
      python: 3.9-dev
      dist: bionic
    - env: TOXENV=asyncio
      python: 3.9-dev
      dist: bionic
    - env: TOXENV=security
      python: 3.9-dev
    - env: TOXENV=flake8
      python: 3.9-dev
    - env: TOXENV=typing
      python: 3.9-dev
      
    - env: TOXENV=docs
      python: 3.7  # Keep in sync with .readthedocs.yml

    - env: TOXENV=pinned
      python: 3.6.1
    - env: TOXENV=asyncio-pinned
      python: 3.6.1
    - env: TOXENV=pypy3-pinned PYPY_VERSION=3.6-v7.2.0

    - env: TOXENV=py
      python: 3.6
    - env: TOXENV=pypy3 PYPY_VERSION=3.6-v7.3.1

    - env: TOXENV=py
      python: 3.7
    - env: TOXENV=py PYPI_RELEASE_JOB=true
      python: 3.8
      dist: bionic

does this make sense?

Copy link
Member

@Gallaecio Gallaecio left a comment

Choose a reason for hiding this comment

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

Other than a minor 💄 aesthetic thing, the Travis CI looks good to me. Let’s now look at the issues.

We can either try to solve them here, if they are trivial, or open separate issues for them, and hold this pull request until those are fixed.

.travis.yml Outdated Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
@Gallaecio
Copy link
Member

The 3 failing tests seem caused by a bug in passlib, which will be fixed in their next version (1.7.3). We need to wait for them to release that version.

@Gallaecio
Copy link
Member

They’ve released a new passlib version, it should be possible to move this forward.

@Gallaecio Gallaecio closed this Oct 11, 2020
@Gallaecio Gallaecio reopened this Oct 11, 2020
@Gallaecio
Copy link
Member

Now the issue is a bug in mitmproxy. It looks like we need to wait for a release including mitmproxy/mitmproxy@8e5e43d.

@wRAR
Copy link
Member

wRAR commented Oct 29, 2020

We decided that it's fine to put the unreleased mitmproxy commit into the reqs, as it's only required for tests (it can be also marked as only required for Python 3.9)

@wRAR
Copy link
Member

wRAR commented Oct 30, 2020

src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c(7614): error C2039: 'tp_print': is not a member of '_typeobject'

In the Windows tests.

@wRAR
Copy link
Member

wRAR commented Oct 30, 2020

And a similar error in the pylint job (?!)

@Gallaecio
Copy link
Member

Reppy does not support Python 3.9 at the moment: seomoz/reppy#122

@wRAR
Copy link
Member

wRAR commented Oct 30, 2020

But the Windows error seems to be about Twisted (and a Windows-specific file)

@Gallaecio
Copy link
Member

@wRAR
Copy link
Member

wRAR commented Nov 30, 2020

Looks like mitmproxy 5.3.0 includes the 3.9 fix. Reppy is still not fixed though.

@kmike
Copy link
Member

kmike commented Dec 30, 2020

I think that's fine to not install reppy in py39-extra-deps environment. It is not a required dependency; if it doesn't work, and the problem is upstream, that's fine to skip the test configuration on our side.

That said, we shouldn't be fixing it in this PR, as we're moving to Github Actions due to recent Travis CI changes (see #4924)

@codecov
Copy link

codecov bot commented Feb 3, 2021

Codecov Report

Merging #4759 (b5de69a) into master (904a501) will increase coverage by 0.20%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4759      +/-   ##
==========================================
+ Coverage   87.81%   88.02%   +0.20%     
==========================================
  Files         158      158              
  Lines        9719     9719              
  Branches     1433     1433              
==========================================
+ Hits         8535     8555      +20     
+ Misses        929      910      -19     
+ Partials      255      254       -1     
Impacted Files Coverage Δ
scrapy/core/downloader/__init__.py 92.48% <0.00%> (+1.50%) ⬆️
scrapy/robotstxt.py 97.53% <0.00%> (+22.22%) ⬆️

@Gallaecio Gallaecio changed the title ADDED : 3.9-dev ( update .travis.yml ) Support Python 3.9 Feb 8, 2021
@Gallaecio Gallaecio modified the milestone: 2.5 Feb 11, 2021
@kmike kmike added this to the 2.5 milestone Mar 11, 2021
@elacuesta elacuesta merged commit 42e4dbb into scrapy:master Mar 18, 2021
@rivermont rivermont mentioned this pull request Aug 17, 2021
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.

Add a job for Python 3.9 to .travis.yml
5 participants