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

empty set difference does not check types of values #81400

Closed
asottile mannequin opened this issue Jun 10, 2019 · 5 comments
Closed

empty set difference does not check types of values #81400

asottile mannequin opened this issue Jun 10, 2019 · 5 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir

Comments

@asottile
Copy link
Mannequin

asottile mannequin commented Jun 10, 2019

BPO 37219
Nosy @rhettinger, @asottile
PRs
  • bpo-37219: Remove errorneous optimization for differencing an empty set #13965
  • [3.8] bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) #13967
  • [3.7] bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) #13968
  • 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 = 'https://github.com/rhettinger'
    closed_at = <Date 2019-06-11.09:01:44.022>
    created_at = <Date 2019-06-10.22:01:36.483>
    labels = ['3.8', '3.7', 'library', '3.9']
    title = 'empty set difference does not check types of values'
    updated_at = <Date 2019-06-11.09:01:44.021>
    user = 'https://github.com/asottile'

    bugs.python.org fields:

    activity = <Date 2019-06-11.09:01:44.021>
    actor = 'rhettinger'
    assignee = 'rhettinger'
    closed = True
    closed_date = <Date 2019-06-11.09:01:44.022>
    closer = 'rhettinger'
    components = ['Library (Lib)']
    creation = <Date 2019-06-10.22:01:36.483>
    creator = 'Anthony Sottile'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37219
    keywords = ['patch']
    message_count = 5.0
    messages = ['345147', '345181', '345199', '345200', '345205']
    nosy_count = 2.0
    nosy_names = ['rhettinger', 'Anthony Sottile']
    pr_nums = ['13965', '13967', '13968']
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue37219'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @asottile
    Copy link
    Mannequin Author

    asottile mannequin commented Jun 10, 2019

    This is a regression from python2.x behaviour:

    $ python2
    Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) 
    [GCC 7.3.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> x = set()
    >>> x.difference(123)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: 'int' object is not iterable
    
    
    $ python3.8
    Python 3.8.0b1 (default, Jun  6 2019, 03:44:52) 
    [GCC 7.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> x = set()
    >>> x.difference(123)
    set()

    The regression appears to be introduced in this patch: 4103e4d

    4103e4dfbce

    @asottile asottile mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir labels Jun 10, 2019
    @rhettinger
    Copy link
    Contributor

    Nice catch. Thanks.

    @rhettinger rhettinger self-assigned this Jun 11, 2019
    @rhettinger
    Copy link
    Contributor

    New changeset 1f11cf9 by Raymond Hettinger in branch 'master':
    bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965)
    1f11cf9

    @rhettinger
    Copy link
    Contributor

    New changeset 583ff84 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':
    bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13967)
    583ff84

    @rhettinger
    Copy link
    Contributor

    New changeset 1b615b2 by Raymond Hettinger in branch '3.7':
    [3.7] bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13968)
    1b615b2

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant