Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit a14065f

Browse files
author
Anselm Kruis
committed
merge branch 3.5 just after tagging v3.5.3
Unfortunately the outcome of this merge is not yet fully functional. A test in test.test_pdb fails.
2 parents e3bbfd4 + 56e9ee0 commit a14065f

File tree

109 files changed

+1618
-606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1618
-606
lines changed

.hgtags

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,5 @@ cc15d736d860303b9da90d43cd32db39bab048df v3.5.0rc2
186186
37a07cee5969e6d3672583187a73cf636ff28e1b v3.5.1
187187
68feec6488b26327a85a634605dd28eca4daa5f1 v3.5.2rc1
188188
4def2a2901a5618ea45bcc8f2a1411ef33af18ad v3.5.2
189+
de530d7f21c0398bb2a2b67716e0638e5fadf727 v3.5.3rc1
190+
1880cb95a742cd001c67677de5c4efeab169416c v3.5.3

Doc/c-api/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ Querying the error indicator
381381
by code that needs to save and restore the error indicator temporarily, e.g.::
382382
383383
{
384-
PyObject **type, **value, **traceback;
384+
PyObject *type, *value, *traceback;
385385
PyErr_Fetch(&type, &value, &traceback);
386386
387387
/* ... code that might produce other errors ... */

Doc/c-api/typeobj.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ type objects) *must* have the :attr:`ob_size` field.
199199

200200
This field is deprecated. When it is defined, it should point to a function
201201
that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, but taking a C string
202-
instead of a Python string object to give the attribute name. The signature is
203-
the same as for :c:func:`PyObject_GetAttrString`.
202+
instead of a Python string object to give the attribute name. The signature is ::
203+
204+
PyObject * tp_getattr(PyObject *o, char *attr_name);
204205

205206
This field is inherited by subtypes together with :c:member:`~PyTypeObject.tp_getattro`: a subtype
206207
inherits both :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject.tp_getattro` from its base type when
@@ -213,10 +214,11 @@ type objects) *must* have the :attr:`ob_size` field.
213214

214215
This field is deprecated. When it is defined, it should point to a function
215216
that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, but taking a C string
216-
instead of a Python string object to give the attribute name. The signature is
217-
the same as for :c:func:`PyObject_SetAttrString`, but setting
218-
*v* to *NULL* to delete an attribute must be supported.
217+
instead of a Python string object to give the attribute name. The signature is ::
218+
219+
PyObject * tp_setattr(PyObject *o, char *attr_name, PyObject *v);
219220

221+
The *v* argument is set to *NULL* to delete the attribute.
220222
This field is inherited by subtypes together with :c:member:`~PyTypeObject.tp_setattro`: a subtype
221223
inherits both :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject.tp_setattro` from its base type when
222224
the subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject.tp_setattro` are both *NULL*.

Doc/c-api/unicode.rst

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -937,26 +937,6 @@ wchar_t Support
937937
.. versionadded:: 3.2
938938
939939
940-
UCS4 Support
941-
""""""""""""
942-
943-
.. versionadded:: 3.3
944-
945-
.. XXX are these meant to be public?
946-
947-
.. c:function:: size_t Py_UCS4_strlen(const Py_UCS4 *u)
948-
Py_UCS4* Py_UCS4_strcpy(Py_UCS4 *s1, const Py_UCS4 *s2)
949-
Py_UCS4* Py_UCS4_strncpy(Py_UCS4 *s1, const Py_UCS4 *s2, size_t n)
950-
Py_UCS4* Py_UCS4_strcat(Py_UCS4 *s1, const Py_UCS4 *s2)
951-
int Py_UCS4_strcmp(const Py_UCS4 *s1, const Py_UCS4 *s2)
952-
int Py_UCS4_strncmp(const Py_UCS4 *s1, const Py_UCS4 *s2, size_t n)
953-
Py_UCS4* Py_UCS4_strchr(const Py_UCS4 *s, Py_UCS4 c)
954-
Py_UCS4* Py_UCS4_strrchr(const Py_UCS4 *s, Py_UCS4 c)
955-
956-
These utility functions work on strings of :c:type:`Py_UCS4` characters and
957-
otherwise behave like the C standard library functions with the same name.
958-
959-
960940
.. _builtincodecs:
961941
962942
Built-in Codecs
@@ -1663,10 +1643,6 @@ They all return *NULL* or ``-1`` if an exception occurs.
16631643
* :const:`Py_True` or :const:`Py_False` for successful comparisons
16641644
* :const:`Py_NotImplemented` in case the type combination is unknown
16651645
1666-
Note that :const:`Py_EQ` and :const:`Py_NE` comparisons can cause a
1667-
:exc:`UnicodeWarning` in case the conversion of the arguments to Unicode fails
1668-
with a :exc:`UnicodeDecodeError`.
1669-
16701646
Possible values for *op* are :const:`Py_GT`, :const:`Py_GE`, :const:`Py_EQ`,
16711647
:const:`Py_NE`, :const:`Py_LT`, and :const:`Py_LE`.
16721648

Doc/distutils/packageindex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ name of all sections describing a repository.
173173
Each section describing a repository defines three variables:
174174

175175
- *repository*, that defines the url of the PyPI server. Defaults to
176-
``https://www.python.org/pypi``.
176+
``https://upload.pypi.org/legacy/``.
177177
- *username*, which is the registered username on the PyPI server.
178178
- *password*, that will be used to authenticate. If omitted the user
179179
will be prompt to type it when needed.

Doc/faq/gui.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ for Python allow you to write GTK+ 3 applications. There is also a
7777
The older PyGtk bindings for the `Gtk+ 2 toolkit <http://www.gtk.org>`_ have
7878
been implemented by James Henstridge; see <http://www.pygtk.org>.
7979

