Serhiy Storchaka
9101e23ff6
Issue #15989 : Fix several occurrences of integer overflow
...
when result of PyLong_AsLong() narrowed to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
2013-01-19 12:41:45 +02:00
Andrew Svetlov
5b89840d9c
Issue #16714 : use 'raise' exceptions, don't 'throw'.
...
Patch by Serhiy Storchaka.
2012-12-18 21:26:36 +02:00
Andrew Svetlov
737fb89dd1
Issue #16714 : use 'raise' exceptions, don't 'throw'.
...
Patch by Serhiy Storchaka.
2012-12-18 21:14:22 +02:00
Antoine Pitrou
721738fbee
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
...
Patch by Serhiy Storchaka.
2012-08-15 23:20:39 +02:00
Antoine Pitrou
6f430e4963
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
...
Patch by Serhiy Storchaka.
2012-08-15 23:18:25 +02:00
Jesus Cea
88ca04e6a8
MERGE: Closes #15512 : Correct __sizeof__ support for parser
2012-08-03 14:29:26 +02:00
Jesus Cea
e9c5318967
Closes #15512 : Correct __sizeof__ support for parser
2012-08-03 14:28:37 +02:00
Mark Dickinson
943cab2fec
Issue #14741 : Merge fix from 3.2.
2012-05-07 17:25:14 +01:00
Mark Dickinson
da029fb293
Issue #14741 : Fix missing support for ellipsis in parser module.
2012-05-07 17:24:04 +01:00
Mark Dickinson
72f6095d4f
Issue #14697 : Merge fix from 3.2.
2012-05-07 16:36:33 +01:00
Mark Dickinson
11c1dee183
Issue #14697 : Fix missing parser module support for set displays and set comprehensions.
2012-05-07 16:34:34 +01:00
Mark Dickinson
cf360b9209
Issue #14701 : Add missing support for 'raise ... from' in parser module.
2012-05-07 12:01:27 +01:00
Mark Dickinson
9fad160411
Issue #14701 : Merge fix from 3.2.
2012-05-07 12:03:11 +01:00
Mark Dickinson
57404891a0
Issue #14696 : Merge from 3.2
2012-04-29 22:20:01 +01:00
Mark Dickinson
407b3bd89b
Issue #14696 : Fix parser module to understand 'nonlocal' declarations.
2012-04-29 22:18:31 +01:00
Mark Dickinson
b63fd2a408
Issue #9154 : Merge fix from 3.2.
2012-04-29 18:35:56 +01:00
Mark Dickinson
ea7e9f9a83
Issue #9154 : Fix parser module to understand function annotations.
2012-04-29 18:34:40 +01:00
Nick Coghlan
1f7ce62bd6
Implement PEP 380 - 'yield from' ( closes #11682 )
2012-01-13 21:43:40 +10:00
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
2011-10-14 10:20:37 +02:00
Martin v. Löwis
1ee1b6fe0d
Use identifier API for PyObject_GetAttrString.
2011-10-10 18:11:30 +02:00
Benjamin Peterson
f0cdbad1b3
always clear parser error
2011-06-05 22:14:05 -05:00
Benjamin Peterson
f719957d7a
only clear the parser error if it's set ( closes #12264 )
2011-06-04 22:06:42 -05:00
Victor Stinner
7f2fee3640
Issue #10785 : Store the filename as Unicode in the Python parser.
2011-04-05 00:39:01 +02:00
Ezio Melotti
4969f709cc
#11515 : Merge with 3.1.
2011-03-15 05:59:46 +02:00
Ezio Melotti
42da663e6f
#11515 : fix several typos. Patch by Piotr Kasprzyk.
2011-03-15 05:18:48 +02:00
Alexander Belopolsky
e239d23e8c
Issue #6697 : Fixed instances of _PyUnicode_AsString() result not checked for NULL
2010-12-08 23:31:48 +00:00
Georg Brandl
e5b99f0fb3
Remove redundant includes of headers that are already included by Python.h.
2010-11-30 09:41:01 +00:00
Mark Dickinson
0dce815c2b
Merged revisions 82555 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82555 | mark.dickinson | 2010-07-04 19:38:57 +0100 (Sun, 04 Jul 2010) | 2 lines
Issue #9130 : Validate ellipsis tokens in relative imports.
........
2010-07-04 18:39:48 +00:00
Mark Dickinson
feb3b75818
Issue #9130 : Validate ellipsis tokens in relative imports.
2010-07-04 18:38:57 +00:00
Mark Dickinson
1b9b5727cc
Merged revisions 82552-82553 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82552 | mark.dickinson | 2010-07-04 19:11:51 +0100 (Sun, 04 Jul 2010) | 2 lines
Issue #9130 : Fix validation of relative imports in parser module.
........
r82553 | mark.dickinson | 2010-07-04 19:15:26 +0100 (Sun, 04 Jul 2010) | 1 line
Fix symbol numbers in test_parser test.
........
2010-07-04 18:16:43 +00:00
Mark Dickinson
2cc8a5e490
Issue #9130 : Fix validation of relative imports in parser module.
2010-07-04 18:11:51 +00:00
Mark Dickinson
a441e6465a
Merged revisions 82537 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82537 | mark.dickinson | 2010-07-04 17:37:31 +0100 (Sun, 04 Jul 2010) | 2 lines
Issue #9128 : Fix validation of class decorators in parser module.
........
2010-07-04 16:39:03 +00:00
Mark Dickinson
2bd61a988f
Issue #9128 : Fix validation of class decorators in parser module.
2010-07-04 16:37:31 +00:00
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
................
2010-05-09 16:14:21 +00:00
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
2010-05-09 15:52:27 +00:00
Benjamin Peterson
4905e80c3d
fix an ambiguity in the grammar from the implementation of extended unpacking
...
(one which was strangely "resolved" by pgen)
This also kills the unused testlist1 rule and fixes parse tree validation of
extended unpacking.
2009-09-27 02:43:28 +00:00
Georg Brandl
0c31562a91
Merged revisions 72924 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72924 | georg.brandl | 2009-05-25 23:02:56 +0200 (Mo, 25 Mai 2009) | 6 lines
Allow multiple context managers in one with statement, as proposed
in http://codereview.appspot.com/53094 and accepted by Guido.
The construct is transformed into multiple With AST nodes so that
there should be no problems with the semantics.
........
2009-05-25 21:10:36 +00:00
Antoine Pitrou
37d1c18bda
Merged revisions 72645 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72645 | antoine.pitrou | 2009-05-14 23:48:09 +0200 (jeu., 14 mai 2009) | 6 lines
Issue #5918 : Fix a crash in the parser module.
Patch by Amaury.
........
2009-05-14 21:54:00 +00:00
Mark Dickinson
e94c679df0
Issue #1717 : rename tp_compare to tp_reserved. I'll change the
...
type of tp_compare in a separate commit, for ease of reversion
should things go wrong.
2009-02-02 20:36:42 +00:00
Mark Dickinson
211c625829
Issue #1717 , stage 2: remove uses of tp_compare in Modules and most
...
Objects.
2009-02-01 10:28:51 +00:00
Georg Brandl
eee3116690
Merged revisions 67463,67572,67576,67628 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67463 | skip.montanaro | 2008-12-01 02:55:22 +0100 (Mon, 01 Dec 2008) | 1 line
typo in comment
........
r67572 | georg.brandl | 2008-12-05 10:23:14 +0100 (Fri, 05 Dec 2008) | 2 lines
#4458 : recognize "-" as an argument, not a malformed option in gnu_getopt().
........
r67576 | georg.brandl | 2008-12-05 13:09:41 +0100 (Fri, 05 Dec 2008) | 2 lines
#4529 : fix parser's validation for try-except-finally statements.
........
r67628 | skip.montanaro | 2008-12-07 03:16:00 +0100 (Sun, 07 Dec 2008) | 1 line
muffed the default case
........
2008-12-07 15:15:22 +00:00
Benjamin Peterson
4469d0ca56
Merged revisions 67348,67355,67359,67362,67364-67365,67367-67368,67398,67423-67424,67432,67440-67441,67444-67445,67454-67455,67457-67458 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67348 | benjamin.peterson | 2008-11-22 20:09:41 -0600 (Sat, 22 Nov 2008) | 1 line
raise a better error
........
r67355 | georg.brandl | 2008-11-23 13:17:25 -0600 (Sun, 23 Nov 2008) | 2 lines
#4392 : fix parameter name.
........
r67359 | georg.brandl | 2008-11-23 15:57:30 -0600 (Sun, 23 Nov 2008) | 2 lines
#4399 : fix typo.
........
r67362 | gregory.p.smith | 2008-11-23 18:41:43 -0600 (Sun, 23 Nov 2008) | 2 lines
Document PY_SSIZE_T_CLEAN for PyArg_ParseTuple.
........
r67364 | benjamin.peterson | 2008-11-23 19:16:29 -0600 (Sun, 23 Nov 2008) | 2 lines
replace reference to debugger-hooks
........
r67365 | benjamin.peterson | 2008-11-23 22:09:03 -0600 (Sun, 23 Nov 2008) | 1 line
#4396 make the parser module correctly validate the with syntax
........
r67367 | georg.brandl | 2008-11-24 10:16:07 -0600 (Mon, 24 Nov 2008) | 2 lines
Fix typo.
........
r67368 | georg.brandl | 2008-11-24 13:56:47 -0600 (Mon, 24 Nov 2008) | 2 lines
#4404 : make clear what "path" is.
........
r67398 | benjamin.peterson | 2008-11-26 11:39:17 -0600 (Wed, 26 Nov 2008) | 1 line
fix typo in sqlite3 docs
........
r67423 | jesse.noller | 2008-11-28 12:59:35 -0600 (Fri, 28 Nov 2008) | 2 lines
issue4238: bsd support for cpu_count
........
r67424 | christian.heimes | 2008-11-28 13:33:33 -0600 (Fri, 28 Nov 2008) | 1 line
Retain copyright of processing examples. This was requested by a Debian maintainer during packaging of the multiprocessing package for 2.4/2.5
........
r67432 | benjamin.peterson | 2008-11-28 17:18:46 -0600 (Fri, 28 Nov 2008) | 1 line
SVN format 9 is the same it seems
........
r67440 | jeremy.hylton | 2008-11-28 17:42:59 -0600 (Fri, 28 Nov 2008) | 4 lines
Move definition int sval into branch of ifdef where it is used.
Otherwise, you get a warning about an undefined variable.
........
r67441 | jeremy.hylton | 2008-11-28 18:09:16 -0600 (Fri, 28 Nov 2008) | 2 lines
Reflow long lines.
........
r67444 | amaury.forgeotdarc | 2008-11-28 20:03:32 -0600 (Fri, 28 Nov 2008) | 2 lines
Fix a small typo in docstring
........
r67445 | benjamin.peterson | 2008-11-29 21:07:33 -0600 (Sat, 29 Nov 2008) | 1 line
StringIO.close() stops you from using the buffer, too
........
r67454 | benjamin.peterson | 2008-11-30 08:43:23 -0600 (Sun, 30 Nov 2008) | 1 line
note the version that works
........
r67455 | martin.v.loewis | 2008-11-30 13:28:27 -0600 (Sun, 30 Nov 2008) | 1 line
Issue #4365 : Add crtassem.h constants to the msvcrt module.
........
r67457 | christian.heimes | 2008-11-30 15:16:28 -0600 (Sun, 30 Nov 2008) | 1 line
w# requires Py_ssize_t
........
r67458 | benjamin.peterson | 2008-11-30 15:46:16 -0600 (Sun, 30 Nov 2008) | 1 line
fix pyspecific extensions that were broken by Sphinx's grand renaming
........
2008-11-30 22:46:23 +00:00
Benjamin Peterson
c0747cf537
Merged revisions 67028,67040,67044,67046,67052,67065,67070,67077,67082 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67028 | benjamin.peterson | 2008-10-25 18:27:07 -0500 (Sat, 25 Oct 2008) | 1 line
don't use a catch-all
........
r67040 | armin.rigo | 2008-10-28 12:01:21 -0500 (Tue, 28 Oct 2008) | 5 lines
Fix one of the tests: it relied on being present in an "output test" in
order to actually test what it was supposed to test, i.e. that the code
in the __del__ method did not crash. Use instead the new helper
test_support.captured_output().
........
r67044 | amaury.forgeotdarc | 2008-10-29 18:15:57 -0500 (Wed, 29 Oct 2008) | 3 lines
Correct error message in io.open():
closefd=True is the only accepted value with a file name.
........
r67046 | thomas.heller | 2008-10-30 15:18:13 -0500 (Thu, 30 Oct 2008) | 2 lines
Fixed a modulefinder crash on certain relative imports.
........
r67052 | christian.heimes | 2008-10-30 16:26:15 -0500 (Thu, 30 Oct 2008) | 1 line
Issue #4237 : io.FileIO() was raising invalid warnings caused by insufficient initialization of PyFileIOObject struct members.
........
r67065 | benjamin.peterson | 2008-10-30 18:59:18 -0500 (Thu, 30 Oct 2008) | 1 line
move unprefixed error into .c file
........
r67070 | benjamin.peterson | 2008-10-31 15:41:44 -0500 (Fri, 31 Oct 2008) | 1 line
rephrase has_key doc
........
r67077 | benjamin.peterson | 2008-11-03 09:14:51 -0600 (Mon, 03 Nov 2008) | 1 line
#4048 make the parser module accept relative imports as valid
........
r67082 | hirokazu.yamamoto | 2008-11-03 12:03:06 -0600 (Mon, 03 Nov 2008) | 2 lines
Issue #3774 : Fixed an error when create a Tkinter menu item without command
and then remove it. Written by Guilherme Polo (gpolo).
........
2008-11-03 20:31:38 +00:00
Benjamin Peterson
f216c9427d
Merged revisions 67066 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67066 | benjamin.peterson | 2008-10-30 21:16:05 -0500 (Thu, 30 Oct 2008) | 5 lines
make sure the parser flags and passed onto the compiler
This fixes "from __future__ import unicode_literals" in an exec statment
See #4225
........
2008-10-31 02:28:05 +00:00
Marc-André Lemburg
4cc0f24857
Rename PyUnicode_AsString -> _PyUnicode_AsString and
...
PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark
them for interpreter internal use only.
We'll have to rework these APIs or create new ones for the
purpose of accessing the UTF-8 representation of Unicode objects
for 3.1.
2008-08-07 18:54:33 +00:00
Georg Brandl
30704ea0db
Remove "ast" aliases from the parser module.
2008-07-23 15:07:12 +00:00
Amaury Forgeot d'Arc
e43d33a4db
#3247 Get rid of Py_FindMethod; use tp_members instead.
...
Otherwise dir(_sre.SRE_Match) returns an empty list.
First step: handle most occurrences, remove tp_getattr and fill the tp_methods and tp_members slots.
Add some test about attribute access.
2008-07-02 20:50:16 +00:00
Martin v. Löwis
1a21451b1d
Implement PEP 3121: new module initialization and finalization API.
2008-06-11 05:26:20 +00:00
Alexandre Vassalotti
f7fa63dd55
Rename copy_reg module to copyreg.
...
Updated documentation.
Merged revisions 63042 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r63042 | alexandre.vassalotti | 2008-05-11 04:25:28 -0400 (Sun, 11 May 2008) | 5 lines
Added module stub for copy_reg renaming in 3.0.
Renamed copy_reg to copyreg in the standard library, to avoid
spurious warnings and ease later merging to py3k branch. Public
documentation remains intact.
........
2008-05-11 08:55:36 +00:00
Alexandre Vassalotti
a85998af7c
Issue #1950 : Fixed misusage of PyUnicode_AsString().
2008-05-03 18:24:43 +00:00