close
The Wayback Machine - https://web.archive.org/web/20200910133447/https://github.com/tox-dev/tox/issues/1357
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

Clarify which part of the indexserver spec is deprecated #1357

Open
obestwalter opened this issue Jun 29, 2019 · 8 comments
Open

Clarify which part of the indexserver spec is deprecated #1357

obestwalter opened this issue Jun 29, 2019 · 8 comments

Comments

@obestwalter
Copy link
Member

@obestwalter obestwalter commented Jun 29, 2019

... or even decide to not deprecate it after all.

This came up on the mailing list.

It seems that this config option is well established, works as expected and is used in many scenarios (especially corporate when using internal pypi repos with different stages or devpi). So we might want to decide to remove the deprecation notice completely, if there are no objections regarding the maintenance of it.

As @fschulze mentioned, at least the single index variant is highly desirable (and I am pretty sure widely used).

I would opt for removing the deprecation notice and keep the full functionality.

@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Jun 29, 2019

I personally would like to remove it completely. I need to think what's a better solution to the problem though. I don't think it's tox problem to solve index server abstractions. People should use devpi for that with some option to pass in the index server via PIP_INDEX_URL env var.

@obestwalter
Copy link
Member Author

@obestwalter obestwalter commented Jun 29, 2019

Having to pass in something rather than being able to configure it in the tox.ini is not a desirable alternative IMO. Behind corporate firewalls this is a very useful feature to set the index to the internal pypi mirror for everyone rather than having to tell everyone they have to call with some special env var set.

@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Jun 29, 2019

You can use setenv to set that env var in tox.ini. That's what we do at our company and works like a charm.

@fschulze
Copy link
Contributor

@fschulze fschulze commented Jun 29, 2019

I just tested it and I think setenv with PIP_INDEX_URL is a good solution. According to the docs it is used for setup and test run. This just needs to be documented prominently so it's easy to find and there should be a deprecation message pointing to the docs when the option is used in the config. Not sure about the command line option though. It doesn't seem to be deprecated, but also only seems to pass on one index straight to pip.

@fschulze
Copy link
Contributor

@fschulze fschulze commented Jun 29, 2019

One problem I just thought about is that you can't overwrite PIP_INDEX_URL from the command line or via CI environment variables, but that may already be the case right now.

@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Jun 29, 2019

We can change the default pip command to auto pass through pip index URL from outside env var👌For now we do it explicitly overriding the pip install command inside tox.ini at our company this.

@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Jun 29, 2019

Here's what we use:

install_command = pip install -i {env:PIP_INDEX_URL:https://magic.index.server.address/simple} {opts} {packages}

We should probably just make this as the default and drop the entire indexserver thing. This would keep the installer tool agnostic the index server selection. The main reason for this is that index server is a pip thing, conda/dpkg, for example, doesn't have such. It's a clearer separation of concern if we the tool doesn't know about pips internals; and makes it easier to extend to use other packaging tools.

This allows the user to easily insert their own index server (such as a local devpi mirror index), but fallback to some hardcoded sane value on a per project basis.

@obestwalter obestwalter self-assigned this Aug 7, 2019
@obestwalter
Copy link
Member Author

@obestwalter obestwalter commented Aug 7, 2019

This needs a deprecation warning then and a hint how to solve this differently, plus some docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.