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

Add alias "allowlist_externals" to "whitelist_externals" #1601

Merged
merged 1 commit into from
Jul 23, 2020
Merged

Add alias "allowlist_externals" to "whitelist_externals" #1601

merged 1 commit into from
Jul 23, 2020

Conversation

dajose
Copy link

@dajose dajose commented Jun 16, 2020

closes #1491

@dajose
Copy link
Author

dajose commented Jun 17, 2020

I think the macOS checks failure is not related with the PR, can someone give me a hand there?

parser.add_testenv_attribute(
name="whitelist_externals",
name="whitelist_externals", type="line-list", help="DEPRECATED: use allowlist_external",
Copy link

Choose a reason for hiding this comment

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

Missing s at the end.

@@ -747,8 +747,13 @@ def passenv(testenv_config, value):
"eventual passenv setting.",
)

# FIXME remove whitelist in favor of allowlist_external
Copy link

Choose a reason for hiding this comment

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

(Missing s at the end)

Copy link
Member

Choose a reason for hiding this comment

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

We don't use fixmes in this project but instead prefer the issue tracker, please remove this. We could not remove it either way before the next major version as that would be breaking change.

@@ -0,0 +1 @@
Whitelist (as used on whitelist_externals) has a racial weight, allowlist_externals should be preferred. - by :user:`dajose`
Copy link
Member

Choose a reason for hiding this comment

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

This needs to expand on the fact that whitelist_externals is still supported, however now the allowlist_externals alias has been added.

docs/config.rst Show resolved Hide resolved
@@ -747,8 +747,13 @@ def passenv(testenv_config, value):
"eventual passenv setting.",
)

# FIXME remove whitelist in favor of allowlist_external
Copy link
Member

Choose a reason for hiding this comment

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

We don't use fixmes in this project but instead prefer the issue tracker, please remove this. We could not remove it either way before the next major version as that would be breaking change.

@@ -433,6 +433,10 @@ def test_install_command_not_installed(newmocksession):


def test_install_command_whitelisted(newmocksession):
"""
Deprecated: Remove in favor of test_install_command_allowlisted when
Copy link
Member

Choose a reason for hiding this comment

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

Remove this docstring, the migration complete will not happen before the rewrite.

src/tox/venv.py Outdated
@@ -223,7 +223,7 @@ def is_allowed_external(self, p):
if tox.INFO.IS_WIN:
tryadd += [os.path.normcase(x) for x in os.environ["PATHEXT"].split(os.pathsep)]
p = py.path.local(os.path.normcase(str(p)))
for x in self.envconfig.whitelist_externals:
for x in self.envconfig.allowlist_externals + self.envconfig.whitelist_externals:
Copy link
Member

Choose a reason for hiding this comment

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

I'm not happy to allow specifying both of them. We should instead allow only one, and raise if both set. And then pick only the one that is set.

@dajose dajose requested a review from gaborbernat June 18, 2020 16:33
Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

The CI is failing.

@dajose
Copy link
Author

dajose commented Jun 18, 2020

@dajose dajose requested a review from gaborbernat June 19, 2020 14:33
Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

Sorry, don't have time to investigate. master passes so the issue will be in this code.

@asottile
Copy link
Contributor

re-triggered CI, seems to be doing better now

@gaborbernat gaborbernat merged commit a9ec661 into tox-dev:master Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editorial: consider offering alternative to whitelist_externals
4 participants