Serhiy Storchaka
91822018ee
gh-115233: Fix an example in the Logging Cookbook (GH-115325)
...
Also add more tests for LoggerAdapter.
Also support stacklevel in LoggerAdapter._log().
2024-02-12 18:24:45 +02:00
Nikita Sobolev
705c76d4a2
gh-114785: Remove content from `Porting from Python2` how-to ( #114805 )
...
Keep the page though, because people might still rely on it (the traffic shows that they do).
Instead of our own manual we now give links to the 3rd-party ones.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-12 14:59:58 +03:00
Nikita Sobolev
72d2d0f10d
gh-114803: Mention that `@dataclass` should not be applied on enums (GH-114891)
...
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2024-02-03 13:55:38 -08:00
Mariusz Felisiak
28bb2961ba
Update LOGGING example taken from Django docs. ( #114903 )
...
For example, Django no longer provides a custom NullHandler
6c66a41c3d
* Remove require_debug_true.
2024-02-03 09:37:21 +02:00
Nikita Sobolev
dc01b919c7
gh-101100: Fix sphinx warnings in `howto/logging.rst` ( #114846 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-01 20:37:55 +02:00
Hugo van Kemenade
c2808431b3
gh-101100: Fix Sphinx warnings in `howto/urllib2.rst` and `library/http.client.rst` ( #114060 )
2024-01-14 20:38:53 +00:00
Raymond Hettinger
901a971e16
gh-113625: Align object addresses in the Descriptor HowTo Guide ( #113894 )
2024-01-10 17:23:40 +01:00
Vaishnavi Maheshwari
00cdd416fc
gh-113350: Improve the wording of python logging docs to remove an ambiguity around use of the word "higher". (GH-113491)
...
Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
2023-12-27 07:51:45 +00:00
Hugo van Kemenade
4e67644d36
gh-101100: Fix Sphinx warnings in `howto/isolating-extensions.rst` ( #113493 )
2023-12-26 12:40:48 -07:00
Alex Waygood
4c5b9c107a
gh-101100: Improve documentation on function attributes ( #112933 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-11 12:00:42 +02:00
Ethan Furman
de6bca9564
gh-112328: [Enum] Make some private attributes public. (GH-112514)
...
* [Enum] Make some private attributes public.
- ``_EnumDict`` --> ``EnumDict``
- ``EnumDict._member_names`` --> ``EnumDict.member_names``
- ``Enum._add_alias_``
- ``Enum._add_value_alias_``
---------
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-12-05 08:27:36 -08:00
Ethan Furman
f9e6ce0395
[Enum] update class creation for RuntimeError changes (GH-111815)
2023-11-28 20:40:12 -08:00
Raymond Hettinger
f93a4ef7a9
Descriptor HowTo: Sync the error-messages with the C code. Add tests. (gh-112403)
2023-11-25 16:18:00 -06:00
Raymond Hettinger
d9fc15222e
Remove bogus annotations from the descriptor howto guide ( #112349 )
2023-11-23 15:16:00 -06:00
Petr Viktorin
985679f05d
gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504)
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2023-11-16 12:05:44 +01:00
Ryuji Tsutsui
0cfdd6e3d1
Fix typo in perf profiling docs ( #112112 )
2023-11-15 15:40:19 +00:00
Hugo van Kemenade
7d21e3d5ee
gh-111895: Convert definition list to bullet list for readability on mobile ( #111898 )
...
Convert definition list to bullet list for readability on mobile
2023-11-09 20:50:27 +02:00
Jelle Zijlstra
8ab7ad6308
Glossary: Add "static type checker" ( #111837 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-08 14:38:36 +00:00
Nikita Sobolev
f48e669504
gh-111724: Fix doctest `ResourceWarning` in `howto/descriptor.rst` ( #111725 )
...
Close database connection explicitly in test cleanup.
2023-11-04 10:22:19 +01:00
Nikita Sobolev
c4dc5a6ae8
gh-111181: Fix enum doctests (GH-111180)
...
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-10-30 12:56:29 -07:00
Raymond Hettinger
7f9a99e854
gh-89519: Remove classmethod descriptor chaining, deprecated since 3.11 (gh-110163)
2023-10-27 00:24:56 -05:00
Nick
c84b0390c0
gh-110383: Italicize variable name ( #111206 )
2023-10-23 07:56:36 +00:00
Nick
1172d02f9f
gh-110383: Added explanation about simplest regex use case for quantifiers. ( #111110 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-23 10:22:17 +03:00
Ezio Melotti
718391f475
gh-110631: Fix reST indentation ( #110724 )
...
* Fix wrong indentation in the other dirs.
* Fix more wrong indentation.
2023-10-11 22:43:03 +02:00
Adam Turner
d1f7fae424
GH-107518: Remove the Argument Clinic How-To ( #109900 )
...
* Remove the content of the Argument Clinic HOWTO
* Update cross-references to the Argument Clinic
* Add a note directing readers to the devguide
2023-10-11 14:57:51 +02:00
Masaru Tsuchiyama
de2a4036cb
gh-108277: Add os.timerfd_create() function ( #108382 )
...
Add wrapper for timerfd_create, timerfd_settime, and timerfd_gettime to os module.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-07 19:33:22 +02:00
Harmen Stoppels
a13620685f
Fix env var typo in perf profiling docs ( #110404 )
...
Fix typo in docs
2023-10-05 20:27:19 +03:00
Yuki K
bfd94ab9e9
gh-101100: Fix references to ``URLError`` and ``HTTPError`` in ``howto/urllib2.rst`` ( #107966 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-29 08:35:29 +00:00
Serhiy Storchaka
92af0cc580
gh-109634: Use :samp: role (GH-109635)
2023-09-23 09:31:20 +03:00
Ethan Furman
d48760b2f1
gh-108682: [Enum] raise TypeError if super().__new__ called in custom __new__ (GH-108704)
...
When overriding the `__new__` method of an enum, the underlying data type should be created directly; i.e. .
member = object.__new__(cls)
member = int.__new__(cls, value)
member = str.__new__(cls, value)
Calling `super().__new__()` finds the lookup version of `Enum.__new__`, and will now raise an exception when detected.
2023-08-31 12:45:12 -07:00
Victor Stinner
2928e5dc65
gh-108494: Argument Clinic: Document how to generate code that uses the limited C API ( #108584 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-08-30 16:02:48 +02:00
Hugo van Kemenade
c7cef54631
gh-101100: Fix Sphinx warnings in the Logging Cookbook ( #108678 )
2023-08-30 14:37:45 +03:00
Daniele Procida
809ea7c4b6
gh-107432 Update Porting Python 2 Code to Python 3 how-to (GH-107434)
...
https://docs.python.org/3/howto/pyporting.html#porting-python-2-code-to-python-3 was written for another time. In this patch:
- material that frames Python 3 as "new" is removed
- descriptions and directions have been trimmed
2023-08-24 11:28:23 +02:00
David Lechner
47022a079e
docs: fix grammar in isolating-extensions.rst ( #108037 )
2023-08-21 15:41:34 +00:00
Serhiy Storchaka
2f311437cd
gh-107704: Argument Clinic: add support for deprecating keyword use of parameters (GH-107984)
...
It is now possible to deprecate passing keyword arguments for
keyword-or-positional parameters with Argument Clinic, using the new
'/ [from X.Y]' syntax.
(To be read as "positional-only from Python version X.Y")
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-19 10:13:35 +03:00
Erlend E. Aasland
34cafd35e3
Docs: clean up Argument Clinic howto's ( #107797 )
...
- fix formatting in @text_signature howto and NEWS entry
- fix formatting and example text in deprecate-positionals howto
2023-08-09 09:43:02 +02:00
Erlend E. Aasland
0be3743f54
gh-104683: Add --exclude option to Argument Clinic CLI ( #107770 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-08 20:50:54 +00:00
Erlend E. Aasland
a9aeb99579
gh-86457: Add docs for Argument Clinic @text_signature directive ( #107747 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-08 08:42:08 +02:00
Erlend E. Aasland
33cb0b06ef
gh-95065: Add Argument Clinic support for deprecating positional use of parameters ( #95151 )
...
It is now possible to deprecate passing parameters positionally with
Argument Clinic, using the new '* [from X.Y]' syntax.
(To be read as "keyword-only from Python version X.Y")
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-07 11:28:08 +00:00
Erlend E. Aasland
a6675b1a59
Docs: Argument Clinic: Move the CConverter class to the reference ( #107671 )
2023-08-07 02:08:34 +02:00
Erlend E. Aasland
4a5b4221e3
Docs: Argument Clinic: Improve 'How to write a custom converter' ( #107328 )
...
- Omit unneccesary wording and sentences
- Don't mention implementation details (no digression, explanation)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-08-05 20:19:37 +00:00
Daniele Procida
5e2746d6e2
gh-107432 Fix incorrect indentation in annotations HOWTO ( #107445 )
...
gh-107432 Fix incorrect indentation in annotations document
Body text in https://docs.python.org/3/howto/annotations.html was
indented throughout, and was being rendered in blockquote elements.
2023-08-05 14:28:28 +03:00
Eric Snow
fb344e99aa
gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters ( #107403 )
...
It was added in 3.12 for PEP 684 (per-interpreter GIL).
2023-07-31 17:03:01 -06:00
Erlend E. Aasland
abb71c6a8f
gh-107507: Replace 'The goals of Argument Clinic' with a summary ( #107508 )
...
Summarise the goals of Argument Clinic in a single sentence.
Mention that Argument Clinic was introduced with PEP-436.
2023-07-31 23:33:13 +02:00
Serhiy Storchaka
f2d07d3289
gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386)
2023-07-29 08:48:10 +03:00
Serhiy Storchaka
983305268e
gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345)
2023-07-27 18:44:32 +03:00
Erlend E. Aasland
2ad699002e
Docs: Argument Clinic: Restructure "Basic concepts and usage" ( #106981 )
...
Split "Basic concepts and usage" into:
- Reference
- Terminology
- CLI reference
- Background
- Basic concepts
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-07-26 22:08:43 +00:00
Erlend E. Aasland
592395577c
Docs: Remove the numbered steps from the Argument Clinic tutorial ( #107203 )
...
Instead, order the tutorial as one body of prose, making it easier to
align the tutorial according to Diátaxis principles.
2023-07-26 22:54:25 +02:00
Serhiy Storchaka
af61cb9c78
gh-107091: Fix some uses of :c:member: role (GH-107129)
2023-07-26 22:16:06 +03:00
Erlend E. Aasland
ff5f94b72c
Docs: Add missing markup to Argument Clinic docs ( #106876 )
...
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-24 15:22:18 +00:00