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

Datasette should work with Python 3.8 (and drop compatibility with Python 3.5) #622

Closed
simonw opened this issue Nov 11, 2019 · 4 comments
Closed
Labels

Comments

@simonw
Copy link
Owner

@simonw simonw commented Nov 11, 2019

See #595, #594, #404.

The big thing holding me back from ditching Python 3.5 was glitch.com - but they now offer Python 3.7: https://support.glitch.com/t/can-you-upgrade-python-to-latest-version/7980/25?u=simonw

@simonw simonw added the medium label Nov 11, 2019
simonw added a commit that referenced this issue Nov 11, 2019
This fixes 2 deprecation warnings in Python 3.8 - refs #623 #622
@simonw simonw changed the title Drop compatibility with Python 3.5 in favour of compatibilty with Python 3.8 Datasette should work with Python 3.8 (and drop compatibility with Python 3.5) Nov 12, 2019
@simonw

This comment has been minimized.

Copy link
Owner Author

@simonw simonw commented Nov 12, 2019

Here's the error I'm getting with Python 3.8 at the moment:

~/Dropbox/Development/datasette $ venv-py3.8.0/bin/datasette --memory -p 8055
Serve! files=() (immutables=()) on port 8055
Traceback (most recent call last):
  File "venv-py3.8.0/bin/datasette", line 11, in <module>
    load_entry_point('datasette', 'console_scripts', 'datasette')()
  File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/simonw/Dropbox/Development/datasette/datasette/cli.py", line 365, in serve
    uvicorn.run(ds.app(), host=host, port=port, log_level="info")
  File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/main.py", line 279, in run
    server.run()
  File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/main.py", line 305, in run
    self.config.setup_event_loop()
  File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/config.py", line 218, in setup_event_loop
    loop_setup()
  File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvicorn/loops/auto.py", line 3, in auto_loop_setup
    import uvloop
  File "/Users/simonw/Dropbox/Development/datasette/venv-py3.8.0/lib/python3.8/site-packages/uvloop/__init__.py", line 7, in <module>
    from .loop import Loop as __BaseLoop  # NOQA
  File "uvloop/includes/stdlib.pxi", line 114, in init uvloop.loop
AttributeError: module 'sys' has no attribute 'set_coroutine_wrapper'

I'm pretty confident upgrading uvicorn (and uvloop with it) will fix this.

@simonw

This comment has been minimized.

Copy link
Owner Author

@simonw simonw commented Nov 12, 2019

Confirmed: upgrading to uvicorn~=0.10.4 fixed it.

simonw added a commit that referenced this issue Nov 12, 2019
@simonw

This comment has been minimized.

Copy link
Owner Author

@simonw simonw commented Nov 12, 2019

Here's where Python 3.5 started failing: https://travis-ci.org/simonw/datasette/builds/610682852

simonw added a commit that referenced this issue Nov 12, 2019
@simonw simonw closed this in cf7776d Nov 12, 2019
@simonw

This comment has been minimized.

Copy link
Owner Author

@simonw simonw commented Nov 12, 2019

Released in Datasette 0.31.

simonw added a commit that referenced this issue Nov 15, 2019
This fixes 2 deprecation warnings in Python 3.8 - refs #623 #622
simonw added a commit that referenced this issue Nov 15, 2019
* Upgrade to uvicorn 0.10.4
* Drop support for Python 3.5
* Bump all dependencies to latest releases
* Update docs to reflect we no longer support 3.5
* Removed code that skipped black unit test on 3.5

Closes #622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.