[HN Gopher] What's New in Python 3.10
___________________________________________________________________
What's New in Python 3.10
Author : gilad
Score : 13 points
Date : 2021-02-16 21:14 UTC (1 hours ago)
(HTM) web link (docs.python.org)
(TXT) w3m dump (docs.python.org)
| dalke wrote:
| > The entire distutils package is deprecated, to be removed in
| Python 3.12.
|
| Wait, what?
|
| https://www.python.org/dev/peps/pep-0632/ says:
|
| > Setuptools has recently integrated a complete copy of distutils
| and is no longer dependent on the standard library [3]. Pip has
| been silently replacing distutils with setuptools when installing
| packages for a long time already, and the distutils documentation
| has stated that it is being phased out since 2014 (or earlier).
| It is time to remove it from the standard library.
|
| Oh, okay. My package already requires setuptools for setup(),
| though it then uses distutils for the rest.
|
| https://setuptools.readthedocs.io/en/latest/userguide/quicks...
| says:
|
| > The landscape of Python packaging is shifting and Setuptools
| has evolved to only provide backend support, no longer being the
| de-facto packaging tool in the market. All python package must
| provide a pyproject.toml and specify the backend (build system)
| it wants to use.
|
| Wait, what?
|
| What's a "pyproject.toml"?
|
| My current setup.py's "build" step generates 10MB of auto-
| generated C extension code. Am I supposed to ship that too? Or,
| where do I put that hook?
|
| I have a custom build_ext subclass so I can pass per-file
| compilation flags to the C compiler. How's that handled? I can't
| even figure out the new way to specify C extension packages in
| the setuptools documentation?!
|
| And it appears that "build" in this modern era means "build a
| release package", and nothing like what "setup.py build", so
| keyword searches are failing me.
|
| (For example, "A simple, correct PEP 517 package builder" doesn't
| actually build C extensions.)
|
| https://setuptools.readthedocs.io/en/latest/userguide/quicks...
| goes on to say:
|
| > To learn more about Python packaging in general, navigate to
| the bottom of this page.
|
| but that link doesn't exist!
|
| Help?
| pizza wrote:
| I like the new error messages and union types feature
| killingtime74 wrote:
| Nice improvements to typing, will be able to use these everyday
___________________________________________________________________
(page generated 2021-02-16 23:02 UTC)