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

Clinic fixes: add converters with length, version directive, "self converter" #63929

Closed
larryhastings opened this issue Nov 23, 2013 · 5 comments
Assignees
Labels
build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@larryhastings
Copy link
Contributor

BPO 19730
Nosy @brettcannon, @ncoghlan, @pitrou, @larryhastings
Files
  • larry.misc.clinic.fixes.diff.1.patch
  • larry.misc.clinic.fixes.diff.3.patch
  • 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/larryhastings'
    closed_at = <Date 2013-11-23.22:54:56.541>
    created_at = <Date 2013-11-23.02:28:12.286>
    labels = ['type-bug', 'build']
    title = 'Clinic fixes: add converters with length, version directive, "self converter"'
    updated_at = <Date 2013-11-23.22:54:56.540>
    user = 'https://github.com/larryhastings'

    bugs.python.org fields:

    activity = <Date 2013-11-23.22:54:56.540>
    actor = 'larry'
    assignee = 'larry'
    closed = True
    closed_date = <Date 2013-11-23.22:54:56.541>
    closer = 'larry'
    components = ['Build']
    creation = <Date 2013-11-23.02:28:12.286>
    creator = 'larry'
    dependencies = []
    files = ['32790', '32814']
    hgrepos = []
    issue_num = 19730
    keywords = ['patch']
    message_count = 5.0
    messages = ['203958', '204016', '204036', '204115', '204124']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'pitrou', 'larry', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue19730'
    versions = ['Python 3.4']

    @larryhastings
    Copy link
    Contributor Author

    Two minor changes for Argument Clinic.

    • Added a "version" directive, so a programmer can require a
      specific version (or better) of Clinic.

    • Finished off support for all the 'legacy' converters. The ones today
      were those that give off a "length" parameter. This was complicated
      by finally dealing properly with the Py_buffer conversion stuff.

    To properly handle length parameters, I had to support PY_SSIZE_T_CLEAN being turned off (when are we gonna throw that away?). So I added a new type to pyports.h, Py_ssize_clean_t, which is either an int or a Py_ssize_t depending on PY_SSIZE_T_CLEAN.

    I've run out of gas and am going to bed. I know I have two TODO items in the diff so far; I'll deal with those tomorrow. But can I get a quick review of the rest, so I can get this in tomorrow?

    @larryhastings larryhastings self-assigned this Nov 23, 2013
    @larryhastings larryhastings added build The build process and cross-build type-bug An unexpected behavior, bug, or error labels Nov 23, 2013
    @pitrou
    Copy link
    Member

    pitrou commented Nov 23, 2013

    Argument Clinic is an internal tool, so I don't think it's bound by the feature freeze.
    (and, besides, you are the RM :-))

    @ncoghlan
    Copy link
    Contributor

    +1 to what Antoine said - keeping the initial iteration internal only
    actually buys us some time :)

    @larryhastings
    Copy link
    Contributor Author

    Attached is a fresh patch. I added a third new feature: the "self converter", which allows you to change the type of (or rename) self. For an example of its use, check out dbm.dbm.get in Modules/_dbmmodule.c.

    @larryhastings larryhastings changed the title Clinic fixes: add converters with length, version directive Clinic fixes: add converters with length, version directive, "self converter" Nov 23, 2013
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 23, 2013

    New changeset 760ccd78e874 by Larry Hastings in branch 'default':
    Issue bpo-19730: Argument Clinic now supports all the existing PyArg
    http://hg.python.org/cpython/rev/760ccd78e874

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Dec 20, 2023
    The 'version' directive was introduced with pythongh-63929 in Nov 2013. It has
    not been in use in the CPython code base, and the 'version' variable has
    never been bumped.
    erlend-aasland added a commit that referenced this issue Dec 21, 2023
    The 'version' directive was introduced with gh-63929 in Nov 2013. It has
    not been in use in the CPython code base, and the 'version' variable has
    never been bumped.
    ryan-duve pushed a commit to ryan-duve/cpython that referenced this issue Dec 26, 2023
    …ython#113341)
    
    The 'version' directive was introduced with pythongh-63929 in Nov 2013. It has
    not been in use in the CPython code base, and the 'version' variable has
    never been bumped.
    kulikjak pushed a commit to kulikjak/cpython that referenced this issue Jan 22, 2024
    …ython#113341)
    
    The 'version' directive was introduced with pythongh-63929 in Nov 2013. It has
    not been in use in the CPython code base, and the 'version' variable has
    never been bumped.
    aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
    …ython#113341)
    
    The 'version' directive was introduced with pythongh-63929 in Nov 2013. It has
    not been in use in the CPython code base, and the 'version' variable has
    never been bumped.
    Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
    …ython#113341)
    
    The 'version' directive was introduced with pythongh-63929 in Nov 2013. It has
    not been in use in the CPython code base, and the 'version' variable has
    never been bumped.
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants