Skip to content

Config build.tools.python does not accept '3' as doc'd #8696

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

Closed
adamchainz opened this issue Nov 18, 2021 · 4 comments
Closed

Config build.tools.python does not accept '3' as doc'd #8696

adamchainz opened this issue Nov 18, 2021 · 4 comments
Labels
Improvement Minor improvement to code

Comments

@adamchainz
Copy link

Details

Expected Result

.readthedocs.yml is documented as accepting '3' for build.tools.python, to mean "latest CPython": https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python

I tried this

Actual Result

Build failed with:

Error

Problem in your project's configuration. Invalid "build.tools.python": expected one of (2.7, 3.6, 3.7, 3.8, 3.9, 3.10, pypy3.7, miniconda3-4.7, mambaforge-4.10, 3), got 3
@astrojuanlu
Copy link
Contributor

It's documented as accepting "3", since Type is string. For the enumeration, I followed the convention we had in other parts of that page, but perpahs we could make it more clear that folks should use double quotes?

@adamchainz
Copy link
Author

Oh, my bad, I missed that "3" is mentioned in the "expected one of..."

@stsewd
Copy link
Member

stsewd commented Nov 19, 2021

We have a warning on the python.version https://docs.readthedocs.io/en/stable/config-file/v2.html#python-version-legacy option, but I think we should show the list with quotes instead of bare numbers, at least for the numeric values. And also the error message should also use quotes to list the valid options, probably.

@stsewd stsewd added the Improvement Minor improvement to code label Nov 19, 2021
@humitos
Copy link
Member

humitos commented Jan 27, 2022

We added this note some time ago:

Make sure to use quotes (") to make it a string. We previously supported using numbers here, but that approach is deprecated.

I'm closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

4 participants