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

Drop Python 3.6 #535

Merged
merged 15 commits into from
Apr 6, 2022
Merged

Conversation

michaeloliverx
Copy link
Member

Closes: #515

@michaeloliverx
Copy link
Member Author

Failing on an unrelated black/click error?

@florimondmanca
Copy link
Member

florimondmanca commented Apr 3, 2022

@michaeloliverx Looks similar to this: encode/httpx#2097 (comment)

Also note: encode/httpx#2097 (comment)

@florimondmanca
Copy link
Member

@michaeloliverx From #536 it looks like 3.6 CI is essentially broken because a bunch of core tooling have already dropped support. We might want to merge it into this PR so we don't try to upgrade tooling that wouldn't work on 3.6 anyway.

@tomchristie
Copy link
Member

@florimondmanca - Make sense, yup. Is upgrading the pin on black and twine enough to resolve this particular pull request?

@michaeloliverx
Copy link
Member Author

Is upgrading the pin on black and twine enough to resolve this particular pull request?

It looks like no..

+ mkdocs build
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.12/x64/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/mkdocs/__main__.py", line 187, in build_command
    build.build(config.load_config(**kwargs), dirty=not clean)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/mkdocs/config/base.py", line 216, in load_config
    from mkdocs.config.defaults import get_schema
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/mkdocs/config/defaults.py", line 1, in <module>
    from mkdocs.config import config_options
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 8, in <module>
    from mkdocs import utils, theme, plugins
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/mkdocs/theme.py", line 6, in <module>
    from mkdocs.utils import filters
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/mkdocs/utils/filters.py", line 13, in <module>
    @jinja2.contextfilter
AttributeError: module 'jinja2' has no attribute 'contextfilter'

I will try and bump mkdocs.

@michaeloliverx
Copy link
Member Author

Okay were are stuck in the same place as #536 now.. If anyone has extra bandwidth feel free to add to this PR if not I can look again later.

@tomchristie
Copy link
Member

Right, so we can either unpin mkdocs, or pin it to different versions depending on which Python version it's installed after.

@michaeloliverx
Copy link
Member Author

michaeloliverx commented Apr 5, 2022

Right, so we can either unpin mkdocs, or pin it to different versions depending on which Python version it's installed after.

Unpinned mkdocs and now the AttributeError: module 'jinja2' has no attribute 'contextfilter' is back again. What Python versions should I be pinning it for ?

Michael Oliver and others added 2 commits April 5, 2022 09:49
This reverts commit 0f5115c.
* Downpin flake8 to 3.9.2
* Pin Jinja2 to 3.0.3
@florimondmanca
Copy link
Member

florimondmanca commented Apr 5, 2022

@michaeloliverx I'm seeing something weird - mkdocs 1.2.4 (or 1.3.0) should have resolved the jinja2 issue but the one we're seeing (AttributeError: contextfunction on jinja2==1.3.0 or 1.3.1) is different from the one reported and dealt with here: mkdocs/mkdocs#2799 (AttributeError: contextfilter)

For now I'm attempting to pin jinja2 to 3.9.2 and see if it passes CI. Also pinning flake8 to a version before it pinned importlib-metadata on <3.8.

Now httpbin is broken! 😆

requirements.txt Outdated Show resolved Hide resolved
@michaeloliverx
Copy link
Member Author

@florimondmanca I see green!

requirements.txt Outdated Show resolved Hide resolved
@florimondmanca
Copy link
Member

I'm happy to merge this, though the triple stitch on three different package compatibility issues is a bit disappointing. We can merge and review these when things settle down for either of the three cases... What do people think?

@tomchristie
Copy link
Member

What do people think?

I'm okay with it, yup.
We probably ought to include the 3.7+ restriction in the README for both httpcore and httpx.

@michaeloliverx
Copy link
Member Author

Added a note about 3.7+

@florimondmanca
Copy link
Member

Thanks so much @michaeloliverx. Approved the PR, feel free to merge whenever ready.

@michaeloliverx michaeloliverx merged commit 1bf9cf2 into encode:master Apr 6, 2022
@michaeloliverx michaeloliverx deleted the michaeloliverx/issue515 branch April 6, 2022 19:25
@tomchristie tomchristie mentioned this pull request May 16, 2022
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.

Consider dropping Python 3.6 support
4 participants