* Issue a deprecation warning on smtpd import
* Also issue DeprecationWarnings for asynchat and asyncore
* Fix some tests
* test___all__ requires the word 'module' or 'package' in the deprecation
warning text, so add those to smtpd, asynchat, and asyncore.
* In test_support, use pprint now instead of asyncore as the landmark.
* Add What's New
* Use ..deprecated::
* Use ..deprecated::
* Update Lib/smtpd.py
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* Update Doc/library/smtpd.rst
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* Import async{hat,ore} after the DeprecationWarning for this module
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
I tried to be relatively thorough and give lots of links.
One reason is that this wasn't deprecated very long; also it seems people running into this tend to not be familiar with similar APIs.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Emit a deprecation warning if the numeric literal is immediately followed by
one of keywords: and, else, for, if, in, is, or. Raise a syntax error with
more informative message if it is immediately followed by other keyword or
identifier.
Automerge-Triggered-By: GH:pablogsal
* bpo-44246: Update What's New for importlib.metadata.
Bump version of importlib_metadata included.
Add note about compatibility notice and fix link to entry_points documentation.
Add note about removal of access by index on Distribution.entry_points.
* Fix syntax mistake in issue reference.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* Fix broken reference in entry-points.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Py_FrozenMain was added to the Limited C API in [bpo-42591]() (3.10.0a4);
but to fix that issue it would be enough to add it to the regular C API.
The function is undocumented, tests were added very recently ([bpo-44131]()),
and most importantly, it is not present in all builds of Python, as
the linker sometimes omits it as unused.
It should be added back when these issues are fixed.
Note that this does not affect Python's regular C API.
The fix only applies to ``isinstance``. ``issubclass`` isn't affected (because it was always working to begin with). So I also fixed the news to reflect that.
Left click and drag to select lines. With selection, right click for context menu with copy and copy-with-prompts.
Also add copy-with-prompts to the text-box context menu.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Noted my recent contributions in "What's New In Python 3.10". Also made some edits clarifying "annotations" vs "type hints", and some other edits for correctness.
Add a new Py_TPFLAGS_DISALLOW_INSTANTIATION type flag to disallow
creating type instances: set tp_new to NULL and don't create the
"__new__" key in the type dictionary.
The flag is set automatically on static types if tp_base is NULL or
&PyBaseObject_Type and tp_new is NULL.
Use the flag on the following types:
* _curses.ncurses_version type
* _curses_panel.panel
* _tkinter.Tcl_Obj
* _tkinter.tkapp
* _tkinter.tktimertoken
* _xxsubinterpretersmodule.ChannelID
* sys.flags type
* sys.getwindowsversion() type
* sys.version_info type
Update MyStr example in the C API documentation to use
Py_TPFLAGS_DISALLOW_INSTANTIATION.
Add _PyStructSequence_InitType() function to create a structseq type
with the Py_TPFLAGS_DISALLOW_INSTANTIATION flag set.
type_new() calls _PyType_CheckConsistency() at exit.
Add new C-API functions to control the state of the garbage collector:
PyGC_Enable(), PyGC_Disable(), PyGC_IsEnabled(),
corresponding to the functions in the gc module.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Faster bz2/lzma/zlib via new output buffering.
Also adds .readall() function to _compression.DecompressReader class
to take best advantage of this in the consume-all-output at once scenario.
Often a 5-20% speedup in common scenarios due to less data copying.
Contributed by Ma Lin.
asyncio.get_event_loop() emits now a deprecation warning when it creates a new event loop.
In future releases it will became an alias of asyncio.get_running_loop().