80+
Kivy
81+
----
82+
83+
`Kivy <https://kivy.org/>`_ is a cross-platform GUI library supporting both
84+
desktop operating systems (Windows, macOS, Linux) and mobile devices (Android,
85+
iOS). It is written in Python and Cython, and can use a range of windowing
86+
backends.
87+
88+
Kivy is free and open source software distributed under the MIT license.
89+
8090
FLTK
8191
----
8292

Doc/howto/clinic.rst

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. highlightlang:: c
2+
13
**********************
24
Argument Clinic How-To
35
**********************
@@ -78,17 +80,23 @@ Basic Concepts And Usage
7880
========================
7981

8082
Argument Clinic ships with CPython; you'll find it in ``Tools/clinic/clinic.py``.
81-
If you run that script, specifying a C file as an argument::
83+
If you run that script, specifying a C file as an argument:
84+
85+
.. code-block:: shell-session
8286
83-
% python3 Tools/clinic/clinic.py foo.c
87+
$ python3 Tools/clinic/clinic.py foo.c
8488
8589
Argument Clinic will scan over the file looking for lines that
86-
look exactly like this::
90+
look exactly like this:
91+
92+
.. code-block:: none
8793
8894
/*[clinic input]
8995
9096
When it finds one, it reads everything up to a line that looks
91-
exactly like this::
97+
exactly like this:
98+
99+
.. code-block:: none
92100
93101
[clinic start generated code]*/
94102
@@ -99,7 +107,9 @@ lines, are collectively called an Argument Clinic "block".
99107
When Argument Clinic parses one of these blocks, it
100108
generates output. This output is rewritten into the C file
101109
immediately after the block, followed by a comment containing a checksum.
102-
The Argument Clinic block now looks like this::
110+
The Argument Clinic block now looks like this:
111+
112+
.. code-block:: none
103113
104114
/*[clinic input]
105115
... clinic input goes here ...
@@ -375,15 +385,10 @@ Let's dive in!
375385
Write a pickled representation of obj to the open file.
376386
[clinic start generated code]*/
377387

