Skip to content

decimal module contains less symbols when the _decimal module is missing #66480

Closed

Description

@vstinner
BPO 22284
Nosy @mdickinson, @vstinner, @skrah

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 2014-09-09.18:01:35.181>
created_at = <Date 2014-08-27.09:59:40.925>
labels = ['type-bug', 'library']
title = 'decimal module contains less symbols when the _decimal module is missing'
updated_at = <Date 2014-09-09.18:01:35.179>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2014-09-09.18:01:35.179>
actor = 'skrah'
assignee = 'none'
closed = True
closed_date = <Date 2014-09-09.18:01:35.181>
closer = 'skrah'
components = ['Library (Lib)']
creation = <Date 2014-08-27.09:59:40.925>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 22284
keywords = []
message_count = 4.0
messages = ['225954', '225956', '226649', '226651']
nosy_count = 4.0
nosy_names = ['mark.dickinson', 'vstinner', 'skrah', 'python-dev']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue22284'
versions = ['Python 3.4', 'Python 3.5']

Activity

  1. vstinner commented on Aug 27, 2014

    @vstinner
    MemberAuthor

    While investigation issue bpo-22283, I noticed that when the _decimal is present, the decimal looses its __all__ attribute. dir(decimal) contains 5 more symbols than decimal.__all__:
    {'ConversionSyntax',
    'DecimalTuple',
    'DivisionImpossible',
    'DivisionUndefined',
    'InvalidContext'}

    These symbols should be added to decimal.__all__, or _decimal should also have a __all__ attribute.

  2. skrah commented on Aug 27, 2014

    skrahmannequin
    Mannequin

    I agree. I plan to fix this as part of bpo-19232. If decimal.py and
    _decimal are split properly, these things show up immediately.

  3. python-dev commented on Sep 9, 2014

    python-devmannequin
    Mannequin

    New changeset 2b3dbbd2bd92 by Stefan Krah in branch '3.4':
    Issue bpo-22284: Update decimal.__all__
    http://hg.python.org/cpython/rev/2b3dbbd2bd92

    New changeset 5bc23c111de1 by Stefan Krah in branch 'default':
    Issue bpo-22284: Merge 3.4
    http://hg.python.org/cpython/rev/5bc23c111de1

  4. skrah commented on Sep 9, 2014

    skrahmannequin
    Mannequin

    I didn't add __all__ to _decimal because of this thread here:

    https://mail.python.org/pipermail/python-dev/2001-February/012591.html

  5. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Sep 9, 2014
  6. added
    type-bugAn unexpected behavior, bug, or error
    on Sep 9, 2014
  7. 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

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions