Commit Graph

22149 Commits

Author SHA1 Message Date
Raymond Hettinger 482b6b565a
Move dangling bullet points into named subsections (GH-13046) 2019-05-01 17:48:13 -07:00
Stefan Behnel e1d5dd645d
bpo-13611: C14N 2.0 implementation for ElementTree (GH-12966)
* Implement C14N 2.0 as a new canonicalize() function in ElementTree.

Missing features:
- prefix renaming in XPath expressions (tag and attribute text is supported)
- preservation of original prefixes given redundant namespace declarations
2019-05-01 22:34:13 +02:00
Géry Ogam ee88af3f4f Namespace packages _bootstrap.ModuleSpec.loader attributes are no longer None (#10376)
Namespace packages _bootstrap.ModuleSpec.loader attributes are no longer `None` _after_ calling the importlib._bootstrap._init_module_attrs function.

See:
* https://stackoverflow.com/questions/52869541/namespace-package-spec-loader-and-loader-attributes-not-set-to-none
* https://bugs.python.org/issue35181
2019-05-01 13:08:17 -07:00
Stefan Behnel dde3eebdaa
bpo-36676: Namespace prefix aware parsing support for the ET.XMLParser target (GH-12885)
* bpo-36676: Implement namespace prefix aware parsing support for the XMLParser target in ElementTree.
2019-05-01 21:49:58 +02:00
Stefan Behnel 43851a202c
bpo-36673: Implement comment/PI parsing support for the TreeBuilder in ElementTree. (#12883)
* bpo-36673: Implement comment/PI parsing support for the TreeBuilder in ElementTree.

* bpo-36673: Rewrite the comment/PI factory handling for the TreeBuilder in "_elementtree" to make it use the same factories as the ElementTree module, and to make it explicit when the comments/PIs are inserted into the tree and when they are not (which is the default).
2019-05-01 21:20:38 +02:00
Utkarsh Gupta ee0309f3d8 closes bpo-35329: Change 'Package' to 'package' in accordance with PEP8. (GH-13008) 2019-04-29 19:20:06 -07:00
Pablo Galindo d5d2b45469
bpo-36751: Deprecate getfullargspec and report positional-only args as regular args (GH-13016)
* bpo-36751: Deprecate getfullargspec and report positional-only args as regular args

* Use inspect.signature in testhelpers
2019-04-30 02:01:14 +01:00
Paul Ganssle 88c0937056 bpo-36004: Add date.fromisocalendar (GH-11888)
This commit implements the first version of date.fromisocalendar, the
inverse function for date.isocalendar.
2019-04-29 15:22:03 +02:00
Guido van Rossum 843bf42aa6 Add initial 'whatsnew' section for PEP 570 (GH-12942) 2019-04-29 13:49:29 +01:00
Joannah Nanjekye f781d202a2 bpo-36475: Finalize PyEval_AcquireLock() and PyEval_AcquireThread() properly (GH-12667)
PyEval_AcquireLock() and PyEval_AcquireThread() now
terminate the current thread if called while the interpreter is
finalizing, making them consistent with PyEval_RestoreThread(),
Py_END_ALLOW_THREADS, and PyGILState_Ensure().
2019-04-29 10:38:45 +02:00
xdegaye 254b309c80 bpo-21536: On Android, C extensions are linked to libpython (GH-12989) 2019-04-29 09:27:40 +02:00
Raymond Hettinger da63b321f6
bpo-36715: Add usage note for dict.fromkeys() (GH-12974) 2019-04-28 00:22:36 -07:00
Paul Ganssle 5c403b2035 bpo-36722: Style and grammar edits for ABI news entries (GH-12979) 2019-04-27 20:14:35 +02:00
Terry Jan Reedy 55d035113d
Syntax highlight IDLE html doc code example. (GH-12981)
The new markup is currently ignored by IDLE's tk doc display.
2019-04-26 23:22:36 -04:00
Victor Stinner 4046069740
bpo-36722: Add What's New entry for debug ABI (GH-12957) 2019-04-26 17:56:44 +02:00
Mark Dickinson 7abb6c05af
bpo-36669: add matmul support to weakref.proxy (GH-12932) 2019-04-26 15:56:15 +09:00
Paul Monson 62dfd7d6fe bpo-35920: Windows 10 ARM32 platform support (GH-11774) 2019-04-25 18:36:45 +00:00
Victor Stinner 8c3ecc6bac
bpo-21536: C extensions are no longer linked to libpython (GH-12946)
On Unix, C extensions are no longer linked to libpython.

It is now possible to load a C extension built using a shared library
Python with a statically linked Python.

When Python is embedded, libpython must not be loaded with
RTLD_LOCAL, but RTLD_GLOBAL instead. Previously, using RTLD_LOCAL, it
was already not possible to load C extensions which were not linked
to libpython, like C extensions of the standard library built by the
"*shared*" section of Modules/Setup.

distutils, python-config and python-config.py have been modified.
2019-04-25 20:13:10 +02:00
Victor Stinner d7befad328
bpo-35537: Document posix_spawn() change in subprocess (GH-11668)
Document that subprocess.Popen no longer raise an exception on error
like missing program on very specific platforms when using
os.posix_spawn() is used.
2019-04-25 14:30:16 +02:00
Victor Stinner f4e4703e74
bpo-36465: Make release and debug ABI compatible (GH-12615)
Release build and debug build are now ABI compatible: the Py_DEBUG
define no longer implies Py_TRACE_REFS define which introduces the
only ABI incompatibility.

A new "./configure --with-trace-refs" build option is now required to
get Py_TRACE_REFS define which adds sys.getobjects() function and
PYTHONDUMPREFS environment variable.

Changes:

* Add ./configure --with-trace-refs
* Py_DEBUG no longer implies Py_TRACE_REFS
2019-04-25 00:56:28 +02:00
Guido van Rossum 09d434caa2
Issue 35224: Add PEP 572 (assignment expressions) to What's New (#12941)
This is meant as a stub, during the PyCon sprints we can iterate.
2019-04-24 11:30:17 -07:00
Joannah Nanjekye 70bf713617 bpo-30840: Document relative imports (#12831)
* document relative imports

* 📜🤖 Added by blurb_it.

* fix indentation error

* remove indentation

* Document relative imports

* Document relative imports

* remove from ...package

* Document relative imports

* remove trailing space

* Document relative imports

* Document relative imports
2019-04-25 01:14:44 +10:00
Mathieu Dupuy 29d018aa63 replace 'sequencial argument' by 'positional' in doc (GH-12925) 2019-04-23 22:01:09 +09:00
Raymond Hettinger fb8c7d5332
bpo-36018: Make "seed" into a keyword only argument (GH-12921) 2019-04-23 01:46:18 -07:00
Jakub Molinski b4c7f39bbf Add module specification: itemgetter -> operator.itemgetter (GH-12823) 2019-04-23 01:30:30 -07:00
Raymond Hettinger 9013ccf6d8
bpo-36546: Add statistics.quantiles() (#12710) 2019-04-23 00:06:35 -07:00
Wu Wei 662ebd2ab2 Doc: add the missing ".tp_flags" in type definition (GH-12902) 2019-04-22 20:08:20 +09:00
mollison 5ebfa840a1 bpo-36645: Fix ambiguous formatting in re.sub() documentation (GH-12879) 2019-04-22 01:14:45 +03:00
Fredrik Averpil 3e986de0d6 Fix typo (GH-12878)
"sychronization" -> "synchronization"
2019-04-20 16:06:38 -07:00
Stefan Behnel e8113f51a8
bpo-30485: Change the prefix for defining the default namespace in ElementPath from None to '' since there is existing code that uses that and it's more convenient to have an all-string-keys dict (e.g. when sorting items etc.). (#12860) 2019-04-18 19:05:03 +02:00
Enrico Alarico Carbognani 7e954e7de4 bpo-36651: Fixed Asyncio Event Loop documentation inconsistency (GH-12866)
# [bpo-36651](https://bugs.python.org/issue36651): Fixed Asyncio Event Loop documentation inconsistency  

In the documentation for the call_later and the call_at methods there is a note which says that the delay cannot be longer than a day, but both methods have a note saying that this limitation was removed in Python 3.8
Here I fixed this issue by removing the pre-exising note and added a versionchanged. 

To test my changes I have rebuilt the documentation with ```make html```. I did not have any errors and the effected page displayed correctly on a browser.



https://bugs.python.org/issue36651
2019-04-18 05:43:14 -07:00
cocoatomo 9941f963fe Fix wrong indentation of a paragraph in documentation (GH-12868)
This paragraph doesn't seem to be a part of code, but merged into previous code block.
2019-04-18 01:54:51 +01:00
josh a6de52c74d bpo-32913: Added re.Match.groupdict example to regex HOWTO (GH-5821) 2019-04-17 15:43:30 -07:00
Lihua Zhao 693c104ae7 bpo-31904: Port test_resource to VxWorks (GH-12719)
Skip tests cases setting RLIMIT_FSIZE and RLIMIT_CPU on VxWorks.
2019-04-17 17:41:33 +02:00
Colin Watson 71ce03df9c Clarify file-closing example in tutorial (GH-11652) 2019-04-17 08:18:37 -04:00
Matthias Bussonnier 31e8d69bfe bpo-33783: Use proper class markup for random.Random docs (GHè7817)
Signed-off-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2019-04-16 18:47:11 +02:00
Stéphane Wirtel 2b7f93b99a
bpo-36345: Update wsgiref example (GH-12562)
Use literalinclude markup to include Tools/scripts/serve.py code.
Tools/scripts/serve.py first argument on the command line is now optional.
2019-04-16 14:52:54 +02:00
Victor Stinner 74125a60b7
bpo-36348: IMAP4.logout() doesn't ignore exc (GH-12411)
The imap.IMAP4.logout() method no longer ignores silently arbitrary
exceptions.

Changes:

* The IMAP4.logout() method now expects a "BYE" untagged response,
  rather than relying on _check_bye() which raises a self.abort()
  exception.
* IMAP4.__exit__() now does nothing if the client already logged out.
* Add more debug info if test_logout() tests fail.
2019-04-15 18:23:20 +02:00
Inada Naoki a3283efd30 Doc: update PendingDeprecationWarning explanation (GH-12837)
Keep the nudge towards DeprecationWarning, but remove the
"Note" markup and generally shorten the description.

Ref: https://github.com/python/cpython/pull/12505/files#r273978757
2019-04-15 22:40:23 +10:00
pxinwr f1464f4d2e bpo-31904: Port the time module on VxWorks (GH-12305)
time.clock() is not available on VxWorks.
2019-04-15 11:06:21 +02:00
pxinwr 236d0b75c4 bpo-31904: Don't build the _crypt extension on VxWorks (GH-12833) 2019-04-15 11:02:20 +02:00
Mickaël Schoentgen 929b704738 bpo-31658: Make xml.sax.parse accepting Path objects (GH-8564) 2019-04-14 11:16:54 +02:00
Stefan Behnel e9927e1820
bpo-30485: support a default prefix mapping in ElementPath by passing None as prefix (#1823) 2019-04-14 10:09:09 +02:00
Bernt Røskar Brenna ffca16e25a bpo-36227: ElementTree.tostring() default_namespace and xml_declaration arguments (GH-12225)
Add new keyword arguments "default_namespace" and "xml_declaration" to functions ET.tostring() and ET.tostringlist(), as known from ElementTree.write().
2019-04-14 10:07:02 +02:00
Pablo Galindo fde9b33dfe
bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread (GH-12541)
Calling these function from a thread when the runtime is finalizing will terminate
the thread, even if the thread was not created by Python. Users can use 
_Py_IsFinalizing or sys.is_finalizing to check if the interpreter is in the process of
being finalized before calling this function to avoid unwanted termination.
2019-04-13 17:23:24 +01:00
Pablo Galindo f2cf1e3e28
bpo-36623: Clean parser headers and include files (GH-12253)
After the removal of pgen, multiple header and function prototypes that lack implementation or are unused are still lying around.
2019-04-13 17:05:14 +01:00
Inada Naoki c88feceb44
Doc: define PY_SSIZE_T_CLEAN always (GH-12794) 2019-04-13 10:46:21 +09:00
Sebastian Rittau 1e8295402b bpo-35581: Document @typing.type_check_only (GH-11312) 2019-04-12 15:33:40 -07:00
mrh1997 1e2ad6c275 bpo-33922: Adding documentation for new "-64" suffix of Python launcher (GH-7849)
Since bpo-30291 it is possible to specify the architecture of Python when using the launcher
2019-04-12 15:26:47 -07:00
Christopher Head b13552c4d7 Indicate that seek and tell are mandatory on BufferedRandom. (GH-11216)
For BufferedReader and BufferedWriter, seek and tell operations are
optional (they may or may not exist based on the underlying stream). For
BufferedRandom, they are mandatory: a BufferedRandom should not be
constructed over an unseekable underlying stream. Document this.
2019-04-12 08:50:40 -07:00
Kingsley M b015fc86f7 bpo-36549: str.capitalize now titlecases the first character instead of uppercasing it (GH-12804) 2019-04-12 08:35:39 -07:00
Victor Stinner 44235041f3
bpo-18748: io.IOBase destructor now logs close() errors in dev mode (GH-12786)
In development mode (-X dev) and in debug build, the io.IOBase
destructor now logs close() exceptions. These exceptions are silent
by default in release mode.
2019-04-12 17:06:47 +02:00
Michael Felt 9d949f7796 bpo-36588: On AIX, remove major version from sys.platform (GH-12787)
On AIX, sys.platform doesn't contain the major version anymore.
Always return 'aix', instead of 'aix3' .. 'aix7'.  Since
older Python versions include the version number, it is recommended to
always use sys.platform.startswith('aix').
2019-04-12 16:15:32 +02:00
Emmanuel Arias 3993ccb682 bpo-20582: add link for manpage for flags on getnameinfo() (GH-11977) 2019-04-11 14:13:37 -07:00
Victor Stinner 4c409beb4c
bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)
Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD,
0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte
patterns than Windows CRT debug malloc() and free().
2019-04-11 13:01:15 +02:00
Inada Naoki b3c92c6ae9
bpo-36597: fix weakref example code (GH-12779)
Commit 57b1a2862 fixed doctest, but example code is not
match with document.
Just skip doctest for the block.
2019-04-11 19:05:32 +09:00
Inada Naoki 57b1a2862a
bpo-36597: fix random doctest failure (GH-12776) 2019-04-11 17:53:49 +09:00
pewscorner efc4870149 bpo-36416: Correct bytes.rpartition documentation (GH-12543) 2019-04-11 15:58:43 +09:00
Inada Naoki 5410d3d283
better __init__.py explanation in tutorial (#12763)
* better __init__.py explanation in tutorial

* Update Doc/tutorial/modules.rst

Co-Authored-By: methane <songofacandy@gmail.com>
2019-04-11 15:10:35 +09:00
Christopher Thorne b5e2959b27 Doc: fix typo in IncrementalDecoder.setstate (GH-12724) 2019-04-11 15:09:29 +09:00
Caleb Marchent 42f55ee500 fix typo in doc (#12686) 2019-04-10 18:03:02 -04:00
Gregory P. Smith 2fb2bc81c3
bpo-14826: document that URLopener quotes fullurl. (GH-12758) 2019-04-10 02:17:48 -07:00
Vidar Tonaas Fauske 0e10766574 bpo-31512: Add non-elevated symlink support for Windows (GH-3652) 2019-04-09 11:19:46 -07:00
Lukas Waymann c324c74887 bpo-33456: site module documentation - fix wrong default for key in pyvenv.cfg (GH-6755) 2019-04-09 08:27:36 +01:00
Matthias Bussonnier a8abe097c1 bpo-33461: emit DeprecationWarning when json.loads(encoding=...) is used (GH-6762) 2019-04-09 16:17:25 +09:00
Steve Palmer 7b97ab35b2 closes bpo-35848: Move all documentation regarding the readinto out of IOBase. (GH-11893)
Move all documentation regarding the readinto method into either io.RawIOBase or io.BufferedIOBase.

Corresponding changes to documentation in the _pyio.py module.
2019-04-08 21:35:27 -07:00
Giampaolo Rodola 8702b67dad
BPO-17561: set create_server backlog default to None (GH-12735)
It turns out doing socket.listen(0) does not equal to "choose a
reasonable default". It actually means "set backlog to 0".
As such set backlog=None as the default for socket.create_server.
Fixes the following BB failures:
https://github.com/python/cpython/pull/11784#issuecomment-481036369
Ref. BPO-1756, GH-11784.
2019-04-09 04:42:06 +02:00
Giampaolo Rodola eb7e29f2a9
bpo-35934: Add socket.create_server() utility function (GH-11784) 2019-04-09 00:34:02 +02:00
Serhiy Storchaka 7a0630c530
Add a What's New entry for bpo-35459. (GH-12706) 2019-04-08 14:34:04 +03:00
Andre Delfino f4efa312d1 Correct "inplace" with "in-place" (GH-10480) 2019-04-08 18:14:43 +09:00
Raymond Hettinger 6463ba3061
bpo-27181: Add statistics.geometric_mean() (GH-12638) 2019-04-07 09:20:03 -07:00
CAM Gerlach 89a894403c bpo-30661: Improve docs for tarfile pax change and effect on shutil (GH-12635)
The shutil archive creation helpers use the default tarfile format,
so that API is also switching to use `pax` by default.
2019-04-07 14:47:49 +10:00
Stefan Behnel 2ea8099523 bpo-9883: Update list of unimplemented interfaces in minidom. (GH-12677)
Remove names from the "unimplemented interfaces" list
in the minidom docs that are actually implemented.
2019-04-06 19:57:43 +03:00
Dima Tisnek 1328375ad1 Fix doc for create_subprocess_exec (GH-12598)
Add missing `program` argument to asyncio.create_subprocess_exec documentation.
2019-04-05 07:02:28 -07:00
Zackery Spytz 50866e9ed3 bpo-25451: Add transparency methods to tkinter.PhotoImage. (GH-10406) 2019-04-05 13:17:13 +03:00
Inada Naoki 176d26364b
bpo-36404: recommend DeprecationWarning over PendingDeprecationWarning (GH-12505) 2019-04-05 17:54:24 +09:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 1c5fa5af8a bpo-32413: Add documentation that at the module level, locals(), globals() are the same dictionary (GH-5004)
https://bugs.python.org/issue32413
2019-04-02 10:58:50 -07:00
Inada Naoki 04694a306b
bpo-35838: document optionxform must be idempotent (GH-12656) 2019-04-02 18:08:46 +09:00
Emmanuel Arias b00479d42a bpo-36377: Specify that range() can not be compared (GH-12468) 2019-04-01 21:52:42 -07:00
Joannah Nanjekye 8c61739def bpo-36157:Document PyInterpreterState_Main() (GH-12238)
I have added documentation for `PyInterpreterState_Main()`.
 I chose to place it under Advanced Debugger Support together with similar functions like `PyInterpreterState_Head()`, `PyInterpreterState_Next(`), and `PyInterpreterState_ThreadHead()` .


https://bugs.python.org/issue36157
2019-04-01 08:08:43 -07:00
Inada Naoki 10654c19b5
bpo-20844: open script file with "rb" mode (GH-12616) 2019-04-01 18:35:20 +09:00
Serhiy Storchaka 42a139ed88
bpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)
Deprecated passing the following arguments as keyword arguments:

- "func" in functools.partialmethod(), weakref.finalize(),
  profile.Profile.runcall(), cProfile.Profile.runcall(),
  bdb.Bdb.runcall(), trace.Trace.runfunc() and
  curses.wrapper().
- "function" in unittest.addModuleCleanup() and
  unittest.TestCase.addCleanup().
- "fn" in the submit() method of concurrent.futures.ThreadPoolExecutor
  and concurrent.futures.ProcessPoolExecutor.
- "callback" in contextlib.ExitStack.callback(),
  contextlib.AsyncExitStack.callback() and
  contextlib.AsyncExitStack.push_async_callback().
- "c" and "typeid" in the create() method of multiprocessing.managers.Server
  and multiprocessing.managers.SharedMemoryServer.
- "obj" in weakref.finalize().

Also allowed to pass arbitrary keyword arguments (even "self" and "func")
if the above arguments are passed as positional argument.
2019-04-01 09:16:35 +03:00
Steve Dower 79da388a40
bpo-36085: Add installer check for KB2533625 (GH-12636) 2019-03-30 20:58:17 -07:00
Nick Coghlan ddbb978e10
C API docs: Py_IsInitialized is always safe to call (GH-12630) 2019-03-30 21:24:05 +10:00
Inada Naoki 38f4e468d4
bpo-17110: doc: add note how to get bytes from sys.argv (GH-12602) 2019-03-30 14:32:08 +09:00
Steve Dower 2438cdf0e9
bpo-36085: Enable better DLL resolution on Windows (GH-12302) 2019-03-29 16:37:16 -07:00
Julien Palard 9e30fbac01 bpo-36064: Clarify allowed data types for urllib.request.Request. (GH-11990) 2019-03-28 19:15:34 -07:00
Susan Su 081158e3ba bpo-33043: Add a Contributing to Docs link and Update the Found a Bug Page (#12006)
* changes to html file -> added contributing to docs link at the end of the page

* revisions to the dealing with bugs page. added more links in the documentation bugs section

* 📜🤖 Added by blurb_it.

* Update Doc/bugs.rst

Updated Doc/bugs.rst in accordance with willingc and JulienPalard suggestions.

Co-Authored-By: suhearsawho <susansu.software@gmail.com>
2019-03-28 18:55:24 -07:00
Jules Lasne (jlasne) 3d78c4a6e5 Fixed capital letters missing and missing . (GH-12584)
No `bpo` for minor doc fix
2019-03-28 14:06:27 -07:00
ksamuel e63fc11b1d Fix typo in email.encoders doc (GH-9700)
Make the encoding/encoders mention congruent.
2019-03-28 13:38:30 -07:00
zhsj 45a5fdb91c bpo-36425: Add Simplified Chinese to the language switcher (GH-12537) 2019-03-28 16:32:25 +01:00
Raymond Hettinger fb28fcc925
Revert "Minor doc improvement (GH-10341)" (GH-12597)
This reverts commit dfd775a0b1.
2019-03-27 21:03:02 -07:00
Eddie Elizondo 364f0b0f19 bpo-35810: Incref heap-allocated types in PyObject_Init (GH-11661)
* Incref heap-allocated types in PyObject_Init
* Add documentation and porting notes to What's New
2019-03-27 12:52:18 +01:00
Jules Lasne (jlasne) 1fc5bf2ff2 Doc: Fixed missing punctuation in datamodel.rst (GH-12581) 2019-03-27 11:10:33 +01:00
Inada Naoki bc284f0c7a
bpo-32380: add "versionadded: 3.8" to singledispatchmethod (GH-12580) 2019-03-27 18:15:17 +09:00
Andre Delfino f760610bdd bpo-33832: Add "magic method" glossary entry (GH-7630) 2019-03-26 21:21:27 -04:00
Andre Delfino dfd775a0b1 Minor doc improvement (GH-10341)
Change "star-operator" to "* operator".
2019-03-26 21:17:50 -04:00
Tal Einat 6cd658b1a5
bpo-34203: FAQ: improve wording of paragraph about 2.x vs. 3.x (GH-9821) 2019-03-26 23:10:40 +02:00
Pierre Glaser 3b7e47aea9 bpo-36364: fix SharedMemoryManager examples (GH-12439)
Examples of the `multiprocessing.shared_memory` module try to import `SharedMemoryManager` from `multiprocessing.shared_memory` whereas this class is defined in `multiprocessing.managers`.
2019-03-26 12:12:26 -07:00
Andre Delfino 3e700e4ca3 Document that logging registers shutdown as an atexit handler (GH-12378) 2019-03-26 05:42:26 +00:00