Skip to content

"Argument Clinic How-To" misses generate_global_objects step #97956

Description

@sobolevn

Documentation

Right now our How-To Clinic guide does not mention that it is required to run python Tools/scripts/generate_global_objects.py command to generate global objects used by _Py_ID(), like in here:

    #define NUM_KEYWORDS 1
    static struct {
        PyGC_Head _this_is_not_used;
        PyObject_VAR_HEAD
        PyObject *ob_item[NUM_KEYWORDS];
    } _kwtuple = {
        .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
        .ob_item = { &_Py_ID(only_keys), },   // <--- Here!
    };
    #undef NUM_KEYWORDS

With this command the build fails.
I will send a PR to update docs today.

CC @larryhastings :)

Activity

  1. self-assigned this
    on Oct 6, 2022
  2. added a commit that references this issue on Oct 6, 2022
  3. larryhastings commented on Oct 6, 2022

    @larryhastings
    Contributor

    generate_global_objects.py is new, Argument Clinic is many years older. It sounds like the generate_global_objects.py authors should have added this documentation when they added this new feature.

  4. added a commit that references this issue on Oct 7, 2022
  5. added a commit that references this issue on Oct 8, 2022
  6. added a commit that references this issue on Oct 11, 2022
  7. sobolevn commented on Oct 12, 2022

    @sobolevn
    MemberAuthor

    Done! ✅

  8. added a commit that references this issue on Sep 8, 2023
  9. added a commit that references this issue on Sep 13, 2023
  10. added a commit that references this issue on Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dir

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions