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

Overzealous deprecation of BaseException.message #49966

Closed
tseaver opened this issue Apr 7, 2009 · 4 comments
Closed

Overzealous deprecation of BaseException.message #49966

tseaver opened this issue Apr 7, 2009 · 4 comments
Labels
stdlib Python modules in the Lib dir

Comments

@tseaver
Copy link

tseaver commented Apr 7, 2009

BPO 5716
Nosy @ncoghlan, @ezio-melotti
Superseder
  • bpo-6844: BaseException DeprecationError raises inappropriately
  • 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 2009-12-11.23:13:03.040>
    created_at = <Date 2009-04-07.12:07:04.568>
    labels = ['library']
    title = 'Overzealous deprecation of BaseException.message'
    updated_at = <Date 2009-12-11.23:13:03.038>
    user = 'https://bugs.python.org/tseaver'

    bugs.python.org fields:

    activity = <Date 2009-12-11.23:13:03.038>
    actor = 'ezio.melotti'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-12-11.23:13:03.040>
    closer = 'ezio.melotti'
    components = ['Library (Lib)']
    creation = <Date 2009-04-07.12:07:04.568>
    creator = 'tseaver'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 5716
    keywords = []
    message_count = 4.0
    messages = ['85695', '85710', '96270', '96278']
    nosy_count = 6.0
    nosy_names = ['tseaver', 'ncoghlan', 'bethard', 'ezio.melotti', 'frankoid', 'aisaac']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '6844'
    type = None
    url = 'https://bugs.python.org/issue5716'
    versions = ['Python 2.6']

    @tseaver
    Copy link
    Author

    tseaver commented Apr 7, 2009

    I'm working on cleaning up deprecations for Zope and related
    packages under Python 2.6. The irony here is that I'm receiving
    deprecation warnings for custom exception classes which had a 'message'
    attribute long before the abortive attempt to add them to the
    BaseException type, which hardly seems reasonable.

    For instance, docutils.parsers.rst defines a DirectiveError which takes
    two arguments, 'level' and 'message', and therefore gets hit with the
    deprecation (even though it never used the new signature). Likewise,
    ZODB.POSException defines a ConflictError type which takes 'message' as
    one of several arguments, all optional, and has since at least 2002.

    I don't think either of these classes should be subject to a deprecation
    warning for a feature they never used or depended on.

    @tseaver tseaver added the stdlib Python modules in the Lib dir label Apr 7, 2009
    @bethard
    Copy link
    Mannequin

    bethard mannequin commented Apr 7, 2009

    I've run into exactly the same thing. The argparse module's
    ArgumentError had a "message" attribute back in Python 2.4, and in
    Python 2.6 I get the same warnings Tres is getting.

    @aisaac
    Copy link
    Mannequin

    aisaac mannequin commented Dec 11, 2009

    FYI a patch has been committed that should fix this. For discussion see
    http://bugs.python.org/issue6844

    @ezio-melotti
    Copy link
    Member

    Closing this as a duplicate of bpo-6844.

    @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
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants