a9607b9588
New syntax features: * PEP 492, coroutines with async and await syntax. * PEP 465, a new matrix multiplication operator: a @ b. * PEP 448, additional unpacking generalizations. New library modules: * typing: PEP 484 – Type Hints. * zipapp: PEP 441 Improving Python ZIP Application Support. New built-in features: * bytes % args, bytearray % args: PEP 461 – Adding % formatting to bytes and bytearray. * New bytes.hex(), bytearray.hex() and memoryview.hex() methods. (Contributed by Arnon Yaari in issue 9951.) * memoryview now supports tuple indexing (including multi-dimensional). (Contributed by Antoine Pitrou in issue 23632.) * Generators have a new gi_yieldfrom attribute, which returns the object being iterated by yield from expressions. (Contributed by Benno Leslie and Yury Selivanov in issue 24450.) * A new RecursionError exception is now raised when maximum recursion depth is reached. (Contributed by Georg Brandl in issue 19235.) CPython implementation improvements: * When the LC_TYPE locale is the POSIX locale (C locale), sys.stdin and sys.stdout now use the surrogateescape error handler, instead of the strict error handler. (Contributed by Victor Stinner in issue 19977.) * .pyo files are no longer used and have been replaced by a more flexible scheme that includes the optimization level explicitly in .pyc name. (See PEP 488 overview.) * Builtin and extension modules are now initialized in a multi-phase process, which is similar to how Python modules are loaded. (See PEP 489 overview.) Significant improvements in the standard library: * collections.OrderedDict is now implemented in C, which makes it 4 to 100 times faster. * The ssl module gained support for Memory BIO, which decouples SSL protocol handling from network IO. * The new os.scandir() function provides a better and significantly faster way of directory traversal. * functools.lru_cache() has been mostly reimplemented in C, yielding much better performance. * The new subprocess.run() function provides a streamlined way to run subprocesses. * The traceback module has been significantly enhanced for improved performance and developer convenience. Security improvements: * SSLv3 is now disabled throughout the standard library. It can still be enabled by instantiating a ssl.SSLContext manually. (See issue 22638 for more details; this change was backported to CPython 3.4 and 2.7.) * HTTP cookie parsing is now stricter, in order to protect against potential injection attacks. (Contributed by Antoine Pitrou in issue 22796.) Windows improvements: * A new installer for Windows has replaced the old MSI. See Using Python on Windows for more information. * Windows builds now use Microsoft Visual C++ 14.0, and extension modules should use the same.
51 lines
2.1 KiB
Awk
51 lines
2.1 KiB
Awk
# $NetBSD: plist-python.awk,v 1.2 2015/12/05 17:12:13 adam Exp $
|
|
#
|
|
# Copyright (c) 2012 The NetBSD Foundation, Inc.
|
|
# All rights reserved.
|
|
#
|
|
# This code is derived from software contributed to The NetBSD Foundation
|
|
# by OBATA Akio.
|
|
#
|
|
# Redistribution and use in source and binary forms, with or without
|
|
# modification, are permitted provided that the following conditions
|
|
# are met:
|
|
# 1. Redistributions of source code must retain the above copyright
|
|
# notice, this list of conditions and the following disclaimer.
|
|
# 2. Redistributions in binary form must reproduce the above copyright
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
# documentation and/or other materials provided with the distribution.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
### This awk script handles python bytcode file entries in PLISTs. This script
|
|
### requires the following scripts to be included:
|
|
###
|
|
### plist-functions.awk (print_entry)
|
|
###
|
|
### Certain environment variables must be set prior to running this script:
|
|
###
|
|
### PYVERS
|
|
###
|
|
BEGIN {
|
|
PYVERS = getenv_or_die("PYVERS")
|
|
}
|
|
|
|
### For each python bytecode file entry, convert directory and file name.
|
|
###
|
|
/^[^@]/ && /[^\/]+\.py[co]$/ {
|
|
sub(/[^\/]+\.py[co]$/, "__pycache__/&")
|
|
sub(/\.py[co]$/, ".cpython-" PYVERS "&")
|
|
if (PYVERS ~ /^3[5-9]$/ && $0 ~ /\.pyo$/) {
|
|
sub(/\.pyo$/, ".opt-1.pyc")
|
|
}
|
|
}
|