Commit Graph

236 Commits

Author SHA1 Message Date
Victor Stinner e471e72977
bpo-37330: open() no longer accept 'U' in file mode (GH-16959)
open(), io.open(), codecs.open() and fileinput.FileInput no longer
accept "U" ("universal newline") in the file mode. This flag was
deprecated since Python 3.3.
2019-10-28 15:40:08 +01:00
Dong-hee Na 3bfc8e0fcc bpo-38602: Add fcntl.F_OFD_XXXX for fcntlmodule (GH-16956) 2019-10-28 09:31:15 +02:00
Girts a01ba333af bpo-30618: add readlink to pathlib.Path (GH-8285)
This adds a "readlink" method to pathlib.Path objects that calls through
to os.readlink.


https://bugs.python.org/issue30618



Automerge-Triggered-By: @gpshead
2019-10-23 14:18:40 -07:00
Dong-hee Na 2eba6ad7bf bpo-38493: Add os.CLD_KILLED and os.CLD_STOPPED. (GH-16821) 2019-10-21 10:01:05 +03:00
Serhiy Storchaka d05b000c6b
bpo-38371: Tkinter: deprecate the split() method. (GH-16584) 2019-10-08 14:31:35 +03:00
Serhiy Storchaka ef092fe990
bpo-25988: Do not expose abstract collection classes in the collections module. (GH-10596) 2019-10-07 12:10:15 +03:00
Kyle Stanley 6a10d59541 Doc: Several fixes and improvements for 3.9 whatsnew (GH-16375) 2019-09-26 09:06:46 +02:00
Kyle Stanley 030fe8e34d Doc: Add whatsnew entry for loop.shutdown_default_executor() (GH-16308) 2019-09-21 08:18:40 +02:00
Serhiy Storchaka 850573b836
bpo-37995: Add an option to ast.dump() to produce a multiline output. (GH-15631) 2019-09-09 19:33:13 +03:00
Joannah Nanjekye 74b662cf20 bpo-15088 : Remove PyGen_NeedsFinalizing() (GH-15702)
Remove PyGen_NeedsFinalizing(): it was not
documented, tested or used anywhere within CPython after
the implementation of PEP 442.
2019-09-06 17:41:38 +02:00
Joannah Nanjekye 2bc43cdc01 bpo-37878: Remove PyThreadState_DeleteCurrent() function (GH-15315)
* Rename PyThreadState_DeleteCurrent()
  to _PyThreadState_DeleteCurrent()
* Move it to the internal C API

Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
2019-09-05 18:06:49 +02:00
Jon Janzen ce81a925ef bpo-36409: Remove old plistlib API deprecated in 3.4 (GH-15615)
* Remove implementation for old plistlib API deprecated in 3.4
2019-09-05 10:11:35 +02:00
Serhiy Storchaka f02ea6225b
bpo-36543: Remove old-deprecated ElementTree features. (GH-12707)
Remove methods Element.getchildren(), Element.getiterator() and
ElementTree.getiterator() and the xml.etree.cElementTree module.
2019-09-01 11:18:35 +03:00
Zackery Spytz ce6a070414 bpo-34880: Add the LOAD_ASSERTION_ERROR opcode. (GH-15073)
Fix assert statement misbehavior if AssertionError is shadowed.
2019-08-25 12:44:09 +03:00
Ned Deily 7913cbc09d
Fix link to changelog in 3.9 What's New page (GH-15445) 2019-08-24 01:12:05 -04:00
Raymond Hettinger d0cdeaab76
bpo-32554: Deprecate hashing arbitrary types in random.seed() (GH-15382) 2019-08-22 09:19:36 -07:00
Brett Cannon 48ede6b8f6
bpo-37663: have venv activation scripts all consistently use __VENV_PROMPT__ for prompt customization (GH-14941)
The activation scripts generated by venv were inconsistent in how they changed the shell's prompt. Some used `__VENV_PROMPT__` exclusively, some used `__VENV_PROMPT__` if it was set even though by default `__VENV_PROMPT__` is always set and the fallback matched the default, and one ignored `__VENV_PROMPT__` and used `__VENV_NAME__` instead (and even used a differing format to the default prompt). This change now has all activation scripts use `__VENV_PROMPT__` only and relies on the fact that venv sets that value by default.

The color of the customization is also now set in fish to the blue from the Python logo for as hex color support is built into that shell (much like PowerShell where the built-in green color is used).
2019-08-21 15:58:01 -07:00
Dong-hee Na 44046fe4fc bpo-37804: Remove the deprecated method threading.Thread.isAlive() (GH-15225) 2019-08-12 19:41:08 +02:00
Ngalim Siregar c5fa44944e bpo-37444: Update differing exception between builtins and importlib (GH-14869)
Imports now raise `TypeError` instead of `ValueError` for relative import failures. This makes things consistent between `builtins.__import__` and `importlib.__import__` as well as using a more natural import for the failure.


https://bugs.python.org/issue37444



Automerge-Triggered-By: @brettcannon
2019-08-02 22:46:02 -07:00
Pablo Galindo 9211e2fd81 bpo-37268: Add deprecation notice and a DeprecationWarning for the parser module (GH-15017)
Deprecate the parser module and add a deprecation warning triggered on import and a warning block in the documentation.





https://bugs.python.org/issue37268