378-
12. Save and close the file, then run ``Tools/clinic/clinic.py`` on it.
379-
With luck everything worked and your block now has output! Reopen
380-
the file in your text editor to see::
381-
382-
/*[clinic input]
383-
module _pickle
384-
class _pickle.Pickler "PicklerObject *" "&Pickler_Type"
385-
[clinic start generated code]*/
386-
/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
388+
12. Save and close the file, then run ``Tools/clinic/clinic.py`` on
389+
it. With luck everything worked---your block now has output, and
390+
a ``.c.h`` file has been generated! Reopen the file in your
391+
text editor to see::
387392

388393
/*[clinic input]
389394
_pickle.Pickler.dump
@@ -395,18 +400,20 @@ Let's dive in!
395400
Write a pickled representation of obj to the open file.
396401
[clinic start generated code]*/
397402

398-
PyDoc_STRVAR(_pickle_Pickler_dump__doc__,
399-
"Write a pickled representation of obj to the open file.\n"
400-
"\n"
401-
...
402403
static PyObject *
403-
_pickle_Pickler_dump_impl(PicklerObject *self, PyObject *obj)
404-
/*[clinic end generated code: checksum=3bd30745bf206a48f8b576a1da3d90f55a0a4187]*/
404+
_pickle_Pickler_dump(PicklerObject *self, PyObject *obj)
405+
/*[clinic end generated code: output=87ecad1261e02ac7 input=552eb1c0f52260d9]*/
405406

406407
Obviously, if Argument Clinic didn't produce any output, it's because
407408
it found an error in your input. Keep fixing your errors and retrying
408409
until Argument Clinic processes your file without complaint.
409410

411+
For readability, most of the glue code has been generated to a ``.c.h``
412+
file. You'll need to include that in your original ``.c`` file,
413+
typically right after the clinic module block::
414+
415+
#include "clinic/_pickle.c.h"
416+
410417
13. Double-check that the argument-parsing code Argument Clinic generated
411418
looks basically the same as the existing code.
412419

@@ -1027,7 +1034,9 @@ that value, and an error has been set (``PyErr_Occurred()`` returns a true
10271034
value), then the generated code will propagate the error. Otherwise it will
10281035
encode the value you return like normal.
10291036

1030-
Currently Argument Clinic supports only a few return converters::
1037+
Currently Argument Clinic supports only a few return converters:
1038+
1039+
.. code-block:: none
10311040
10321041
bool
10331042
int
@@ -1606,7 +1615,9 @@ code probably looks like this::
16061615
#endif /* HAVE_FUNCTIONNAME */
16071616

16081617
And then in the ``PyMethodDef`` structure at the bottom the existing code
1609-
will have::
1618+
will have:
1619+
1620+
.. code-block:: none
16101621
16111622
#ifdef HAVE_FUNCTIONNAME
16121623
{'functionname', ... },
@@ -1656,7 +1667,9 @@ extra code when using the "block" output preset? It can't go in the output bloc
16561667
because that could be deactivated by the ``#ifdef``. (That's the whole point!)
16571668

16581669
In this situation, Argument Clinic writes the extra code to the "buffer" destination.
1659-
This may mean that you get a complaint from Argument Clinic::
1670+
This may mean that you get a complaint from Argument Clinic:
1671+
1672+
.. code-block:: none
16601673
16611674
Warning in file "Modules/posixmodule.c" on line 12357:
16621675
Destination buffer 'buffer' not empty at end of file, emptying.
@@ -1676,7 +1689,9 @@ wouldn't make any sense to the Python interpreter. But using Argument Clinic
16761689
to run Python blocks lets you use Python as a Python preprocessor!
16771690

16781691
Since Python comments are different from C comments, Argument Clinic
1679-
blocks embedded in Python files look slightly different. They look like this::
1692+
blocks embedded in Python files look slightly different. They look like this:
1693+
1694+
.. code-block:: python3
16801695
16811696
#/*[python input]
16821697
#print("def foo(): pass")

0 commit comments

Comments
 (0)