Commit Graph

114729 Commits

Author SHA1 Message Date
Adam Turner 192d401ba5
gh-93738: Documentation C syntax (:c:type:`FILE` -> :c:expr:`FILE`) (#97769)
:c:type:`FILE` -> :c:expr:`FILE`
2022-10-04 16:27:29 -07:00
Adam Turner 8b211b4cdb
gh-93738: Documentation C syntax (:c:type:`TYPE` -> :c:expr:`TYPE`) (#97770)
:c:type:`TYPE` -> :c:expr:`TYPE`
2022-10-04 16:26:36 -07:00
Adam Turner a0f5599aac
gh-93738: Documentation C syntax (Use `c:struct`) (#97772)
Use `c:struct`
2022-10-04 16:26:14 -07:00
Adam Turner fa59bda8d3
gh-93738: Documentation C syntax (:c:data:`view->obj` -> :c:expr:`view->obj`) (#97773)
:c:data:`view->obj` -> :c:expr:`view->obj`
2022-10-04 16:18:09 -07:00
C.A.M. Gerlach a77d9dedcd
gh-95913: Copyedit/improve Other Language Changes What's New section (#97719)
* Add/refine cross references to items in other lang changes section

* Unify context manager exception changes into single non-repetitive item

* More clearly describe the intent and consequences of the -P option

* Apply minor clarifications & copyedits to rest of section

* Tweak the formatting of module references

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-10-05 01:16:37 +02:00
Adam Turner 0bf6a617ed
gh-93738: Documentation C syntax (:c:type:`PyObject` -> :c:expr:`PyObject`) (#97776)
:c:type:`PyObject` -> :c:expr:`PyObject`
2022-10-04 16:13:03 -07:00
Adam Turner 4ebb025031
gh-93738: Documentation C syntax (:c:type:`PyInterpreterState *` -> :c:expr:`PyInterpreterState *`) (#97777)
:c:type:`PyInterpreterState *` -> :c:expr:`PyInterpreterState *`
2022-10-04 16:12:22 -07:00
Adam Turner 510baa429a
gh-93738: Documentation C syntax (:c:type:`PyTupleObject*` -> :c:expr:`PyTupleObject*`) (#97780)
:c:type:`PyTupleObject*` -> :c:expr:`PyTupleObject*`
2022-10-04 16:11:54 -07:00
Adam Turner 9ebc50866b
gh-93738: Documentation C syntax (:c:type:`PyBytesObject*` -> :c:expr:`PyBytesObject*`) (#97782)
:c:type:`PyBytesObject*` -> :c:expr:`PyBytesObject*`
2022-10-04 16:11:34 -07:00
Adam Turner 898834e27b
gh-93738: Documentation C syntax (:c:type:`PyUnicodeObject*` -> :c:expr:`PyUnicodeObject*`) (#97783)
:c:type:`PyUnicodeObject*` -> :c:expr:`PyUnicodeObject*`
2022-10-04 16:11:20 -07:00
Adam Turner a081cae2a2
gh-93738: Documentation C syntax (:c:type:`Py_UNICODE*` -> :c:expr:`Py_UNICODE*`) (#97784)
:c:type:`Py_UNICODE*` -> :c:expr:`Py_UNICODE*`
2022-10-04 16:10:57 -07:00
cousteau ff28d8926d
gh-88355: Fix backslashes in AF_PIPE (#96543)
Fix backslashes in AF_PIPE (#88355)

The correct syntax for AF_PIPE addresses is `\\.\pipe\blahblah`, not `\.\pipe{blahblah}`, but the syntax markup messed up the backslashes.
2022-10-04 15:54:03 -07:00
C.A.M. Gerlach 985958187d
gh-95913: Move py.exe to appropriate What's New section & refine text (#97718)
* Move Windows py.exe improvements from Typing section to New Features

* Add ref target label and use literal for py.exe

* Be clearer/explict about what legacy version arg components reprisent

* Apply other minor clarity and textual fixes to py.exe launcher text

* Refine phrasing of legacy sentence of py.exe desc

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-10-05 00:50:34 +02:00
Ev2geny 743453a554
gh-58451: Add optional delete_on_close parameter to NamedTemporaryFile (GH-97015) 2022-10-04 23:37:33 +01:00
Łukasz Langa bbc7cd649a
gh-97008: Add a Python implementation of AttributeError and NameError suggestions (#97022)
Relevant tests moved from test_exceptions to test_traceback to be able to
compare both implementations.

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
2022-10-04 15:31:16 -07:00
Daniel Giger 7acb93f0d4
gh-96448: fix documentation for _thread.lock.acquire (#96449)
* fix documentation for _thread.lock.acquire

* update formatting of _thread.lock.acquire() doc
2022-10-04 15:18:04 -07:00
Inada Naoki 87679a6e60
gh-90301: Doc: Add references to PEP 686 (#96816)
Doc: Add references to PEP 686.
2022-10-04 15:04:44 -07:00
Guido van Rossum 9fbfa42ece
GH-95913: Update what's new in 3.11 for asyncio (#97806)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-10-04 11:36:20 -07:00
Oleg Iarygin ce8fc186ac
gh-93357: Start porting asyncio server test cases to IsolatedAsyncioTestCase (#93369)
Lay the foundation for further work in `asyncio.test_streams`.
2022-10-04 10:56:47 -07:00
Nikita Sobolev 4f380db1a5
gh-96142: add missing params to `dataclass._DataclassParams` (gh-96382) 2022-10-04 09:53:28 -07:00
Kumar Aditya 53503ff60e
GH-82604: fix docs about configuring selector (#97755) 2022-10-04 09:45:37 -07:00
Ben Faulhaber a120b9f25d
gh-97754: Update doc for default location of per-user installs on Windows (GH-97756) 2022-10-04 17:04:41 +01:00
Skip Montanaro 46eecc3b33
gh-97731: fix distclean target to clean docs (#97732)
fix distclean target to clean docs
2022-10-04 07:38:19 -07:00
Victor Stinner 116fa62c6e
gh-97670: Remove sys.getdxp() and analyze_dxp.py script (#97671)
Remove the sys.getdxp() function and the Tools/scripts/analyze_dxp.py
script. DXP stands for "dynamic execution pairs". They were related
to DYNAMIC_EXECUTION_PROFILE and DXPAIRS macros which have been
removed in Python 3.11. Python can now be built with "./configure
--enable-pystats" to gather statistics on Python opcodes.
2022-10-04 15:28:57 +02:00
William Woodruff 6e53308829
Adjust stable ABI internal documentation (GH-96896)
I was perusing this file, and noticed that this part of the documentation is slightly out of date: the `struct` items in this TOML file currently contain `struct_abi_kind` members, which distinguish between the different types of ABI compatibility described in the comment.

I've updated the comment to reflect this.
2022-10-04 06:05:53 -07:00
Victor Stinner 6cbbc26a73
gh-97669: Remove outdated example scripts (#97675)
Remove outdated example scripts of the Tools/scripts/ directory. A
copy can be found in the old-demos project:
https://github.com/gvanrossum/old-demos

Removed scripts (39):

* byext.py
* byteyears.py
* cleanfuture.py
* copytime.py
* crlf.py
* db2pickle.py
* dutree.doc
* dutree.py
* find-uname.py
* find_recursionlimit.py
* finddiv.py
* findlinksto.py
* findnocoding.py
* fixcid.py
* fixdiv.py
* fixheader.py
* fixnotice.py
* fixps.py
* get-remote-certificate.py
* google.py
* highlight.py
* ifdef.py
* import_diagnostics.py
* lfcr.py
* linktree.py
* lll.py
* mailerdaemon.py
* make_ctype.py
* mkreal.py
* objgraph.py
* pdeps.py
* pickle2db.py
* pindent.py
* pysource.py
* reindent-rst.py
* rgrep.py
* suff.py
* texi2html.py
* which.py

Changes:

* Remove test_fixcid, test_lll, test_pdeps and test_pindent
  of test.test_tools.
* Remove get-remote-certificate.py changelog entry, since the script
  was removed.

Note: there is a copy of crlf.py in Lib/test/test_lib2to3/data/.
2022-10-04 10:49:00 +02:00
matheusja 49802605f8
gh-97709: Included newline separator in Mandelbrot set (#97737)
Included newline separator in Mandelbrot set

Now the Mandelbrot set one-liner example on separates the lines with a '\n' character.
2022-10-03 22:34:02 -07:00
Koki Saito 27e59afa2a
gh-97816: Remove unused variables in `mutliprocessing.managers.Server` (#97817)
Remove unused local variables.
2022-10-03 22:29:17 -07:00
Adam Turner 5e997cff3e
gh-93738: Documentation C syntax (:c:data:`0` -> ``0``) (#97771)
:c:data:`0` -> ``0``
2022-10-04 03:46:30 +02:00
Nikita Sobolev 06016845dc
gh-97639: Remove `tokenize.NL` check from `tabnanny` (#97640)
* gh-97639: Remove `tokenize.NL` check from `tabnanny`

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-10-03 17:41:29 -07:00
Shantanu 72b5a55bc8
Add comment to subtle dataclass code (gh-96133)
In the PR that made this change, 1st1 left a "note to self: add a
comment explaining this". This comment was never added.
https://github.com/python/cpython/pull/9518/files#r280608117

I was reading this code and it wasn't obvious to me why we weren't
exec-ing directly into locals. So I got to learn something new :-)
https://docs.python.org/3/reference/executionmodel.html#interaction-with-dynamic-features
2022-10-03 17:30:04 -07:00
Benjamin Peterson 9e8b86de4e
Remove space. (GH-97807)
Automerge-Triggered-By: GH:benjaminp
2022-10-03 17:12:36 -07:00
Ezio Melotti 231a905c5f
Add `sprint` issues to the Sprint 2022 project. (#97788) 2022-10-04 01:45:18 +02:00
Brandt Bucher 93fcc1f413
GH-97752: Clear the `previous` member of newly-created generator/coroutine frames (GH-97795) 2022-10-04 00:36:52 +01:00
Rohan Shah d053c47bfd
Minor grammar changes to http.client docs (#96221)
Minor grammar changes
2022-10-03 16:19:39 -07:00
Géry Ogam 0c91a12511
Update http.client.rst (#24803)
* Update http.client.rst

* Apply suggestions from code review

Co-authored-by: Éric <merwok@netwok.org>

* Update http.client.rst

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Senthil Kumaran <senthil@python.org>
2022-10-03 16:18:36 -07:00
larryhastings 00b5a08c80
gh-97799: use inspect.get_annotations in dataclass (#97800)
dataclass used to get the annotations on a class object using
cls.__dict__.get('__annotations__').  Now that it always imports
inspect, it can use inspect.get_annotations, which is modern
best practice for coping with annotations.
2022-10-03 15:46:09 -07:00
Ivan Kapeykin d78aa4e11a
multiprocessing docs: Remove extra option ELLIPSIS from section with code (#96625) 2022-10-03 15:41:08 -07:00
Michael 07b8e85d0e
gh-96526: Clarify format and __format__ docstrings (gh-96648) 2022-10-03 15:28:02 -07:00
Boris Verkhovskiy 0ea8b925d0
Document that MozillaCookieJar works for curl's cookie files (#91852)
MozillaCookieJar works for curl's cookies
2022-10-03 15:07:54 -07:00
Gregory P. Smith b0f89cb431
gh-96512: Move int_max_str_digits setting to PyConfig (#96944)
It had to live as a global outside of PyConfig for stable ABI reasons in
the pre-3.12 backports.

This removes the `_Py_global_config_int_max_str_digits` and gets rid of
the equivalent field in the internal `struct _is PyInterpreterState` as
code can just use the existing nested config struct within that.

Adds tests to verify unique settings and configs in subinterpreters.
2022-10-03 13:55:45 -07:00
Michael Droettboom cfbc7dd910
gh-94808: Coverage: Check picklablability of calliter (#95923) 2022-10-03 13:50:30 -07:00
MonadChains 9302e331c7
gh-94808: Add test coverage for PyObject_HasAttrString (#96627)
* gh-94808: Add test for HasAttrString

* Harmonize to Python C code style guidelines

* Add check to verify no exception thrown
2022-10-03 13:37:15 -07:00
hetmankp 3a49dbb98c
gh-94732: Fix KeyboardInterrupt race in asyncio run_forever() (#97765)
Ensure that the event loop's `_thread_id` attribute and the asyncgen hooks set by `sys.set_asyncgen_hooks()` are always restored no matter where a KeyboardInterrupt exception is raised.
2022-10-03 13:34:35 -07:00
Nikita Sobolev 873a2f2527
Fix typos in `bltinmodule.c`. (GH-97766) 2022-10-03 12:09:03 -07:00
Nikita Sobolev e990c6af08
gh-94808: `_PyLineTable_StartsLine` was not used (GH-96609) 2022-10-03 19:35:43 +01:00
Victor Stinner 64fe343717
gh-97681: Remove Tools/demo/ directory (#97682)
Remove the Tools/demo/ directory which contained old demo scripts. A
copy can be found in the old-demos project:
https://github.com/gvanrossum/old-demos

Remove the following old demo scripts:

* beer.py
* eiffel.py
* hanoi.py
* life.py
* markov.py
* mcast.py
* queens.py
* redemo.py
* rpython.py
* rpythond.py
* sortvisu.py
* spreadsheet.py
* vector.py

Changes:

* Remove a reference to the redemo.py script in the regex howto
  documentation.
* Remove a reference to the removed Tools/demo/ directory in the
  curses documentation.
* Update PC/layout/ to remove the reference to Tools/demo/ directory.
2022-10-03 17:09:02 +02:00
annonm e6f9ec5c03
Fix typo in unittest docs (#97742) 2022-10-03 06:35:40 -07:00
Serhiy Storchaka 0ee9619a4c
gh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICODE converter (GH-97729)
It affects function os.system() on Windows and Windows-specific modules
winreg, _winapi, _overlapped, and _msi.
2022-10-03 10:42:54 +03:00
C.A.M. Gerlach e738b5190b
gh-95913: Fix PEP number in PEP 678 What's New ref label (#97739)
What's New: Fix PEP number in PEP 678 ref target label
2022-10-03 06:12:37 +02:00