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

ContextVar does not have a "name" attribute #78166

Closed
vrajivk mannequin opened this issue Jun 27, 2018 · 4 comments
Closed

ContextVar does not have a "name" attribute #78166

vrajivk mannequin opened this issue Jun 27, 2018 · 4 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@vrajivk
Copy link
Mannequin

vrajivk mannequin commented Jun 27, 2018

BPO 33985
Nosy @ned-deily, @1st1, @miss-islington, @vrajivk
PRs
  • bpo-33985: Implement ContextVar.name attribute. #7980
  • [3.7] bpo-33985: Implement ContextVar.name attribute. (GH-7980) #7995
  • 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 2018-06-28.17:58:08.866>
    created_at = <Date 2018-06-27.22:45:59.671>
    labels = ['interpreter-core', '3.8', 'type-bug', '3.7']
    title = 'ContextVar does not have a "name" attribute'
    updated_at = <Date 2018-06-28.17:58:08.865>
    user = 'https://github.com/vrajivk'

    bugs.python.org fields:

    activity = <Date 2018-06-28.17:58:08.865>
    actor = 'yselivanov'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-06-28.17:58:08.866>
    closer = 'yselivanov'
    components = ['Interpreter Core']
    creation = <Date 2018-06-27.22:45:59.671>
    creator = 'rvijayak'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33985
    keywords = ['patch']
    message_count = 4.0
    messages = ['320637', '320639', '320677', '320678']
    nosy_count = 4.0
    nosy_names = ['ned.deily', 'yselivanov', 'miss-islington', 'rvijayak']
    pr_nums = ['7980', '7995']
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33985'
    versions = ['Python 3.7', 'Python 3.8']

    @vrajivk
    Copy link
    Mannequin Author

    vrajivk mannequin commented Jun 27, 2018

    Per PEP-567 and the contextvars documentation, I expected that a ContextVar would have a "name" read-only attribute. However I get an AttributeError when accessing ContextVar.name with 3.7.0rc1:

    > python
    Python 3.7.0rc1 (v3.7.0rc1:dfad352267, Jun 12 2018, 01:00:10) 
    [Clang 6.0 (clang-600.0.57)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from contextvars import ContextVar
    >>> var = ContextVar('var')
    >>> var.name
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    AttributeError: 'ContextVar' object has no attribute 'name'

    @vrajivk vrajivk mannequin added stdlib Python modules in the Lib dir 3.7 (EOL) end of life type-bug An unexpected behavior, bug, or error labels Jun 27, 2018
    @1st1
    Copy link
    Member

    1st1 commented Jun 27, 2018

    Yeah, it seems that I forgot to implement ContextVars.name attribute. Will have a PR shortly.

    Expect to see this fixed in 3.7.1 in a couple of months. Adding Ned to the issue just in case.

    @1st1 1st1 added interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.8 only security fixes release-blocker and removed stdlib Python modules in the Lib dir labels Jun 27, 2018
    @1st1
    Copy link
    Member

    1st1 commented Jun 28, 2018

    New changeset 41cb0ba by Yury Selivanov in branch 'master':
    bpo-33985: Implement ContextVar.name attribute. (GH-7980)
    41cb0ba

    @miss-islington
    Copy link
    Contributor

    New changeset 4c20d2b by Miss Islington (bot) in branch '3.7':
    bpo-33985: Implement ContextVar.name attribute. (GH-7980)
    4c20d2b

    @1st1 1st1 closed this as completed Jun 28, 2018
    @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 interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants