TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What’s New in Python 3.10

27 pointsby giladover 4 years ago

3 comments

dalkeover 4 years ago
&gt; The entire distutils package is deprecated, to be removed in Python 3.12.<p>Wait, what?<p><a href="https:&#x2F;&#x2F;www.python.org&#x2F;dev&#x2F;peps&#x2F;pep-0632&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.python.org&#x2F;dev&#x2F;peps&#x2F;pep-0632&#x2F;</a> says:<p>&gt; 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.<p>Oh, okay. My package already requires setuptools for setup(), though it then uses distutils for the rest.<p><a href="https:&#x2F;&#x2F;setuptools.readthedocs.io&#x2F;en&#x2F;latest&#x2F;userguide&#x2F;quickstart.html#id12" rel="nofollow">https:&#x2F;&#x2F;setuptools.readthedocs.io&#x2F;en&#x2F;latest&#x2F;userguide&#x2F;quicks...</a> says:<p>&gt; 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.<p>Wait, what?<p>What&#x27;s a &quot;pyproject.toml&quot;?<p>My current setup.py&#x27;s &quot;build&quot; step generates 10MB of auto-generated C extension code. Am I supposed to ship that too? Or, where do I put that hook?<p>I have a custom build_ext subclass so I can pass per-file compilation flags to the C compiler. How&#x27;s that handled? I can&#x27;t even figure out the new way to specify C extension packages in the setuptools documentation?!<p>And it appears that &quot;build&quot; in this modern era means &quot;build a release package&quot;, and nothing like what &quot;setup.py build&quot;, so keyword searches are failing me.<p>(For example, &quot;A simple, correct PEP 517 package builder&quot; doesn&#x27;t actually build C extensions.)<p><a href="https:&#x2F;&#x2F;setuptools.readthedocs.io&#x2F;en&#x2F;latest&#x2F;userguide&#x2F;quickstart.html" rel="nofollow">https:&#x2F;&#x2F;setuptools.readthedocs.io&#x2F;en&#x2F;latest&#x2F;userguide&#x2F;quicks...</a> goes on to say:<p>&gt; To learn more about Python packaging in general, navigate to the bottom of this page.<p>but that link doesn&#x27;t exist!<p>Help?
评论 #26160455 未加载
评论 #26164452 未加载
killingtime74over 4 years ago
Nice improvements to typing, will be able to use these everyday
pizzaover 4 years ago
I like the new error messages and union types feature