Skip to content

[3.9] gh-91118: Fix docstrings that do not honor --without-doc-strings (GH-31769) #91663

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
wants to merge 2,106 commits into from

Conversation

arhadthedev
Copy link
Member

Co-authored-by: Éric merwok@netwok.org
Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com
(cherry picked from commit a573cb2)

Co-authored-by: Oleg Iarygin oleg@arhadthedev.net

Erlend Egeberg Aasland and others added 30 commits January 18, 2022 16:58
…30660) (python#30672)

* bpo-46402: Promote SQLite URI tricks in `sqlite3` docs (pythonGH-30660)

Provide some examples of URI parameters in sqlite connect().

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
(cherry picked from commit bdf2ab1)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

* Update suspicious rules
…thonGH-30142) (pythonGH-30675)

This addresses [[bpo-45554]()]() by expanding the `exitcode` documentation to also describe what `exitcode` will be in cases of normal termination, `sys.exit()` called, and on uncaught exceptions.


(cherry picked from commit 3852269)


Co-authored-by: John Marshall <jmarshall@hey.com>
…eting an attribute via PyObject_SetAttr (pythonGH-30639) (pythonGH-30685)

(cherry picked from commit 3bf6315)


Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

Automerge-Triggered-By: GH:iritkatriel
…ammar docs (pythonGH-30341) (pythonGH-30392)

(cherry picked from commit e09d94a)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
…sts (pythonGH-30663) (pythonGH-30692)

(cherry picked from commit 3239829)


Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
…ythonGH-29335) (pythonGH-30689)

The documentation on ``GenericAlias`` objects implies at multiple points that
only container classes can define ``__class_getitem__``. This is misleading.
This PR proposes a rewrite of the documentation to clarify that non-container
classes can define ``__class_getitem__``, and to clarify what it means when a
non-container class is parameterized.

See also: initial discussion of issues with this piece of documentation in
pythonGH-29308, and previous BPO issue [42280](https://bugs.python.org/issue42280).

Also improved references in glossary and typing docs. Fixed some links.

(cherry picked from commit 0eae9a2)

Co-Authored-By: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-Authored-By: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-Authored-By: Alex Waygood <Alex.Waygood@Gmail.com>
The docstrings for MappingProxyType's keys(), values(), and items()
methods were never updated to reflect the changes that Python 3 brought
to these APIs, namely returning views rather than lists.
(cherry picked from commit 2d10fa9)

Co-authored-by: Joshua Bronson <jabronson@gmail.com>
Other descriptions in the same file also use 'bytestring' to refer to bytes objects
(cherry picked from commit 4b99803)

Co-authored-by: Florian Bruhin <me@the-compiler.org>
(cherry picked from commit 263c0dd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
…H-30728)

(cherry picked from commit 71734d0)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
…nGH-30111)

Fix an uncaught exception during help text generation when
argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS
and help is specified.
(cherry picked from commit 9e87c0e)

Co-authored-by: Felix Fontein <felix@fontein.de>
…select.depoll() doc-strings (pythonGH-22406)

(cherry picked from commit 27df756)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
(cherry picked from commit 60705cf)

Co-authored-by: Tom Sparrow <793763+sparrowt@users.noreply.github.com>
…__' (pythonGH-30285)

(cherry picked from commit 881a763)

Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
…mentation file (pythonGH-30768)

(cherry picked from commit 57d1855)

Co-authored-by: Steve Dower <steve.dower@python.org>
The test tested that explicitly deleting the local variable bound to the exception
did not cause problems, but it did not test what it actually claimed to test, i.e.
that the variable is deleted automatically.
(cherry picked from commit 82c5322)

Co-authored-by: Yellow Dusk <yellow.dusk1590@fastmail.com>
(cherry picked from commit 5a53400)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
…) (pythonGH-30790)

Fix a race condition on setting a type __bases__ attribute: the
internal function add_subclass() now gets the
PyTypeObject.tp_subclasses member after calling PyWeakref_NewRef()
which can trigger a garbage collection which can indirectly modify
PyTypeObject.tp_subclasses.
(cherry picked from commit f1c6ae3)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
…onGH-30776) (python#30786)

Code link:
https://github.com/python/cpython/blob/70c16468deee9390e34322d32fda57df6e0f46bb/Lib/http/server.pyGH-L1270

It's been this way since at least 3.4.

Also improved some wording in the same section.
(cherry picked from commit c8a5366)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
…nGH-30801)

(cherry picked from commit 1ded8ed)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
…ythonGH-21735) (pythonGH-30727)

(cherry picked from commit a1652da)

Co-authored-by: Shane Harvey <shnhrv@gmail.com>

Co-authored-by: Shane Harvey <shnhrv@gmail.com>
…r fix typo in '%W' format code description (pythonGH-30232) (pythonGH-30703)

A small change to the documentation of datetime module , in the format codes section of stftime and strptime. Changed the description of format code '%W' from 'as a decimal number' to 'a zero padded   decimal number' so it's in line with the example having leading zeros.  Similar to the format code '%U' above.

Automerge-Triggered-By: GH:pganssle
(cherry picked from commit d45cd2d)

Co-authored-by: Evan <binary-signal@users.noreply.github.com>

Co-authored-by: Evan <binary-signal@users.noreply.github.com>
…ib_metadata 4.10.1) (pythonGH-30803). (pythonGH-30828)

(cherry picked from commit 51c3e28)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
…slash (pythonGH-30283) (pythonGH-30738)

(cherry picked from commit cfadcc3)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
… (pythonGH-30757)

Ensure that directory file descriptors refer to directories different
from the current directory, and that src_dir_fd and dst_dir_fd refer
to different directories.

Add context manager open_dir_fd() in test.support.os_helper.
(cherry picked from commit 54610bb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
… sequences in f-strings. (pythonGH-30865) (30867)

* bpo-46503: Prevent an assert from firing.  Also fix one nearby tiny PEP-7 nit.

* Added blurb.
(cherry picked from commit 0daf721)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
@arhadthedev
Copy link
Member Author

I accidentally targeted a wrong branch (main instead of 3.9). @AlexWaygood, thank you for cancelling the massive review call.

@AlexWaygood
Copy link
Member

I accidentally targeted a wrong branch (main instead of 3.9). @AlexWaygood, thank you for cancelling the massive review call.

No worries, it happens :)

@arhadthedev arhadthedev restored the backport-a573cb2-3.9 branch April 18, 2022 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.