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

Please allow a list instead of a tuple in new intersphinx_mapping format too! #978

Closed
shimizukawa opened this issue Jan 3, 2015 · 3 comments
Labels
type:enhancement enhance or introduce a new feature

Comments

@shimizukawa
Copy link
Member

The documentation at http://sphinx.pocoo.org/ext/intersphinx.html#confval-intersphinx_mapping describes the new intersphinx_mapping format. It uses tuples as in this example:

#!python

intersphinx_mapping = {'python': ('http://docs.python.org/3.2', None)}

I kindly ask to allow a list as well instead of a tuple only. Currently a list leads to the exception: "<type 'exceptions.AttributeError'>: 'list' object has no attribute 'find'".

The reason is that we (TYPO3 community) want to use Settings.yml file in YAML format to. I'd like to use the yaml.safe_load(...) method of PyYAML. There I can easily load lists but not tuples.

What about going for the rule in general in conf.py which says: "You may use lists instead of tuples too."?


@shimizukawa shimizukawa added type:enhancement enhance or introduce a new feature prio:low labels Jan 3, 2015
@shimizukawa
Copy link
Member Author

From Martin Bless on 2012-07-25 19:05:36+00:00

It looks like (untested!) that the only thing that needs to be changed is:
In "sphinx.ext.intersphinx.py", function "def load_mappings(app):"

old line:
if isinstance(value, tuple):

new line:
if isinstance(value, (tuple, list)):

@shimizukawa
Copy link
Member Author

From Takayuki Shimizukawa on 2012-10-30 03:56:29+00:00

I think so too and this change have no side-effect.

location is here: ext/intersphinx.py L-164

@tk0miya
Copy link
Member

tk0miya commented Jan 8, 2017

Fixed at 175c6e6.

@tk0miya tk0miya closed this as completed in 175c6e6 Jan 9, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants