Commit Graph

385 Commits

Author SHA1 Message Date
Trent Nelson 05c197c75e Make PyAST_obj2mod C89 compliant. 2012-12-13 07:13:18 +00:00
Ezio Melotti c820de5e60 #15923: fix a mistake in asdl_c.py that resulted in a TypeError after 2801bf875a24 (see #15801). 2012-09-30 22:41:37 +03:00
Georg Brandl 02144cca2f Remove unused variables in parsetok(). 2012-08-11 11:16:18 +02:00
Jesus Cea 3e3192d8f7 Closes #15512: Correct __sizeof__ support for parser 2012-08-03 14:25:53 +02:00
Jesus Cea d0f5f4827d Issue #1677: Unused variable warning in Non-Windows 2012-07-03 13:07:58 +02:00
Jesus Cea 99ad1f1354 Backed out changeset 7ccc2cea6969 2012-07-03 13:06:45 +02:00
Jesus Cea 263afe2fed Issue #1667: Unused variable warning in Non-Windows 2012-07-03 13:04:55 +02:00
Tim Golden 4702336a0d Issue #1677: Handle better a race condition between the interactive interpreter and
the Ctrl-C signal handler on Windows
2012-06-29 18:20:44 +01:00
Benjamin Peterson 5eed3062f5 allow None identifiers 2011-07-22 17:20:58 -05:00
Benjamin Peterson 77820242dd verify the types of AST strings and identifiers (closes #12609 and #12610) 2011-07-22 10:39:50 -05:00
Benjamin Peterson 59c69512be hardcode the old svn __version__ 2011-07-22 10:39:12 -05:00
Victor Stinner 08563d904d Issue #12016: my_fgets() now always clears errors before calling fgets(). Fix
the following case: sys.stdin.read() stopped with CTRL+d (end of file),
raw_input() interrupted by CTRL+c.
2011-05-30 23:44:13 +02:00
Victor Stinner 2c585f607e (Merge 3.1) Issue #1195: Fix input() if it is interrupted by CTRL+d and then
CTRL+c, clear the end-of-file indicator after CTRL+d.
2011-05-10 00:22:59 +02:00
Victor Stinner 5de51ac4c0 (Merge 3.1) Issue #11650: PyOS_StdioReadline() retries fgets() if it was
interrupted (EINTR), for example if the program is stopped with CTRL+z on Mac
OS X. Patch written by Charles-Francois Natali.
2011-04-09 16:09:08 +02:00
Stefan Krah 3db4161011 Issue #9020: The Py_IS* macros from pyctype.h should generally only be
used with signed/unsigned char arguments. For integer arguments, EOF
has to be handled separately.
2010-06-24 09:33:05 +00:00
Benjamin Peterson c009735b50 spacing nit; this isn't C 2010-06-22 19:45:51 +00:00
Benjamin Peterson 1056ca264f fix code formatting 2010-06-09 19:45:04 +00:00
Senthil Kumaran cccfce1959 Doc Fix. Correct link to Zephyr ASDL Abstract page. 2010-05-18 13:40:23 +00:00
Victor Stinner 3bea1ede7d Use 4-spaces for indentation (instead of tabs) in pgen outputs
Regenerate (reindent) Python/graminit.c
2010-05-15 22:55:28 +00:00
Antoine Pitrou c83ea137d7 Untabify C files. Will watch buildbots. 2010-05-09 14:46:46 +00:00
Benjamin Peterson 88623d76b4 use our own locale independent ctype macros
requires building pyctype.o into pgen
2010-04-03 23:03:35 +00:00
Benjamin Peterson 4ceeeb09d8 ensure that the locale does not affect the tokenization of identifiers 2010-04-03 22:48:51 +00:00
Victor Stinner 6664426d7c Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt
(SIGINT). If an error occurs while importing the site module, the error is
printed and Python exits. Initialize the GIL before importing the site
module.
2010-03-10 22:30:19 +00:00
Victor Stinner d23d3930ff Issue #7820: The parser tokenizer restores all bytes in the right if the BOM
check fails.

Fix an assertion in pydebug mode.
2010-03-02 23:20:02 +00:00
Andrew M. Kuchling b64d61369a #2560: remove an unnecessary 'for' loop from my_fgets() in Parser/myreadline.c.
Noted by Joseph Armbruster; patch by Jessica McKellar.

The original code was 'for (;;) {...}', where ... ended
with a 'return -2' statement and did not contain a 'break' or 'continue'
statement.  Therefore, the body of the loop is always executed once.

Once upon a time there was a 'continue' in the loop, but it was removed in
rev36346, committed by mwh on Wed Jul 7 17:44:12 2004.
2010-02-22 22:48:41 +00:00
Alexandre Vassalotti b646547bb4 Issue #2333: Backport set and dict comprehensions syntax. 2010-01-11 22:36:12 +00:00
Alexandre Vassalotti ee936a2130 Issue #2335: Backport set literals syntax from Python 3.x. 2010-01-09 23:35:54 +00:00
Benjamin Peterson 5f429e0227 account for PyObject_IsInstance's new ability to fail 2009-12-13 00:54:15 +00:00
Benjamin Peterson 42d63847c3 rewrite translate_newlines for clarity 2009-12-06 17:37:48 +00:00
Benjamin Peterson e36199b49d fix several compile() issues by translating newlines in the tokenizer 2009-11-12 23:39:44 +00:00
Benjamin Peterson e3383b8e8f spelling 2009-11-07 01:04:38 +00:00
Benjamin Peterson 9586cf8677 fix some coding style 2009-10-09 21:48:14 +00:00
Kristján Valur Jónsson d12f86ce96 http://bugs.python.org/issue6836
A memory block allocated with one API was being handed over to an object that used another API to release it.
2009-09-28 13:08:48 +00:00
Benjamin Peterson 08a0bbc846 don't mask encoding errors when decoding a string #6289 2009-06-16 00:29:31 +00:00
Benjamin Peterson a72be3b325 when no module is given in a 'from' relative import, make ImportFrom.module NULL 2009-06-13 20:23:33 +00:00
Alexandre Vassalotti f0c9e46cde Delete outdated make file for building the parser with MSVC 6. 2009-06-12 21:43:47 +00:00
Benjamin Peterson b4347a259c remove has_key 2009-06-07 22:55:36 +00:00
Benjamin Peterson 5c33d86b4b use booleans for flags 2009-06-07 22:54:35 +00:00
Benjamin Peterson dea29d0c11 always inherit from an appropiate base class 2009-06-07 22:35:00 +00:00
Benjamin Peterson bd9508a7df inherit from object 2009-06-07 22:33:11 +00:00
Martin v. Löwis b3b7d859b3 Issue #4279: Fix build of parsermodule under Cygwin. 2009-01-11 09:26:54 +00:00
Georg Brandl bc1309255e Remove useless string literal. 2009-01-03 13:45:15 +00:00
Benjamin Peterson bdca942ffc fix __future__ imports when multiple features are given 2008-10-26 20:21:13 +00:00
Benjamin Peterson aff36f1295 fix compiler warning 2008-10-19 13:59:01 +00:00
Armin Ronacher 35e01fbeaa Fixed #4067 by implementing _attributes and _fields for the AST root node. 2008-10-19 08:27:43 +00:00
Benjamin Peterson 84076d8a11 update asdl_c.py from r66377 2008-09-10 22:28:00 +00:00
Andrew M. Kuchling 110a48cf60 #3367: revert rev. 65539: this change causes test_parser to fail 2008-08-05 02:05:23 +00:00
Andrew M. Kuchling efa61bc15f #3367 from Kristjan Valur Jonsson:
If a PyTokenizer_FromString() is called with an empty string, the
tokenizer's line_start member never gets initialized.  Later, it is
compared with the token pointer 'a' in parsetok.c:193 and that behavior
can result in undefined behavior.
2008-08-05 01:38:08 +00:00
Benjamin Peterson 114f7e5fff #1683 prevent forking from interfering in threading storage
This should prevent some test_multiprocessing failures
2008-06-13 00:09:47 +00:00
Gregory P. Smith 9d53457e59 Merge in release25-maint r60793:
Added checks for integer overflows, contributed by Google. Some are
 only available if asserts are left in the code, in cases where they
 can't be triggered from Python code.
2008-06-11 07:41:16 +00:00