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

Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type. #87905

Closed
shreyanavigyan mannequin opened this issue Apr 6, 2021 · 10 comments
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes docs Documentation in the Doc dir

Comments

@shreyanavigyan
Copy link
Mannequin

shreyanavigyan mannequin commented Apr 6, 2021

BPO 43739
Nosy @rhettinger, @scoder, @miss-islington, @shreyanavigyan
PRs
  • [3.10] bpo-43739: Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type (GH-25207) #25207
  • [3.9] bpo-43739: Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type (GH-25330) #25330
  • [3.8] bpo-43739: Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type (GH-25331) #25331
  • [3.8] bpo-43739: Add type declaration Doc/extending/extending.rst example #25332
  • [3.9] bpo-43739: Add type declaration Doc/extending/extending.rst example #25333
  • 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 2021-04-10.16:25:49.315>
    created_at = <Date 2021-04-06.06:37:16.306>
    labels = ['3.8', '3.9', '3.10', 'docs']
    title = 'Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type.'
    updated_at = <Date 2021-04-10.16:25:49.315>
    user = 'https://github.com/shreyanavigyan'

    bugs.python.org fields:

    activity = <Date 2021-04-10.16:25:49.315>
    actor = 'rhettinger'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2021-04-10.16:25:49.315>
    closer = 'rhettinger'
    components = ['Documentation']
    creation = <Date 2021-04-06.06:37:16.306>
    creator = 'shreyanavigyan'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43739
    keywords = ['patch']
    message_count = 10.0
    messages = ['390281', '390356', '390543', '390705', '390708', '390718', '390720', '390722', '390723', '390724']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'scoder', 'docs@python', 'python-dev', 'miss-islington', 'shreyanavigyan']
    pr_nums = ['25207', '25330', '25331', '25332', '25333']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue43739'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    @shreyanavigyan
    Copy link
    Mannequin Author

    shreyanavigyan mannequin commented Apr 6, 2021

    In the example code of the Extending Python with C/C++ documentation the pmodule variable (that stores the return value of PyImport_ImportModule) was never declared. The PR(s) attached to this issue fixes it by declaring and initializing the pmodule variable. This issue is common in all the documentation versions. The first PR will be for documentation version 3.10. If it's accepted then I would request other developers to submit PRs for documentation 3.9, 3.8, 3.7 and 3.6 because I'm having a problem switching to those branches (I'm continuously facing the problem "HEAD detached" if I switch to those branches).

    Thanking you

    With Regards

    @shreyanavigyan shreyanavigyan mannequin added build The build process and cross-build 3.7 (EOL) end of life 3.10 only security fixes 3.8 only security fixes 3.9 only security fixes labels Apr 6, 2021
    @shreyanavigyan shreyanavigyan mannequin added docs Documentation in the Doc dir build The build process and cross-build 3.7 (EOL) end of life 3.10 only security fixes 3.8 only security fixes 3.9 only security fixes labels Apr 6, 2021
    @shreyanavigyan shreyanavigyan mannequin added the docs Documentation in the Doc dir label Apr 6, 2021
    @shreyanavigyan
    Copy link
    Mannequin Author

    shreyanavigyan mannequin commented Apr 6, 2021

    Please have a review of my change in the documentation.

    (Note: I have not signed the Python CLA because I think a simple fix in the documentation doesn't require it.)

    @shreyanavigyan
    Copy link
    Mannequin Author

    shreyanavigyan mannequin commented Apr 8, 2021

    Please have a review.

    @shreyanavigyan shreyanavigyan mannequin removed build The build process and cross-build labels Apr 8, 2021
    @shreyanavigyan
    Copy link
    Mannequin Author

    shreyanavigyan mannequin commented Apr 10, 2021

    I've signed the PSF CLA (as it is required) now. Please have a review.

    @shreyanavigyan
    Copy link
    Mannequin Author

    shreyanavigyan mannequin commented Apr 10, 2021

    I've managed to overcome the "HEAD Detached" problem I was facing when switching to the 3.9, 3.8, 3.7 and 3.6 branches. So I'm also submitting the PRs for those documentation versions.

    @shreyanavigyan
    Copy link
    Mannequin Author

    shreyanavigyan mannequin commented Apr 10, 2021

    Documentation versions older than 3.8 describes a different approach to import the module. Therefore those documentation versions are not to be messed with. I've attached the PRs for documentation versions 3.10, 3.9 and 3.8. Please anyone have a review of my PR as soon as possible.

    Thanking you,

    With Regards

    @shreyanavigyan shreyanavigyan mannequin removed the 3.7 (EOL) end of life label Apr 10, 2021
    @rhettinger
    Copy link
    Contributor

    New changeset ea9b2d6 by Shreyan Avigyan in branch 'master':
    bpo-43739: Add type declaration Doc/extending/extending.rst example
    ea9b2d6

    @rhettinger
    Copy link
    Contributor

    New changeset 3a3c046 by Miss Islington (bot) in branch '3.8':
    bpo-43739: Add type declaration Doc/extending/extending.rst example (GH-25332)
    3a3c046

    @rhettinger
    Copy link
    Contributor

    New changeset 28fb2d1 by Miss Islington (bot) in branch '3.9':
    bpo-43739: Add type declaration Doc/extending/extending.rst example (GH-25333)
    28fb2d1

    @rhettinger
    Copy link
    Contributor

    Thanks for the PR

    @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.8 only security fixes 3.9 only security fixes 3.10 only security fixes docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant