Re: Python 3.6 beta release in F26 Rawhide?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/06/2016 09:56 AM, Nick Coghlan wrote:
On 4 November 2016 at 04:44, Justin W. Flory <jflory7@xxxxxxxxx> wrote:
Whoops, missed this reply! Even if the specific minor version of 3.6 is to
be determined, if there's new major features to highlight in Python 3.6, we
could get started with writing the article draft and write how to get
started using it. Once it's actually available, we can double-check for
accuracy and push it out quickly after it's available. :)

Would there be anyone who might be interested in helping lead on this? It
shouldn't have to be too extravagant, but a short overview and introduction
about the latest and greatest in Python on Fedora would be amazing.

Some initial highlights from
https://docs.python.org/dev/whatsnew/3.6.html for folks that can just
roll forward to the new release:

- compile time processing of format strings with the new f-string
literals: print(f"There were {len(docs)} found. First title:
{docs[0].title}". These have the dual benefit of being both faster
than runtime formatting (since the string gets broken up into text
segments and field expressions at compile time, so there's zero
runtime string parsing overhead), while also being easier to read
(since you don't need to mentally map expressions to their
corresponding fields - they're right there in the string). Especially
helpful for scripting use cases.
- keyword arguments now preserve their order, so
"collections.OrderedDict(first=1, second=2, third=2)" finally works
the way you would expect it to work (previously the apparent key order
in the source code would be lost in the process of calling the
constructor)
- the new secrets module provides handy helpers for secure token
generation in various formats (e.g. bytes, hex strings, base64
strings) with a reasonable default amount of entropy
- underscores in numeric literals mean you can now break up magic
constants to make them easier to read (e.g. 10_000_000.0, 0xCAFE_F00D,
0b_0011_1111_0100_1110)
- many more standard library APIs, including the builtin open(), now
support pathlib.Path and pathlib.PurePath objects through the new
os.fspath() protocol. This change also means many third party
libraries will also indirectly gain support for these protocols (since
they implicitly delegate the task of opening a path to a standard
library API
- OpenSSL 1.1.0 is supported, along with additional hashing (BLAKE2,
SHA-3, SHAKE) and key derivation (scrypt) algorithms

From a security perspective, os.urandom() now also provides a
guarantee that it will either block or return a result suitable for
cryptographic use - this means that code that needs to run when the
system entropy pool hasn't been initialised yet should either switch
to using the random module (if it doesn't need cryptographic grade
randomness) or the new os.getrandom() API (in order to use the
non-blocking variant of the syscall).

For folks using the new native async/await syntax for coroutine based
service development, that syntax has been extended with provisional
support for asynchronous comprehensions, generator definitions, and
generation functions, allowing asynchronous code access to many more
of the niceties developers are accustomed to when working with purely
synchronous code.

For folks using mypy or one of the other type inference engines for
Python, provisional support has been added for declarative variable
annotations that allow inference engines to complain when values bound
to the variable don't abide by the expected constraint (the
interpreter itself pays no attention to these annotations at runtime,
just as it doesn't check function annotations)

For folks writing internationalised applications, the Unicode database
has been updated to 9.0.0

For folks debugging more complex applications, the new PYTHONMALLOC
environment variable lets you either switch the runtime's memory
allocator into debug mode ("PYTHONMALLOC=debug") or bypass it entirely
("PYTHONMALLOC=malloc"). Details in
https://docs.python.org/dev/whatsnew/3.6.html#pythonmalloc-environment-variable

Also related to application debugging, the "-X tracemalloc" option now
provides a resource allocation traceback when printing ResourceWarning
for resources that are cleaned up non-deterministically.

There have also been a range of performance improvement made to
CPython, aided significantly by Victor Stinner's work in putting
together a new benchmarking utility ("perf") and a new benchmark suite
for Python interpreters ("performance":
https://pypi.python.org/pypi/performance ). (He doesn't have 3.5 vs
3.6 performance data yet, but hopefully that will be available on
speed.python.org by the time of the actual 3.6 release in December)

Cheers,
Nick.


Thanks for all of this info, Nick! I think we could get this down into a nice and tidy Magazine article. Would you be able to try creating a draft in the Magazine and we can work through the rest of the steps from there? This would be an awesome article to have!

    https://fedoramagazine.org/writing-an-article-for-the-fedora-magazine/

--
Cheers,
Justin W. Flory
jflory7@xxxxxxxxx

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Fedora Magazine mailing list -- magazine@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to magazine-leave@xxxxxxxxxxxxxxxxxxxxxxx

[Index of Archives]     [Fedora Users]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Devel]     [EPEL Announce]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [ET Management Tools]     [Yum Users]     [Fedora Art]     [Fedora ARM]

  Powered by Linux