Automerge-Triggered-By: @pablogsal
2019-07-30 04:04:01 -07:00
Victor Stinner b4e68960b9
bpo-37266: Add bpo number to the What's New entry (GH614584)
To get more info about this change.
2019-07-04 18:30:19 +02:00
ILJI CHOI 0f6f73ff3c Fix typo in 3.9's Whats new. Pyton -> Python (GH-14567) 2019-07-02 19:36:01 -07:00
Carl Bordum Hansen 06a8916cf4 bpo-37376: pprint support for SimpleNamespace (GH-14318)
https://bugs.python.org/issue37376
2019-06-26 16:13:18 -07:00
Victor Stinner 69150669f2
bpo-37414: Remove sys.callstats() (GH-14398)
Remove the undocumented sys.callstats() function. Since Python 3.7,
it was deprecated and always returned None. It required a special
build option CALL_PROFILE which was already removed in Python 3.7.
2019-06-26 18:01:10 +02:00
Victor Stinner 22eb689cf3
bpo-37388: Development mode check encoding and errors (GH-14341)
In development mode and in debug build, encoding and errors arguments
are now checked on string encoding and decoding operations. Examples:
open(), str.encode() and bytes.decode().

By default, for best performances, the errors argument is only
checked at the first encoding/decoding error, and the encoding
argument is sometimes ignored for empty strings.
2019-06-26 00:51:05 +02:00
Victor Stinner 3939c321c9
bpo-20443: _PyConfig_Read() gets the absolute path of run_filename (GH-14053)
Python now gets the absolute path of the script filename specified on
the command line (ex: "python3 script.py"): the __file__ attribute of
the __main__ module, sys.argv[0] and sys.path[0] become an absolute
path, rather than a relative path.

* Add _Py_isabs() and _Py_abspath() functions.
* _PyConfig_Read() now tries to get the absolute path of
  run_filename, but keeps the relative path if _Py_abspath() fails.
* Reimplement os._getfullpathname() using _Py_abspath().
* Use _Py_isabs() in getpath.c.
2019-06-25 15:02:43 +02:00
Victor Stinner 36456df138
bpo-37392: Remove sys.setcheckinterval() (GH-14355)
Remove sys.getcheckinterval() and sys.setcheckinterval() functions.
They were deprecated since Python 3.2. Use sys.getswitchinterval()
and sys.setswitchinterval() instead.

Remove also check_interval field of the PyInterpreterState structure.
2019-06-25 03:01:08 +02:00
Victor Stinner c68e3fb15d Update What's New in Python 3.9 (GH-14253)
* Mention bpo of PyImport_Cleanup removal
* Fix bpo number of PyByteArray_Init removal
2019-06-20 13:41:25 -07:00
Victor Stinner 987a0dcfa1
bpo-36710: Remove PyImport_Cleanup() function (GH-14221)
* Rename PyImport_Cleanup() to _PyImport_Cleanup() and move it to the
  internal C API. Add 'tstate' parameters.
* Remove documentation of _PyImport_Init(), PyImport_Cleanup(),
  _PyImport_Fini(). All three were documented as "For internal use
  only.".
2019-06-19 10:36:10 +02:00
Victor Stinner ac7b1a3f32
bpo-37320: Remove openfp() of aifc, sunau and wave (GH-14169)
aifc.openfp() alias to aifc.open(), sunau.openfp() alias to
sunau.open(), and wave.openfp() alias to wave.open() have been
removed. They were deprecated since Python 3.7.
2019-06-18 00:00:24 +02:00
Victor Stinner 5352cc41fa
bpo-37194: Add PyObject_CallNoArgs() rationale (GH-14159)
Explain in the doc why PyObject_CallNoArgs() should be preferred over
other existing ways to call a function without any arguments.
2019-06-17 17:15:36 +02:00
Serhiy Storchaka 231aad3849
bpo-37315: Deprecate accepting floats in math.factorial(). (GH-14147) 2019-06-17 16:57:27 +03:00
Victor Stinner 2ff58a24e8
bpo-37194: Add a new public PyObject_CallNoArgs() function (GH-13890)
Add a new public PyObject_CallNoArgs() function to the C API: call a
callable Python object without any arguments.

It is the most efficient way to call a callback without any argument.
On x86-64, for example, PyObject_CallFunctionObjArgs(func, NULL)
allocates 960 bytes on the stack per call, whereas
PyObject_CallNoArgs(func) only allocates 624 bytes per call.

It is excluded from stable ABI 3.8.

Replace private _PyObject_CallNoArg() with public
PyObject_CallNoArgs() in C extensions: _asyncio, _datetime,
_elementtree, _pickle, _tkinter and readline.
2019-06-17 14:27:23 +02:00
Victor Stinner 8bf08ee45b
bpo-37312: Remove _dummy_thread and dummy_threading modules (GH-14143)
Remove _dummy_thread and dummy_threading modules. These modules
were deprecated since Python 3.7 which requires threading support.
2019-06-17 14:18:43 +02:00
Victor Stinner 066e5b1a91
bpo-37266: Daemon threads are now denied in subinterpreters (GH-14049)
In a subinterpreter, spawning a daemon thread now raises an
exception. Daemon threads were never supported in subinterpreters.
Previously, the subinterpreter finalization crashed with a Pyton
fatal error if a daemon thread was still running.

* Add _thread._is_main_interpreter()
* threading.Thread.start() now raises RuntimeError if the thread is a
  daemon thread and the method is called from a subinterpreter.
* The _thread module now uses Argument Clinic for the new function.
* Use textwrap.dedent() in test_threading.SubinterpThreadingTests
2019-06-14 18:55:22 +02:00
Ned Deily 3a2883c313
Add 3.9 whatsnew file (GH-14040) 2019-06-12 23:31:45 -04:00