Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa029da

Browse files
committed
Tweaks to What's New and some referenced docs
1 parent 96bb437 commit aa029da

3 files changed

Lines changed: 40 additions & 15 deletions

File tree

Doc/c-api/type.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Type Objects
100100
101101
.. c:function:: void* PyType_GetSlot(PyTypeObject *type, int slot)
102102
103-
Return the function pointer stored int the given slot. If the
103+
Return the function pointer stored in the given slot. If the
104104
result is *NULL*, this indicates that either the slot is *NULL*,
105105
or that the function was called with invalid parameters.
106106
Callers will typically cast the result pointer into the appropriate

Doc/library/venv.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ creation according to their needs, the :class:`EnvBuilder` class.
107107
upgraded in-place (defaults to ``False``).
108108

109109
* ``with_pip`` -- a Boolean value which, if true, ensures pip is
110-
installed in the virtual environment
110+
installed in the virtual environment. This uses :mod:`ensurepip` with
111+
the ``--default-pip`` option.
111112

112113
.. versionchanged:: 3.4
113114
Added the ``with_pip`` parameter

Doc/whatsnew/3.4.rst

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ For full details, see the
6969
`changelog <http://docs.python.org/3.4/whatsnew/changelog.html>`_.
7070

7171
.. note:: Prerelease users should be aware that this document is currently in
72-
draft form. It will be updated substantially as Python 3.4 moves towards
73-
release, so it's worth checking back even after reading earlier versions.
72+
draft form. While it should be close to complete for the Python 3.4
73+
release candidates, adjustments and additions to the document may be made
74+
up until the final release.
7475

7576

7677
.. seealso::
@@ -132,10 +133,9 @@ Significantly Improved Library Modules:
132133
a new :mod:`~email.message.Message` subclass
133134
(:class:`~email.contentmanager.EmailMessage`) that :ref:`simplify MIME
134135
handling <whatsnew_email_contentmanager>` (:issue:`18891`).
135-
* :mod:`plistlib` has a cleaned up interface and support for binary
136-
plist files (:issue:`14455`)
137136
* The :mod:`ipaddress` module API has been declared stable
138137

138+
139139
CPython implementation improvements:
140140

141141
* :ref:`Safe object finalization <whatsnew-pep-442>` (:pep:`442`).
@@ -163,9 +163,13 @@ PEP 453: Explicit Bootstrapping of PIP in Python Installations
163163
--------------------------------------------------------------
164164

165165
The new :mod:`ensurepip` module (defined in :pep:`453`) provides a standard
166-
cross-platform mechanism to boostrap the pip installer into Python
166+
cross-platform mechanism to bootstrap the pip installer into Python
167167
installations and virtual environments.
168168

169+
By default, the scripts ``pipX`` and ``pipX.Y`` will be installed (where
170+
X.Y stands for the version of the Python installation), along with the
171+
``pip`` Python package and its dependencies.
172+
169173
The :mod:`venv` module and the :command:`pyvenv` utility make use of this
170174
module to make ``pip`` readily available in virtual environments. When
171175
using the command line interface, ``pip`` is installed by default, while
@@ -187,12 +191,13 @@ __ http://www.python.org/dev/peps/pep-0453/#recommendations-for-downstream-distr
187191

188192
.. note::
189193

190-
The implementation of PEP 453 is still a work in progress. Refer to
191-
:issue:`19347` for the progress on additional steps:
192-
193-
* Having the binary installers install ``pip`` by default
194-
* Recommending the use of ``pip`` in the "Installing Python Module"
195-
documentation.
194+
To avoid conflicts between parallel Python 2 and Python 3 installations,
195+
only the versioned ``pip3`` and ``pip3.4`` commands are bootstrapped by
196+
default when ``ensurepip`` is invoked directly (including by the CPython
197+
installers). ``pyvenv`` ensures that the unqualified ``pip`` command is
198+
made available in virtual environments, and ``pip`` can always be
199+
invoked via the ``-m`` switch rather than directly to avoid ambiguity on
200+
systems with multiple Python installations.
196201

197202
.. seealso::
198203

@@ -257,6 +262,11 @@ general purpose convenience functions when appropriate::
257262
File "<stdin>", line 1, in <module>
258263
LookupError: 'rot13' is not a text encoding; use codecs.encode() to handle arbitrary codecs
259264

265+
>>> open("foo.txt", encoding="hex")
266+
Traceback (most recent call last):
267+
File "<stdin>", line 1, in <module>
268+
LookupError: 'hex' is not a text encoding; use codecs.open() to handle arbitrary codecs
269+
260270
In a related change, whenever it is feasible without breaking backwards
261271
compatibility, exceptions raised during encoding and decoding operations
262272
will be wrapped in a chained exception of the same type that mentions the
@@ -308,6 +318,7 @@ in :ref:`binary-transforms` and :ref:`text-transforms`.
308318
(Contributed by Nick Coghlan in :issue:`7475`, , :issue:`17827`,
309319
:issue:`17828` and :issue:`19619`)
310320

321+
311322
.. _whatsnew-pep-451:
312323

313324
PEP 451: A ModuleSpec Type for the Import System
@@ -959,8 +970,6 @@ command did. Worse, the Python3 ``pdb print`` command shadowed the Python3
959970
pickle
960971
------
961972

962-
protocol 4
963-
964973
:mod:`pickle` now supports (but does not use by default) a new pickle protocol,
965974
protocol 4. This new protocol addresses a number of issues that were present
966975
in previous protocols, such as the serialization of nested classes, very large
@@ -973,6 +982,14 @@ keyword-only arguments. It also provides some efficiency improvements.
973982
PEP written by Antoine Pitrou and implemented by Alexandre Vassalotti.
974983

975984

985+
plistlib
986+
--------
987+
988+
:mod:`plistlib` now supports binary plist files, and offers the common
989+
``load``/``loads``/``dump``/``dumps`` API pattern for serialization formats
990+
(Contributed by Ronald Oussoren and others in :issue:`14455`).
991+
992+
976993
poplib
977994
------
978995

@@ -1354,6 +1371,9 @@ and can be used to simplify the process of defining and maintaining
13541371
accurate signatures for builtins and standard library extension modules
13551372
implemented in C.
13561373

1374+
Some standard library extension modules have been converted to use Argument
1375+
Clinic in Python 3.4, and :mod:`inspect` has been updated accordingly.
1376+
13571377
.. note::
13581378
The Argument Clinic PEP is not fully up to date with the state of the
13591379
implementation. This has been deemed acceptable by the release manager
@@ -1369,6 +1389,10 @@ implemented in C.
13691389
Other Build and C API Changes
13701390
-----------------------------
13711391

1392+
* The new :c:func:`PyType_GetSlot` function has been added to the stable ABI,
1393+
allowing retrieval of function pointers from named type slots when using
1394+
the limited API. (Contributed by Martin von Löwis in :issue:`17162`)
1395+
13721396
* The new :c:func:`Py_SetStandardStreamEncoding` pre-initialization API
13731397
allows applications embedding the CPython interpreter to reliably force
13741398
a particular encoding and error handler for the standard streams

0 commit comments

Comments
 (0)