-
Notifications
You must be signed in to change notification settings - Fork 25
Extend support for Python version validation #21
Conversation
* Allow for python supported versions to be passed into the config object. This is required to pass in per-build environment python versions for validation * More validation on lists * Don't handle strings as iterables in choice validation * Coerce Python verion to an int/float if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@@ -149,6 +149,19 @@ Following mapping keys are supported (all but the marked once are optional): | |||
The path in which ``python setup.py install`` will be executed. | |||
Defaults to the repository root. | |||
|
|||
``version`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems weird there's an example here that doesn't include the actual version
object that it's documenting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be moved into docs on the actual config object, as it's not important for the spec. None of the elements have an example currently, so I don't think one is necessarily warranted here yet. I could see overhauling this doc to include more information eventually however.
@@ -78,6 +78,8 @@ class BuildConfig(dict): | |||
PYTHON_EXTRA_REQUIREMENTS_INVALID_MESSAGE = ( | |||
'"python.extra_requirements" section must be a list.') | |||
|
|||
PYTHON_SUPPORTED_VERSIONS = [2, 2.7, 3, 3.3, 3.4, 3.5, 3.6] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to support <3.5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be agnostic to what versions we actually support, this is just checking for valid version numbers ATM. This decision should be left up to our implementation on RTD, i think.
da08939
to
0c08e88
Compare
Failing tests are #22, won't fix them here. |
is required to pass in per-build environment python versions for validation
Refs readthedocs/readthedocs-docker-images#18