Skip to content

co_qualname "new in version" information missing in doc #115405

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

Closed
christophe-papazian opened this issue Feb 13, 2024 · 3 comments · Fixed by #115411
Closed

co_qualname "new in version" information missing in doc #115405

christophe-papazian opened this issue Feb 13, 2024 · 3 comments · Fixed by #115411
Labels
docs Documentation in the Doc dir triaged The issue has been accepted as valid by a triager.

Comments

@christophe-papazian
Copy link
Contributor

christophe-papazian commented Feb 13, 2024

Documentation

Usually documentation includes deprecated or "new in version" tags for all features.

the field co_qualname in code objects was added in python 3.11 but the documentation does not precise that, and it feels like it was always defined

https://docs.python.org/3/reference/datamodel.html#index-58

Linked PRs

@christophe-papazian christophe-papazian added the docs Documentation in the Doc dir label Feb 13, 2024
@christophe-papazian
Copy link
Contributor Author

christophe-papazian commented Feb 13, 2024

Some proposal fix:

index 885ee825c1..88bc025c7c 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1134,6 +1134,8 @@ Special read-only attributes
    * - .. attribute:: codeobject.co_qualname
      - The fully qualified function name
 
+       .. versionadded:: 3.11
+
    * - .. attribute:: codeobject.co_argcount
      - The total number of positional :term:`parameters <parameter>`
        (including positional-only parameters and parameters with default values)

@AlexWaygood
Copy link
Member

AlexWaygood commented Feb 13, 2024

Some proposal fix:

index 885ee825c1..88bc025c7c 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1134,6 +1134,8 @@ Special read-only attributes
    * - .. attribute:: codeobject.co_qualname
      - The fully qualified function name
 
+       .. versionadded:: 3.11
+
    * - .. attribute:: codeobject.co_argcount
      - The total number of positional :term:`parameters <parameter>`
        (including positional-only parameters and parameters with default values)

Looks good to me! Would you like to make a PR?

@AlexWaygood AlexWaygood added the triaged The issue has been accepted as valid by a triager. label Feb 13, 2024
@christophe-papazian
Copy link
Contributor Author

ok, I'll do that.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 13, 2024
… documentation (pythonGH-115411)

(cherry picked from commit de07941)

Co-authored-by: Christophe Papazian <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 13, 2024
… documentation (pythonGH-115411)

(cherry picked from commit de07941)

Co-authored-by: Christophe Papazian <[email protected]>
AlexWaygood pushed a commit that referenced this issue Feb 13, 2024
…s documentation (GH-115411) (#115413)

gh-115405: add versionadded tag for co_qualname in code objects documentation (GH-115411)
(cherry picked from commit de07941)

Co-authored-by: Christophe Papazian <[email protected]>
AlexWaygood pushed a commit that referenced this issue Feb 13, 2024
…s documentation (GH-115411) (#115412)

gh-115405: add versionadded tag for co_qualname in code objects documentation (GH-115411)
(cherry picked from commit de07941)

Co-authored-by: Christophe Papazian <[email protected]>
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this issue Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir triaged The issue has been accepted as valid by a triager.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants