Skip to content

Add Python 3.7 #73

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

Merged
merged 7 commits into from
Nov 6, 2018
Merged

Add Python 3.7 #73

merged 7 commits into from
Nov 6, 2018

Conversation

browniebroke
Copy link
Contributor

@browniebroke browniebroke commented Oct 8, 2018

Fixes #72 and based on #74

  • Add Python 3.7 to the Docker image
  • Update README

Dockerfile Outdated
@@ -11,10 +11,12 @@ ENV LANG C.UTF-8
ENV PYTHON_VERSION_27 2.7.14
ENV PYTHON_VERSION_35 3.5.5
ENV PYTHON_VERSION_36 3.6.4
ENV CONDA_VERSION 4.4.10
ENV PYTHON_VERSION_37 3.7.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note from Python 3.7 release schedule:

3.7.1 final: 2018-10-18 (expected)

We might want to hold this one for a bit?

Copy link
Member

Choose a reason for hiding this comment

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

I suppose, yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok! I'll update this PR when 3.7.1 gets released

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

Thanks! This PR is ready to merge to me.

@humitos humitos requested a review from agjohnson October 15, 2018 09:38
browniebroke added a commit to browniebroke/readthedocs-docker-images that referenced this pull request Oct 16, 2018
@sarnthil sarnthil mentioned this pull request Oct 23, 2018
@webknjaz
Copy link

webknjaz commented Nov 1, 2018

@humitos this PR now points to Python 3.7.1
I think it's ready to be merged :)

@webknjaz webknjaz mentioned this pull request Nov 1, 2018
@humitos humitos merged commit cc019ac into readthedocs:master Nov 6, 2018
@humitos
Copy link
Member

humitos commented Nov 6, 2018

Thanks!

@webknjaz
Copy link

webknjaz commented Nov 6, 2018

@humitos is it possible to add this to latest?

@humitos
Copy link
Member

humitos commented Nov 6, 2018

@webknjaz we are trying to make our releases of docker images available in shorter times, but we could not get there yet.

I suppose this won't be available in the couple next weeks at least.

Is this blocking your docs to be built?

@webknjaz
Copy link

webknjaz commented Nov 6, 2018

Not really, but nice to have :)

@stblassitude
Copy link

Do you have a timeline for the new images with Python 3.7? I've started a new project and I am using Python 3.7 features that make the import of my modules fail:

WARNING: autodoc: failed to import module 'spdrl20' from module 'frischen'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/frischen/envs/latest/lib/python3.5/site-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module
    __import__(modname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/frischen/checkouts/latest/frischen/spdrl20.py", line 92
    logger.debug(f'post {name} {args}')

@humitos
Copy link
Member

humitos commented Nov 22, 2018

@stblassitude the import is a warning. I think your problem is because the f-string. You could use Py3.6 with latest docker image for that and it should work.

@vEpiphyte
Copy link

Are there any updates to the availability for a python 3.7 friendly image? I'm working on a large application & library which moved to being 3.7 exclusively and the lack of 3.7 friendly image presents a problem with being able to run apidoc & some additional custom workflows for doing document generation.

@humitos
Copy link
Member

humitos commented Dec 13, 2018

Are there any updates to the availability for a python 3.7 friendly image?

We don't have a ETA yet :(

If you strictly need py3.7 you could use conda as a workaround for now. I don't really like this, but it's a possibility at the moment.

@vEpiphyte
Copy link

vEpiphyte commented Dec 13, 2018

@humitos our requirement for 3.7 is strict. I could test out the anaconda workflow to see if that would work as an alternative for now.
Edit:
If I do end up with a working conda 3.7 workflow I will write up notes here for others who may be following along with strict 3.7 needs.

@vEpiphyte
Copy link

tl;dr:

  1. Follow https://docs.readthedocs.io/en/latest/conda.html for setting up conda
  2. Use https://conda.io/docs/user-guide/tasks/manage-environments.html to define your YAML file you are using for RTD
  3. Check your RTD builds to ensure they are working properly with the correct python version and are installing the packages you specify.

Using the following patch to my project I was able to use 3.7 to perform a docs build (my build requires jupyter installed for docs derived from notebooks). This resulted in docs successfully building in the RTD environment while using Python 3.7 in order to execute the build environment.

commit baf5a16145cea33a4021d2d7c1ac8fbc5e00f01d
Author: epiphyte <[email protected]>
Date:   Tue Dec 18 02:09:51 2018 +0000

    Try conda

diff --git a/environment_docs.yml b/environment_docs.yml
new file mode 100644
index 00000000..bd90cb73
--- /dev/null
+++ b/environment_docs.yml
@@ -0,0 +1,9 @@
+# Environment file for conda for readthedocs
+# This is to be used until rtd supports python 3.7 natively
+name: synapse-docs
+dependencies:
+  - python=3.7
+  - pip:
+    - sphinx
+    - jupyter
+    - sphinx-rtd-theme
\ No newline at end of file
diff --git a/readthedocs.yml b/readthedocs.yml
index 56264fe5..b5358b9b 100644
--- a/readthedocs.yml
+++ b/readthedocs.yml
@@ -1,10 +1,4 @@
 # .readthedocs.yml
 
-build:
-  image: 4.0rc1
-
-python:
-  version: 3.7
-  pip_install: true
-  extra_requirements:
-    - docs
+conda:
+    file: environment_docs.yml

bdarnell added a commit to bdarnell/tornado that referenced this pull request Dec 30, 2018
The typing module in python 3.5 has problems with some type
annotations so we need to build with 3.7. RTD doesn't yet support py37
natively but we can get it with conda following an example at
readthedocs/readthedocs-docker-images#73
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.

6 participants