← 输入框|github.com|刷新
Skip to content

Replace whitelist/blacklist with allowlist/denylist #85693

Closed

Description

@vstinner
BPO 41521
Nosy @rhettinger, @vstinner, @tiran, @ambv, @serhiy-storchaka, @miss-islington
PRs
  • bpo-41521: Replace whitelist/blacklist with allowlist/denylist #21822
  • bpo-41521: Replace whitelist/blacklist with allowlist/denylist #21823
  • bpo-41521: Replace whitelist/blacklist with allowlist/denylist #21824
  • bpo-41521, typing: Rename _PROTO_WHITELIST to _PROTO_ALLOWLIST #21825
  • bpo-41521: Replace denylist with blocklist is http.cookiejar doc #21826
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-08-17.05:23:44.595>
    created_at = <Date 2020-08-11.12:44:30.474>
    labels = ['library', '3.10', 'docs']
    title = 'Replace whitelist/blacklist with allowlist/denylist'
    updated_at = <Date 2020-08-17.05:23:44.594>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2020-08-17.05:23:44.594>
    actor = 'vstinner'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2020-08-17.05:23:44.595>
    closer = 'vstinner'
    components = ['Documentation', 'Library (Lib)']
    creation = <Date 2020-08-11.12:44:30.474>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41521
    keywords = ['patch']
    message_count = 14.0
    messages = ['375170', '375172', '375173', '375174', '375175', '375176', '375209', '375217', '375218', '375323', '375421', '375432', '375525', '375526']
    nosy_count = 7.0
    nosy_names = ['rhettinger', 'vstinner', 'christian.heimes', 'docs@python', 'lukasz.langa', 'serhiy.storchaka', 'miss-islington']
    pr_nums = ['21822', '21823', '21824', '21825', '21826']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue41521'
    versions = ['Python 3.10']

    Activity

    1. vstinner commented on Aug 11, 2020

      @vstinner
      MemberAuthor

      I propose to replace whitelist/blacklist with allowlist/denylist. The terms whitelist and blacklist can be associated to color skins which isn't the intent. To avoid confusion, I propose to use neutral terms: allowlist and denylist. Moreover, as a french person (english is not my first language, but french), "allow" and "deny" are even more explicit to me than "white "and "black".

      The intent is to make the Python community more welcoming and more diverse by avoiding to make some people uncomfortable.

      Many other projects already replaced whitelist/blacklist with allowlist/denylist:

      See also:

      Attached PRs replace whitelist/blacklist with allowlist/denylist.

    2. added
      3.10 (EOL)
      docs
      on Aug 11, 2020
    3. added
      stdlib
      docs
      on Aug 11, 2020
    4. tiran commented on Aug 11, 2020

      @tiran
      Member

      +1

    5. miss-islington commented on Aug 11, 2020

      @miss-islington
      Contributor

      New changeset fabd7bb by Victor Stinner in branch 'master':
      bpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21822)
      fabd7bb

    6. vstinner commented on Aug 11, 2020

      @vstinner
      MemberAuthor

      New changeset 0ee0b29 by Victor Stinner in branch 'master':
      bpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21823)
      0ee0b29

    7. vstinner commented on Aug 11, 2020

      @vstinner
      MemberAuthor

      "While the etymology of the words isn't steeped in racial undertones or history like other problematic tech word choices, there is no harm in changing them to synonyms that as just as understandable and avoid the question entirely"

      https://web.archive.org/web/20180921225759/https://github.com/facebook/react/issues/13604#issuecomment-419884422

    8. vstinner commented on Aug 11, 2020

      @vstinner
      MemberAuthor

      Another rationale from "Inclusive Chromium code":

      Terms such as “blacklist” and “whitelist” reinforce the notion that black==bad and white==good. That Word Black, by Langston Hughes illustrates this problem in a lighthearted, if somewhat pointed way. These terms can usually be replaced by “blocklist” and “allowlist” without changing their meanings, but particular instances may need other replacements.

      https://chromium.googlesource.com/chromium/src/+/master/styleguide/inclusive_code.md

    9. serhiy-storchaka commented on Aug 12, 2020

      @serhiy-storchaka
      Member

      Should not such changes be widely discussed on the Python-Dev mailing list before merging?

    10. ambv commented on Aug 12, 2020

      @ambv
      Contributor

      New changeset 0e95bbf by Victor Stinner in branch 'master':
      bpo-41521, typing: Rename _PROTO_WHITELIST to _PROTO_ALLOWLIST (bpo-21825)
      0e95bbf

    11. vstinner commented on Aug 12, 2020

      @vstinner
      MemberAuthor

      Serhiy:

      Should not such changes be widely discussed on the Python-Dev mailing list before merging?

      I would prefer avoiding python-dev, since there are many trolls there who like to argue but not try to fix problem. See the recent discussion about the PEP-8 commit message for example.

      I opened python/devguide#605 to define general guidelines about terminology.

    12. vstinner commented on Aug 13, 2020

      @vstinner
      MemberAuthor

      New changeset 20ae565 by Victor Stinner in branch 'master':
      bpo-41521: Replace denylist with blocklist is http.cookiejar doc (GH-21826)
      20ae565

    13. rhettinger commented on Aug 14, 2020

      @rhettinger
      Contributor

      I would prefer avoiding python-dev, since there are many
      trolls there who like to argue but not try to fix problem.

      It's not a good precedent to define as trolls anyone who might legitimately disagree, nor is it a good precedent to bypass discussion entirely. IMO, Serhiy's request was reasonable and shouldn't be dismissed.

      For this particular change, I'm +1 because it represents an industrywide terminology shift, because it makes a proactive effort to be responsive to cultural problems, and because the change doesn't impair clarity.

      That said, I concur with Serhiy that there should be a discussion before making a unilateral and stealthy change to the rules about how people are allowed to write technical prose.

    14. vstinner commented on Aug 14, 2020

      @vstinner
      MemberAuthor

      That said, I concur with Serhiy that there should be a discussion before making a unilateral and stealthy change to the rules about how people are allowed to write technical prose.

      I suggest you to join the discussion there:
      python/devguide#605

    15. vstinner commented on Aug 17, 2020

      @vstinner
      MemberAuthor

      New changeset fbf43f0 by Victor Stinner in branch 'master':
      bpo-41521: Rename blacklist parameter to not_exported (GH-21824)
      fbf43f0

    16. vstinner commented on Aug 17, 2020

      @vstinner
      MemberAuthor

      I don't think that it's worth it to backport these changes, so I close the issue.

      Again, to avoid reintroducing such terms, I proposed python/devguide#605 to define some general guidelines on the terminology.

      Thanks for reviews.

    17. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)docsstdlib

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions