Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
235a96fb
Commit
235a96fb
authored
Jan 26, 2014
by
Larry Hastings
Browse files
Options
Browse Files
Download
Plain Diff
Merge.
parents
37cad802
c464c445
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
160 additions
and
134 deletions
+160
-134
Doc/howto/clinic.rst
Doc/howto/clinic.rst
+64
-50
Doc/tools/sphinxext/susp-ignored.csv
Doc/tools/sphinxext/susp-ignored.csv
+3
-3
Include/patchlevel.h
Include/patchlevel.h
+2
-2
Lib/distutils/__init__.py
Lib/distutils/__init__.py
+1
-1
Lib/idlelib/idlever.py
Lib/idlelib/idlever.py
+1
-1
Lib/pydoc_data/topics.py
Lib/pydoc_data/topics.py
+74
-74
Misc/NEWS
Misc/NEWS
+13
-1
Misc/RPM/python-3.4.spec
Misc/RPM/python-3.4.spec
+1
-1
README
README
+1
-1
No files found.
Doc/howto/clinic.rst
View file @
235a96fb
...
@@ -149,7 +149,7 @@ Let's dive in!
...
@@ -149,7 +149,7 @@ Let's dive in!
1. Find a Python builtin that calls either :c:func:`PyArg_ParseTuple`
1. Find a Python builtin that calls either :c:func:`PyArg_ParseTuple`
or :c:func:`PyArg_ParseTupleAndKeywords`, and hasn't been converted
or :c:func:`PyArg_ParseTupleAndKeywords`, and hasn't been converted
to work with Argument Clinic yet.
to work with Argument Clinic yet.
For my example I'm using ``pickle.Pickler.dump()``.
For my example I'm using ``
_
pickle.Pickler.dump()``.
2. If the call to the ``PyArg_Parse`` function uses any of the
2. If the call to the ``PyArg_Parse`` function uses any of the
following format units::
following format units::
...
@@ -214,7 +214,7 @@ Let's dive in!
...
@@ -214,7 +214,7 @@ Let's dive in!
Sample::
Sample::
/*[clinic input]
/*[clinic input]
pickle.Pickler.dump
_
pickle.Pickler.dump
Write a pickled representation of obj to the open file.
Write a pickled representation of obj to the open file.
[clinic start generated code]*/
[clinic start generated code]*/
...
@@ -227,22 +227,27 @@ Let's dive in!
...
@@ -227,22 +227,27 @@ Let's dive in!
the top. (In our sample code we'll just show the two blocks next to
the top. (In our sample code we'll just show the two blocks next to
each other.)
each other.)
The name of the class and module should be the same as the one
seen by Python. Check the name defined in the :c:type:`PyModuleDef`
or :c:type:`PyTypeObject` as appropriate.
When you declare a class, you must also specify two aspects of its type
in C: the type declaration you'd use for a pointer to an instance of
this class, and a pointer to the :c:type:`PyTypeObject` for this class.
Sample::
Sample::
/*[clinic input]
/*[clinic input]
module
pickle
module _
pickle
class pickle.Pickler
class _pickle.Pickler "PicklerObject *" "&Pickler_Type"
[clinic start generated code]*/
[clinic start generated code]*/
/*[clinic input]
/*[clinic input]
pickle.Pickler.dump
_
pickle.Pickler.dump
Write a pickled representation of obj to the open file.
Write a pickled representation of obj to the open file.
[clinic start generated code]*/
[clinic start generated code]*/
The name of the class and module should be the same as the one
seen by Python. Check the name defined in the :c:type:`PyModuleDef`
or :c:type:`PyTypeObject` as appropriate.
...
@@ -286,13 +291,13 @@ Let's dive in!
...
@@ -286,13 +291,13 @@ Let's dive in!
Sample::
Sample::
/*[clinic input]
/*[clinic input]
module
pickle
module _
pickle
class pickle.Pickler
class _pickle.Pickler "PicklerObject *" "&Pickler_Type"
[clinic start generated code]*/
[clinic start generated code]*/
/*[clinic input]
/*[clinic input]
pickle.Pickler.dump
_
pickle.Pickler.dump
obj: 'O'
obj: 'O'
...
@@ -309,7 +314,7 @@ Let's dive in!
...
@@ -309,7 +314,7 @@ Let's dive in!
itself before the first keyword-only argument, indented the
itself before the first keyword-only argument, indented the
same as the parameter lines.
same as the parameter lines.
(``pickle.Pickler.dump`` has neither, so our sample is unchanged.)
(``
_
pickle.Pickler.dump`` has neither, so our sample is unchanged.)
10. If the existing C function calls :c:func:`PyArg_ParseTuple`
10. If the existing C function calls :c:func:`PyArg_ParseTuple`
...
@@ -327,12 +332,12 @@ Let's dive in!
...
@@ -327,12 +332,12 @@ Let's dive in!
Sample::
Sample::
/*[clinic input]
/*[clinic input]
module pickle
module
_
pickle
class
pickle.Pickler
class
_pickle.Pickler "PicklerObject *" "&Pickler_Type"
[clinic start generated code]*/
[clinic start generated code]*/
/*[clinic input]
/*[clinic input]
pickle.Pickler.dump
_
pickle.Pickler.dump
obj: 'O'
obj: 'O'
/
/
...
@@ -354,12 +359,12 @@ Let's dive in!
...
@@ -354,12 +359,12 @@ Let's dive in!
Sample::
Sample::
/*[clinic input]
/*[clinic input]
module pickle
module
_
pickle
class
pickle.Pickler
class
_pickle.Pickler "PicklerObject *" "&Pickler_Type"
[clinic start generated code]*/
[clinic start generated code]*/
/*[clinic input]
/*[clinic input]
pickle.Pickler.dump
_
pickle.Pickler.dump
obj: 'O'
obj: 'O'
The object to be pickled.
The object to be pickled.
...
@@ -373,13 +378,13 @@ Let's dive in!
...
@@ -373,13 +378,13 @@ Let's dive in!
the file in your text editor to see::
the file in your text editor to see::
/*[clinic input]
/*[clinic input]
module pickle
module
_
pickle
class
pickle.Pickler
class
_pickle.Pickler "PicklerObject *" "&Pickler_Type"
[clinic start generated code]*/
[clinic start generated code]*/
/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
/*[clinic input]
/*[clinic input]
pickle.Pickler.dump
_
pickle.Pickler.dump
obj: 'O'
obj: 'O'
The object to be pickled.
The object to be pickled.
...
@@ -388,12 +393,12 @@ Let's dive in!
...
@@ -388,12 +393,12 @@ Let's dive in!
Write a pickled representation of obj to the open file.
Write a pickled representation of obj to the open file.
[clinic start generated code]*/
[clinic start generated code]*/
PyDoc_STRVAR(pickle_Pickler_dump__doc__,
PyDoc_STRVAR(
_
pickle_Pickler_dump__doc__,
"Write a pickled representation of obj to the open file.\n"
"Write a pickled representation of obj to the open file.\n"
"\n"
"\n"
...
...
static PyObject *
static PyObject *
pickle_Pickler_dump_impl(Py
Object *self, PyObject *obj)
_pickle_Pickler_dump_impl(Pickler
Object *self, PyObject *obj)
/*[clinic end generated code: checksum=3bd30745bf206a48f8b576a1da3d90f55a0a4187]*/
/*[clinic end generated code: checksum=3bd30745bf206a48f8b576a1da3d90f55a0a4187]*/
Obviously, if Argument Clinic didn't produce any output, it's because
Obviously, if Argument Clinic didn't produce any output, it's because
...
@@ -428,8 +433,8 @@ Let's dive in!
...
@@ -428,8 +433,8 @@ Let's dive in!
macro defining the appropriate static :c:type:`PyMethodDef` structure for
macro defining the appropriate static :c:type:`PyMethodDef` structure for
this builtin::
this builtin::
#define _PICKLE_PICKLER_DUMP_METHODDEF \
#define _
_
PICKLE_PICKLER_DUMP_METHODDEF \
{"dump", (PyCFunction)_
pickle_Pickler_dump, METH_O,
_pickle_Pickler_dump__doc__},
{"dump", (PyCFunction)_
_pickle_Pickler_dump, METH_O, _
_pickle_Pickler_dump__doc__},
This static structure should be *exactly* the same as the existing static
This static structure should be *exactly* the same as the existing static
:c:type:`PyMethodDef` structure for this builtin.
:c:type:`PyMethodDef` structure for this builtin.
...
@@ -463,13 +468,13 @@ Let's dive in!
...
@@ -463,13 +468,13 @@ Let's dive in!
Sample::
Sample::
/*[clinic input]
/*[clinic input]
module pickle
module
_
pickle
class
pickle.Pickler
class
_pickle.Pickler "PicklerObject *" "&Pickler_Type"
[clinic start generated code]*/
[clinic start generated code]*/
/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
/*[clinic input]
/*[clinic input]
pickle.Pickler.dump
_
pickle.Pickler.dump
obj: 'O'
obj: 'O'
The object to be pickled.
The object to be pickled.
...
@@ -478,12 +483,12 @@ Let's dive in!
...
@@ -478,12 +483,12 @@ Let's dive in!
Write a pickled representation of obj to the open file.
Write a pickled representation of obj to the open file.
[clinic start generated code]*/
[clinic start generated code]*/
PyDoc_STRVAR(pickle_Pickler_dump__doc__,
PyDoc_STRVAR(
__
pickle_Pickler_dump__doc__,
"Write a pickled representation of obj to the open file.\n"
"Write a pickled representation of obj to the open file.\n"
"\n"
"\n"
...
...
static PyObject *
static PyObject *
pickle_Pickler_dump_impl(Py
Object *self, PyObject *obj)
_pickle_Pickler_dump_impl(Pickler
Object *self, PyObject *obj)
/*[clinic end generated code: checksum=3bd30745bf206a48f8b576a1da3d90f55a0a4187]*/
/*[clinic end generated code: checksum=3bd30745bf206a48f8b576a1da3d90f55a0a4187]*/
{
{
/* Check whether the Pickler was initialized correctly (issue3664).
/* Check whether the Pickler was initialized correctly (issue3664).
...
@@ -515,8 +520,8 @@ Let's dive in!
...
@@ -515,8 +520,8 @@ Let's dive in!
Sample::
Sample::
static struct PyMethodDef Pickler_methods[] = {
static struct PyMethodDef Pickler_methods[] = {
_PICKLE_PICKLER_DUMP_METHODDEF
_
_
PICKLE_PICKLER_DUMP_METHODDEF
_PICKLE_PICKLER_CLEAR_MEMO_METHODDEF
_
_
PICKLE_PICKLER_CLEAR_MEMO_METHODDEF
{NULL, NULL} /* sentinel */
{NULL, NULL} /* sentinel */
};
};
...
@@ -1106,15 +1111,16 @@ Using a "self converter"
...
@@ -1106,15 +1111,16 @@ Using a "self converter"
------------------------
------------------------
Argument Clinic automatically adds a "self" parameter for you
Argument Clinic automatically adds a "self" parameter for you
using a default converter. However, you can override
using a default converter. It automatically sets the ``type``
of this parameter to the "pointer to an instance" you specified
when you declared the type. However, you can override
Argument Clinic's converter and specify one yourself.
Argument Clinic's converter and specify one yourself.
Just add your own ``self`` parameter as the first parameter in a
Just add your own ``self`` parameter as the first parameter in a
block, and ensure that its converter is an instance of
block, and ensure that its converter is an instance of
``self_converter`` or a subclass thereof.
``self_converter`` or a subclass thereof.
What's the point? This lets you automatically cast ``self``
What's the point? This lets you override the type of ``self``,
from ``PyObject *`` to a custom type, just like ``object()``
or give it a different default name.
does with its ``type`` parameter.
How do you specify the custom type you want to cast ``self`` to?
How do you specify the custom type you want to cast ``self`` to?
If you only have one or two functions with the same type for ``self``,
If you only have one or two functions with the same type for ``self``,
...
@@ -1502,6 +1508,8 @@ preset configurations, as follows:
...
@@ -1502,6 +1508,8 @@ preset configurations, as follows:
and ``docstring_prototype``, write the ``impl_definition`` to
and ``docstring_prototype``, write the ``impl_definition`` to
``block``, and write everything else to ``file``.
``block``, and write everything else to ``file``.
The default filename is ``"{dirname}/clinic/{basename}.h"``.
``buffer``
``buffer``
Save up all most of the output from Clinic, to be written into
Save up all most of the output from Clinic, to be written into
your file near the end. For Python files implementing modules
your file near the end. For Python files implementing modules
...
@@ -1554,7 +1562,7 @@ The ``new`` subcommand works like this::
...
@@ -1554,7 +1562,7 @@ The ``new`` subcommand works like this::
This creates a new destination with name ``<name>`` and type ``<type>``.
This creates a new destination with name ``<name>`` and type ``<type>``.
There are five destination types:
:
There are five destination types:
``suppress``
``suppress``
Throws the text away.
Throws the text away.
...
@@ -1575,12 +1583,18 @@ There are five destination types::
...
@@ -1575,12 +1583,18 @@ There are five destination types::
The template can use three strings internally that will be replaced
The template can use three strings internally that will be replaced
by bits of the filename:
by bits of the filename:
{filename}
{path}
The full filename.
The full path to the file, including directory and full filename.
{dirname}
The name of the directory the file is in.
{basename}
{basename}
Everything up to but not including the last '.'.
Just the name of the file, not including the directory.
{extension}
{basename_root}
The last '.' and everything after it.
Basename with the extension clipped off
(everything up to but not including the last '.').
{basename_extension}
The last '.' and everything after it. If the basename
does not contain a period, this will be the empty string.
If there are no periods in the filename, {basename} and {filename}
If there are no periods in the filename, {basename} and {filename}
are the same, and {extension} is empty. "{basename}{extension}"
are the same, and {extension} is empty. "{basename}{extension}"
...
...
Doc/tools/sphinxext/susp-ignored.csv
View file @
235a96fb
...
@@ -79,9 +79,8 @@ howto/logging,,:Started,INFO:root:Started
...
@@ -79,9 +79,8 @@ howto/logging,,:Started,INFO:root:Started
howto/logging,,:This,DEBUG:root:This message should go to the log file
howto/logging,,:This,DEBUG:root:This message should go to the log file
howto/logging,,:This,DEBUG:This message should appear on the console
howto/logging,,:This,DEBUG:This message should appear on the console
howto/logging,,:Watch,WARNING:root:Watch out!
howto/logging,,:Watch,WARNING:root:Watch out!
howto/pyporting,75,::,# make sure to use :: Python *and* :: Python :: 3 so
howto/pyporting,,::,Programming Language :: Python :: 2
howto/pyporting,75,::,"'Programming Language :: Python',"
howto/pyporting,,::,Programming Language :: Python :: 3
howto/pyporting,75,::,'Programming Language :: Python :: 3'
howto/regex,,::,
howto/regex,,::,
howto/regex,,:foo,(?:foo)
howto/regex,,:foo,(?:foo)
howto/urllib2,,:example,"for example ""joe@password:example.com"""
howto/urllib2,,:example,"for example ""joe@password:example.com"""
...
@@ -278,6 +277,7 @@ whatsnew/3.2,,:gz,">>> with tarfile.open(name='myarchive.tar.gz', mode='w:gz') a
...
@@ -278,6 +277,7 @@ whatsnew/3.2,,:gz,">>> with tarfile.open(name='myarchive.tar.gz', mode='w:gz') a
whatsnew/3.2,,:location,zope9-location = ${zope9:location}
whatsnew/3.2,,:location,zope9-location = ${zope9:location}
whatsnew/3.2,,:prefix,zope-conf = ${custom:prefix}/etc/zope.conf
whatsnew/3.2,,:prefix,zope-conf = ${custom:prefix}/etc/zope.conf
whatsnew/changelog,,:platform,:platform:
whatsnew/changelog,,:platform,:platform:
whatsnew/changelog,,:gz,": TarFile opened with external fileobj and ""w:gz"" mode didn't"
whatsnew/changelog,,:PythonCmd,"With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused"
whatsnew/changelog,,:PythonCmd,"With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused"
whatsnew/changelog,,::,": Fix FTP tests for IPv6, bind to ""::1"" instead of ""localhost""."
whatsnew/changelog,,::,": Fix FTP tests for IPv6, bind to ""::1"" instead of ""localhost""."
whatsnew/changelog,,::,": Use ""127.0.0.1"" or ""::1"" instead of ""localhost"" as much as"
whatsnew/changelog,,::,": Use ""127.0.0.1"" or ""::1"" instead of ""localhost"" as much as"
...
...
Include/patchlevel.h
View file @
235a96fb
...
@@ -20,10 +20,10 @@
...
@@ -20,10 +20,10 @@
#define PY_MINOR_VERSION 4
#define PY_MINOR_VERSION 4
#define PY_MICRO_VERSION 0
#define PY_MICRO_VERSION 0
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA
#define PY_RELEASE_SERIAL
2
#define PY_RELEASE_SERIAL
3
/* Version as a string */
/* Version as a string */
#define PY_VERSION "3.4.0b
2
+"
#define PY_VERSION "3.4.0b
3
+"
/*--end constants--*/
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
...
...
Lib/distutils/__init__.py
View file @
235a96fb
...
@@ -13,5 +13,5 @@ used from a setup script as
...
@@ -13,5 +13,5 @@ used from a setup script as
# Updated automatically by the Python release process.
# Updated automatically by the Python release process.
#
#
#--start constants--
#--start constants--
__version__
=
"3.4.0b
2
"
__version__
=
"3.4.0b
3
"
#--end constants--
#--end constants--
Lib/idlelib/idlever.py
View file @
235a96fb
IDLE_VERSION
=
"3.4.0b
2
"
IDLE_VERSION
=
"3.4.0b
3
"
Lib/pydoc_data/topics.py
View file @
235a96fb
This diff is collapsed.
Click to expand it.
Misc/NEWS
View file @
235a96fb
...
@@ -2,10 +2,22 @@
...
@@ -2,10 +2,22 @@
Python
News
Python
News
+++++++++++
+++++++++++
What
's New in Python 3.4.0 release candidate 1?
===============================================
Release date: 2014-02-09
Core and Builtins
-----------------
Library
-------
What'
s
New
in
Python
3.4.0
Beta
3
?
What'
s
New
in
Python
3.4.0
Beta
3
?
==================================
==================================
Release date: 2014-01-2
5
Release
date
:
2014
-
01
-
2
6
Core
and
Builtins
Core
and
Builtins
-----------------
-----------------
...
...
Misc/RPM/python-3.4.spec
View file @
235a96fb
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
%define name python
%define name python
#--start constants--
#--start constants--
%define version 3.4.0b
2
%define version 3.4.0b
3
%define libvers 3.4
%define libvers 3.4
#--end constants--
#--end constants--
%define release 1pydotorg
%define release 1pydotorg
...
...
README
View file @
235a96fb
This is Python version 3.4.0 beta
2
This is Python version 3.4.0 beta
3
===================================
===================================
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment