Commit graph

1018 commits

Author SHA1 Message Date
Guido van Rossum 10f8ce6688 bpo-36280: Add Constant.kind field (GH-12295)
The value is a string for string and byte literals, None otherwise.
It is 'u' for u"..." literals, 'b' for b"..." literals, '' for "..." literals.
The 'r' (raw) prefix is ignored.
Does not apply to f-strings.

This appears sufficient to make mypy capable of using the stdlib ast module instead of typed_ast (assuming a mypy patch I'm working on).

WIP: I need to make the tests pass. @ilevkivskyi @serhiy-storchaka 



https://bugs.python.org/issue36280
2019-03-13 13:00:46 -07:00
tyomitch 1b304f992d Remove d_initial from the parser as it is unused (GH-12212)
d_initial, the first state of a particular DFA in the parser has always been initialized to 0 in the old pgen as well as the new pgen. As this value is not used and the first state of each DFA is assumed to be the first element in the array representing it, remove d_initial from the parser to reduce complexity.
2019-03-09 15:35:50 +00:00
Guido van Rossum 495da29225 bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086)
This adds a `feature_version` flag to `ast.parse()` (documented) and `compile()` (hidden) that allow tweaking the parser to support older versions of the grammar. In particular if `feature_version` is 5 or 6, the hacks for the `async` and `await` keyword from PEP 492 are reinstated. (For 7 or higher, these are unconditionally treated as keywords, but they are still special tokens rather than `NAME` tokens that the parser driver recognizes.)



https://bugs.python.org/issue35975
2019-03-07 12:38:08 -08:00
Serhiy Storchaka d8b3a98c90
bpo-36187: Remove NamedStore. (GH-12167)
NamedStore has been replaced with Store. The difference between
NamedStore and Store is handled when precess the NamedExpr node
one level upper.
2019-03-05 20:42:06 +02:00
Pablo Galindo 8bc401a55c
Clean implementation of Parser/pgen and fix some style issues (GH-12156) 2019-03-04 07:26:13 +00:00
Alex Gaynor 8589f14bbe
Remove some code which has been dead since 1994 (#12136) 2019-03-01 23:37:34 -05:00
Pablo Galindo 1f24a719e7
bpo-35808: Retire pgen and use pgen2 to generate the parser (GH-11814)
Pgen is the oldest piece of technology in the CPython repository, building it requires various #if[n]def PGEN hacks in other parts of the code and it also depends more and more on CPython internals. This commit removes the old pgen C code and replaces it for a new version implemented in pure Python. This is a modified and adapted version of lib2to3/pgen2 that can generate grammar files compatibles with the current parser.

This commit also eliminates all the #ifdef and code branches related to pgen, simplifying the code and making it more maintainable. The regen-grammar step now uses $(PYTHON_FOR_REGEN) that can be any version of the interpreter, so the new pgen code maintains compatibility with older versions of the interpreter (this also allows regenerating the grammar with the current CI solution that uses Python3.5). The new pgen Python module also makes use of the Grammar/Tokens file that holds the token specification, so is always kept in sync and avoids having to maintain duplicate token definitions.
2019-03-01 15:34:44 -08:00
Pablo Galindo b9d2e97601
Fix potential memory leak in parsetok.c (GH-11832) 2019-02-13 00:45:53 +00:00
Guido van Rossum d2b4c19d53
bpo-35879: Fix type comment leaks (GH-11728)
* Fix leak for # type: ignore
* Fix the type comment leak
2019-02-01 15:28:13 -08:00
Guido van Rossum 3a32e3bf88
bpo-35766 follow-up: Kill half-support for FunctionType in PyAST_obj2mod (#11714)
See 229874c612 (r252631862)

https://bugs.python.org/issue35766
2019-02-01 11:37:34 -08:00
Guido van Rossum dcfcd146f8 bpo-35766: Merge typed_ast back into CPython (GH-11645) 2019-01-31 12:40:27 +01:00
Emily Morehouse 8f59ee01be
bpo-35224: PEP 572 Implementation (#10497)
* Add tokenization of :=
- Add token to Include/token.h. Add token to documentation in Doc/library/token.rst.
- Run `./python Lib/token.py` to regenerate Lib/token.py.
- Update Parser/tokenizer.c: add case to handle `:=`.

* Add initial usage of := in grammar.

* Update Python.asdl to match the grammar updates. Regenerated Include/Python-ast.h and Python/Python-ast.c

* Update AST and compiler files in Python/ast.c and Python/compile.c. Basic functionality, this isn't scoped properly

* Regenerate Lib/symbol.py using `./python Lib/symbol.py`

* Tests - Fix failing tests in test_parser.py due to changes in token numbers for internal representation

* Tests - Add simple test for := token

* Tests - Add simple tests for named expressions using expr and suite

* Tests - Update number of levels for nested expressions to prevent stack overflow

* Update symbol table to handle NamedExpr

* Update Grammar to allow assignment expressions in if statements.
Regenerate Python/graminit.c accordingly using `make regen-grammar`

* Tests - Add additional tests for named expressions in RoundtripLegalSyntaxTestCase, based on examples and information directly from PEP 572

Note: failing tests are currently commented out (4 out of 24 tests currently fail)

* Tests - Add temporary syntax test failure tests in test_parser.py

Note: There is an outstanding TODO for this -- syntax tests need to be
moved to a different file (presumably test_syntax.py), but this is
covering what needs to be tested at the moment, and it's more convenient
to run a single test for the time being

* Add support for allowing assignment expressions as function argument annotations. Uncomment tests for these cases because they all pass now!

* Tests - Move existing syntax tests out of test_parser.py and into test_named_expressions.py. Refactor syntax tests to use unittest

* Add TargetScopeError exception to extend SyntaxError

Note: This simply creates the TargetScopeError exception, it is not yet
used anywhere

* Tests - Update tests per PEP 572

Continue refactoring test suite:
The named expression test suite now checks for any invalid cases that
throw exceptions (no longer limited to SyntaxErrors), assignment tests
to ensure that variables are properly assigned, and scope tests to
ensure that variable availability and values are correct

Note:
- There are still tests that are marked to skip, as they are not yet
implemented
- There are approximately 300 lines of the PEP that have not yet been
addressed, though these may be deferred

* Documentation - Small updates to XXX/todo comments

- Remove XXX from child description in ast.c
- Add comment with number of previously supported nested expressions for
3.7.X in test_parser.py

* Fix assert in seq_for_testlist()

* Cleanup - Denote "Not implemented -- No keyword args" on failing test case. Fix PEP8 error for blank lines at beginning of test classes in test_parser.py

* Tests - Wrap all file opens in `with...as` to ensure files are closed

* WIP: handle f(a := 1)

* Tests and Cleanup - No longer skips keyword arg test. Keyword arg test now uses a simpler test case and does not rely on an external file. Remove print statements from ast.c

* Tests - Refactor last remaining test case that relied on on external file to use a simpler test case without the dependency

* Tests - Add better description of remaning skipped tests. Add test checking scope when using assignment expression in a function argument

* Tests - Add test for nested comprehension, testing value and scope. Fix variable name in skipped comprehension scope test

* Handle restriction of LHS for named expressions - can only assign to LHS of type NAME. Specifically, restrict assignment to tuples

This adds an alternative set_context specifically for named expressions,
set_namedexpr_context. Thus, context is now set differently for standard
assignment versus assignment for named expressions in order to handle
restrictions.

* Tests - Update negative test case for assigning to lambda to match new error message. Add negative test case for assigning to tuple

* Tests - Reorder test cases to group invalid syntax cases and named assignment target errors

* Tests - Update test case for named expression in function argument - check that result and variable are set correctly

* Todo - Add todo for TargetScopeError based on Guido's comment (2b3acd37bd (r30472562))

* Tests - Add named expression tests for assignment operator in function arguments

Note: One of two tests are skipped, as function arguments are currently treating
an assignment expression inside of parenthesis as one child, which does
not properly catch the named expression, nor does it count arguments
properly

* Add NamedStore to expr_context. Regenerate related code with `make regen-ast`

* Add usage of NamedStore to ast_for_named_expr in ast.c. Update occurances of checking for Store to also handle NamedStore where appropriate

* Add ste_comprehension to _symtable_entry to track if the namespace is a comprehension. Initialize ste_comprehension to 0. Set set_comprehension to 1 in symtable_handle_comprehension

* s/symtable_add_def/symtable_add_def_helper. Add symtable_add_def to handle grabbing st->st_cur and passing it to symtable_add_def_helper. This now allows us to call the original code from symtable_add_def by instead calling symtable_add_def_helper with a different ste.

* Refactor symtable_record_directive to take lineno and col_offset as arguments instead of stmt_ty. This allows symtable_record_directive to be used for stmt_ty and expr_ty

* Handle elevating scope for named expressions in comprehensions.

* Handle error for usage of named expression inside a class block

* Tests - No longer skip scope tests. Add additional scope tests

* Cleanup - Update error message for named expression within a comprehension within a class. Update comments. Add assert for symtable_extend_namedexpr_scope to validate that we always find at least a ModuleScope if we don't find a Class or FunctionScope

* Cleanup - Add missing case for NamedStore in expr_context_name. Remove unused var in set_namedexpr_content

* Refactor - Consolidate set_context and set_namedexpr_context to reduce duplicated code. Special cases for named expressions are handled by checking if ctx is NamedStore

* Cleanup - Add additional use cases for ast_for_namedexpr in usage comment. Fix multiple blank lines in test_named_expressions

* Tests - Remove unnecessary test case. Renumber test case function names

* Remove TargetScopeError for now. Will add back if needed

* Cleanup - Small comment nit for consistency

* Handle positional argument check with named expression

* Add TargetScopeError exception definition. Add documentation for TargetScopeError in c-api docs. Throw TargetScopeError instead of SyntaxError when using a named expression in a comprehension within a class scope

* Increase stack size for parser by 200. This is a minimal change (approx. 5kb) and should not have an impact on any systems. Update parser test to allow 99 nested levels again

* Add TargetScopeError to exception_hierarchy.txt for test_baseexception.py_

* Tests - Major update for named expression tests, both in test_named_expressions and test_parser

- Add test for TargetScopeError
- Add tests for named expressions in comprehension scope and edge cases
- Add tests for named expressions in function arguments (declarations
and call sites)
- Reorganize tests to group them more logically

* Cleanup - Remove unnecessary comment

* Cleanup - Comment nitpicks

* Explicitly disallow assignment expressions to a name inside parentheses, e.g.: ((x) := 0)

- Add check for LHS types to detect a parenthesis then a name (see note)
- Add test for this scenario
- Update tests for changed error message for named assignment to a tuple
(also, see note)

Note: This caused issues with the previous error handling for named assignment
to a LHS that contained an expression, such as a tuple. Thus, the check
for the LHS of a named expression must be changed to be more specific if
we wish to maintain the previous error messages

* Cleanup - Wrap lines more strictly in test file

* Revert "Explicitly disallow assignment expressions to a name inside parentheses, e.g.: ((x) := 0)"

This reverts commit f1531400ca7d7a2d148830c8ac703f041740896d.

* Add NEWS.d entry

* Tests - Fix error in test_pickle.test_exceptions by adding TargetScopeError to list of exceptions

* Tests - Update error message tests to reflect improved messaging convention (s/can't/cannot)

* Remove cases that cannot be reached in compile.c. Small linting update.

* Update Grammar/Tokens to add COLONEQUAL. Regenerate all files

* Update TargetScopeError PRE_INIT and POST_INIT, as this was purposefully left out when fixing rebase conflicts

* Add NamedStore back and regenerate files

* Pass along line number and end col info for named expression

* Simplify News entry

* Fix compiler warning and explicity mark fallthrough
2019-01-24 16:49:56 -07:00
Ivan Levkivskyi 9932a22897
bpo-33416: Add end positions to Python AST (GH-11605)
The majority of this PR is tediously passing `end_lineno` and `end_col_offset` everywhere. Here are non-trivial points:
* It is not possible to reconstruct end positions in AST "on the fly", some information is lost after an AST node is constructed, so we need two more attributes for every AST node `end_lineno` and `end_col_offset`.
* I add end position information to both CST and AST.  Although it may be technically possible to avoid adding end positions to CST, the code becomes more cumbersome and less efficient.
* Since the end position is not known for non-leaf CST nodes while the next token is added, this requires a bit of extra care (see `_PyNode_FinalizeEndPos`). Unless I made some mistake, the algorithm should be linear.
* For statements, I "trim" the end position of suites to not include the terminal newlines and dedent (this seems to be what people would expect), for example in
  ```python
  class C:
      pass

  pass
  ```
  the end line and end column for the class definition is (2, 8).
* For `end_col_offset` I use the common Python convention for indexing, for example for `pass` the `end_col_offset` is 4 (not 3), so that `[0:4]` gives one the source code that corresponds to the node.
* I added a helper function `ast.get_source_segment()`, to get source text segment corresponding to a given AST node. It is also useful for testing.

An (inevitable) downside of this PR is that AST now takes almost 25% more memory. I think however it is probably justified by the benefits.
2019-01-22 11:18:22 +00:00
Anthony Sottile 995d9b9297 bpo-16806: Fix lineno and col_offset for multi-line string tokens (GH-10021) 2019-01-13 13:05:13 +09:00
Serhiy Storchaka 8ac658114d
bpo-30455: Generate all token related code and docs from Grammar/Tokens. (GH-10370)
"Include/token.h", "Lib/token.py" (containing now some data moved from
"Lib/tokenize.py") and new files "Parser/token.c" (containing the code
moved from "Parser/tokenizer.c") and "Doc/library/token-list.inc" (included
in "Doc/library/token.rst") are now generated from "Grammar/Tokens" by
"Tools/scripts/generate_token.py". The script overwrites files only if
needed and can be used on the read-only sources tree.

"Lib/symbol.py" is now generated by "Tools/scripts/generate_symbol_py.py"
instead of been executable itself.

Added new make targets "regen-token" and "regen-symbol" which are now
dependencies of "regen-all".

The documentation contains now strings for operators and punctuation tokens.
2018-12-22 11:18:40 +02:00
Serhiy Storchaka 94cf308ee2
bpo-33306: Improve SyntaxError messages for unbalanced parentheses. (GH-6516) 2018-12-17 17:34:14 +02:00
Zackery Spytz 4c49da0cb7 bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015)
Set MemoryError when appropriate, add missing failure checks,
and fix some potential leaks.
2018-12-07 12:11:30 +02:00
Victor Stinner 3bb183d7fb
bpo-35177, Python-ast.h: Fix "Yield" compiler warning (GH-10664)
Partially revert commit 5f2df88b63:
add "#undef Yield" to .c files after including Python-ast.h.

Fix the warning:

    winbase.h(102): warning C4005: 'Yield': macro redefinition
2018-11-22 18:38:38 +01:00
Victor Stinner 621cebe81b
bpo-35081: Rename internal headers (GH-10275)
Rename Include/internal/ headers:

* pycore_hash.h -> pycore_pyhash.h
* pycore_lifecycle.h -> pycore_pylifecycle.h
* pycore_mem.h -> pycore_pymem.h
* pycore_state.h -> pycore_pystate.h

Add missing headers to Makefile.pre.in and PCbuild:

* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h
2018-11-12 16:53:38 +01:00
Victor Stinner 5f2df88b63
bpo-35177: Add dependencies between header files (GH-10361)
* ast.h now includes Python-ast.h and node.h
* parsetok.h now includes node.h and grammar.h
* symtable.h now includes Python-ast.h
* Modify asdl_c.py to enhance Python-ast.h:

  * Add #ifndef/#define Py_PYTHON_AST_H to be able to include the header
    twice
  * Add "extern { ... }" for C++
  * Undefine "Yield" macro conflicting with winbase.h

* Remove "#undef Yield" from C files, it's now done in Python-ast.h
* Remove now useless includes in C files
2018-11-12 00:56:19 +01:00
Victor Stinner 50b48572d9
bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266)
If Py_BUILD_CORE is defined, the PyThreadState_GET() macro access
_PyRuntime which comes from the internal pycore_state.h header.
Public headers must not require internal headers.

Move PyThreadState_GET() and _PyInterpreterState_GET_UNSAFE() from
Include/pystate.h to Include/internal/pycore_state.h, and rename
PyThreadState_GET() to _PyThreadState_GET() there.

The PyThreadState_GET() macro of pystate.h is now redefined when
pycore_state.h is included, to use the fast _PyThreadState_GET().

Changes:

* Add _PyThreadState_GET() macro
* Replace "PyThreadState_GET()->interp" with
  _PyInterpreterState_GET_UNSAFE()
* Replace PyThreadState_GET() with _PyThreadState_GET() in internal C
  files (compiled with Py_BUILD_CORE defined), but keep
  PyThreadState_GET() in the public header files.
* _testcapimodule.c: replace PyThreadState_GET() with
  PyThreadState_Get(); the module is not compiled with Py_BUILD_CORE
  defined.
* pycore_state.h now requires Py_BUILD_CORE to be defined.
2018-11-01 01:51:40 +01:00
Victor Stinner 27e2d1f219
bpo-35081: Add pycore_ prefix to internal header files (GH-10263)
* Rename Include/internal/ header files:

  * pyatomic.h -> pycore_atomic.h
  * ceval.h -> pycore_ceval.h
  * condvar.h -> pycore_condvar.h
  * context.h -> pycore_context.h
  * pygetopt.h -> pycore_getopt.h
  * gil.h -> pycore_gil.h
  * hamt.h -> pycore_hamt.h
  * hash.h -> pycore_hash.h
  * mem.h -> pycore_mem.h
  * pystate.h -> pycore_state.h
  * warnings.h -> pycore_warnings.h

* PCbuild project, Makefile.pre.in, Modules/Setup: add the
  Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
  with #include "pycore_mem.h".
2018-11-01 00:52:28 +01:00
Serhiy Storchaka 3f22811fef
bpo-32892: Use ast.Constant instead of specific constant AST types. (GH-9445) 2018-09-27 17:42:37 +03:00
Ammar Askar 025eb98dc0 bpo-34683: Make SyntaxError column offsets consistently 1-indexed (gh-9338)
Also point to start of tokens in parsing errors.

Fixes bpo-34683
2018-09-24 14:12:49 -07:00
Benjamin Peterson e502451781
closes bpo-34646: Remove PyAPI_* macros from declarations. (GH-9218) 2018-09-12 12:06:42 -07:00
Zackery Spytz 5061a74a4c Remove unneeded PyUnicode_READY() in tokenizer.c (GH-9114) 2018-09-10 09:27:31 +03:00
Zackery Spytz 3e26e42c90 bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833) 2018-08-20 20:11:40 -07:00
Zackery Spytz 7c4ab2afb1 closes bpo-34400: Fix undefined behavior in parsetok(). (GH-4439)
Avoid undefined pointer arithmetic with NULL.
2018-08-14 23:27:26 -07:00
Victor Stinner 53b7d4e402
bpo-34170: Add _PyCoreConfig.bytes_warning (GH-8447)
Add more fields to _PyCoreConfig:

* _check_hash_pycs_mode
* bytes_warning
* debug
* inspect
* interactive
* legacy_windows_fs_encoding
* legacy_windows_stdio
* optimization_level
* quiet
* unbuffered_stdio
* user_site_directory
* verbose
* write_bytecode

Changes:

* Remove pymain_get_global_config() and pymain_set_global_config()
  which became useless. These functions have been replaced by
  _PyCoreConfig_GetGlobalConfig() and
  _PyCoreConfig_SetGlobalConfig().
* sys.flags.dont_write_bytecode value is now restricted to 1 even if
  -B option is specified multiple times on the command line.
* PyThreadState_Clear() now uses the config from the current
  interpreter rather than using global Py_VerboseFlag
2018-07-25 01:37:05 +02:00
Serhiy Storchaka aba24ff360
bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) 2018-07-23 23:41:11 +03:00
Victor Stinner c884616390
Fix Windows compiler warning in tokenize.c (GH-8359)
Fix the following warning on Windows:

parser\tokenizer.c(1297): warning C4244: 'function': conversion from
'__int64' to 'int', possible loss of data.
2018-07-21 03:36:06 +02:00
ValeriyaSinevich ce75df3031 bpo-30237: Output error when ReadConsole is canceled by CancelSynchronousIo. (GH-7911) 2018-07-19 15:34:03 -07:00
Serhiy Storchaka cf7303ed2a
bpo-33305: Improve SyntaxError for invalid numerical literals. (GH-6517) 2018-07-09 15:09:35 +03:00
Thomas A Caswell 9b9d58f0d8 bpo-31546: Fix input hook integration (GH-7978) 2018-06-28 09:29:44 -07:00
Serhiy Storchaka a5c42284e6
bpo-33677: Fix signatures of tp_clear handlers for AST and deque. (GH-7196) 2018-05-31 07:34:34 +03:00
Serhiy Storchaka 73cbe7a01a
bpo-32911: Revert bpo-29463. (GH-7121) (GH-7197)
Remove the docstring attribute of AST types and restore docstring
expression as a first stmt in their body.

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-05-29 12:04:55 +03:00
Serhiy Storchaka f320be77ff bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code (GH-5222)
Add two new private APIs: _PyObject_LookupAttr() and _PyObject_LookupAttrId()
2018-01-25 17:49:40 +09:00
Benjamin Peterson 0a37a30037
closes bpo-32460: ensure all non-static globals have initializers (#5061) 2017-12-31 10:04:13 -08:00
Serhiy Storchaka 598ceae876
bpo-32150: Expand tabs to spaces in C files. (#4583) 2017-11-28 17:56:10 +02:00
Victor Stinner 9e87e7776f
bpo-32096: Remove obj and mem from _PyRuntime (#4532)
bpo-32096, bpo-30860:  Partially revert the commit
2ebc5ce42a:

* Move structures back from Include/internal/mem.h to
  Objects/obmalloc.c
* Remove _PyObject_Initialize() and _PyMem_Initialize()
* Remove Include/internal/pymalloc.h
* Add test_capi.test_pre_initialization_api():
   Make sure that it's possible to call Py_DecodeLocale(), and then call
   Py_SetProgramName() with the decoded string, before Py_Initialize().

PyMem_RawMalloc() and Py_DecodeLocale() can be called again before
_PyRuntimeState_Init().

Co-Authored-By: Eric Snow <ericsnowcurrently@gmail.com>
2017-11-24 12:09:24 +01:00
Victor Stinner f2ddc6ac93
tokenizer: Remove unused tabs options (#4422)
Remove the following fields from tok_state structure which are now
used unused:

* altwarning: "Issue warning if alternate tabs don't match"
* alterror: "Issue error if alternate tabs don't match"
* alttabsize: "Alternate tab spacing"

Replace alttabsize variable with ALTTABSIZE define.
2017-11-17 01:25:47 -08:00
Victor Stinner f7e5b56c37
bpo-32030: Split Py_Main() into subfunctions (#4399)
* Don't use "Python runtime" anymore to parse command line options or
  to get environment variables: pymain_init() is now a strict
  separation.
* Use an error message rather than "crashing" directly with
  Py_FatalError(). Limit the number of calls to Py_FatalError(). It
  prepares the code to handle errors more nicely later.
* Warnings options (-W, PYTHONWARNINGS) and "XOptions" (-X) are now
  only added to the sys module once Python core is properly
  initialized.
* _PyMain is now the well identified owner of some important strings
  like: warnings options, XOptions, and the "program name". The
  program name string is now properly freed at exit.
  pymain_free() is now responsible to free the "command" string.
* Rename most methods in Modules/main.c to use a "pymain_" prefix to
  avoid conflits and ease debug.
* Replace _Py_CommandLineDetails_INIT with memset(0)
* Reorder a lot of code to fix the initialization ordering. For
  example, initializing standard streams now comes before parsing
  PYTHONWARNINGS.
* Py_Main() now handles errors when adding warnings options and
  XOptions.
* Add _PyMem_GetDefaultRawAllocator() private function.
* Cleanup _PyMem_Initialize(): remove useless global constants: move
  them into _PyMem_Initialize().
* Call _PyRuntime_Initialize() as soon as possible:
  _PyRuntime_Initialize() now returns an error message on failure.
* Add _PyInitError structure and following macros:

  * _Py_INIT_OK()
  * _Py_INIT_ERR(msg)
  * _Py_INIT_USER_ERR(msg): "user" error, don't abort() in that case
  * _Py_INIT_FAILED(err)
2017-11-15 15:48:08 -08:00
Serhiy Storchaka bba2239c17
bpo-31572: Get rid of _PyObject_HasAttrId() in the ASDL parser. (#3725)
Silence only expected AttributeError.
2017-11-11 16:41:32 +02:00
Jelle Zijlstra ac317700ce bpo-30406: Make async and await proper keywords (#1669)
Per PEP 492, 'async' and 'await' should become proper keywords in 3.7.
2017-10-05 23:24:46 -04:00
Antoine Pitrou b091bec824 bpo-31536: Avoid wholesale rebuild after make regen-all (#3678)
* bpo-31536: Avoid wholesale rebuild after `make regen-all`

* Add NEWS
2017-09-20 14:57:56 -07:00
Serhiy Storchaka 5d84cb368c bpo-31464: asdl_c.py no longer emits trailing spaces in Python-ast.h. (#3568) 2017-09-14 20:28:22 -07:00
Barry Warsaw b2e5794870 bpo-31338 (#3374)
* Add Py_UNREACHABLE() as an alias to abort().
* Use Py_UNREACHABLE() instead of assert(0)
* Convert more unreachable code to use Py_UNREACHABLE()
* Document Py_UNREACHABLE() and a few other macros.
2017-09-14 18:13:16 -07:00
Eric Snow 2ebc5ce42a bpo-30860: Consolidate stateful runtime globals. (#3397)
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals

Other globals are excluded (see globals.txt and check-c-globals.py).
2017-09-07 23:51:28 -06:00
Antoine Pitrou a6a4dc816d bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
Eric Snow 05351c1bd8 Revert "bpo-30860: Consolidate stateful runtime globals." (#3379)
Windows buildbots started failing due to include-related errors.
2017-09-05 21:43:08 -07:00
Eric Snow 76d5abc868 bpo-30860: Consolidate stateful runtime globals. (#2594)
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals

Other globals are excluded (see globals.txt and check-c-globals.py).
2017-09-05 18:26:16 -07:00
INADA Naoki a6296d34a4 bpo-31095: fix potential crash during GC (GH-2974) 2017-08-24 14:55:17 +09:00
Yuan Chao Chou 2af565baf4 Fix a shadow-compatible-local warning (#2180)
Change the shadowing naming, 'value' (Python-ast.c:4652), to 'val'
to prevent the variables from being misused.
2017-08-04 10:53:12 -07:00
Albert-Jan Nijburg c9ccacea3f bpo-25324: add missing comma in Parser/tokenizer.c (GH-1910) 2017-06-01 13:51:27 -07:00
Albert-Jan Nijburg fc354f0785 bpo-25324: copy tok_name before changing it (#1608)
* add test to check if were modifying token

* copy list so import tokenize doesnt have side effects on token

* shorten line

* add tokenize tokens to token.h to get them to show up in token

* move ERRORTOKEN back to its previous location, and fix nitpick

* copy comments from token.h automatically

* fix whitespace and make more pythonic

* change to fix comments from @haypo

* update token.rst and Misc/NEWS

* change wording

* some more wording changes
2017-05-31 16:00:21 +02:00
Jim Fasarakis-Hilliard cf1958af4c Remove obsolete declaration in tokenizer.h (#962) 2017-04-03 19:18:32 +03:00
Serhiy Storchaka 0b3ec19225 Use NULL rather than 0. (#778)
There was few cases of using literal 0 instead of NULL in the context of
pointers.  While this was a legitimate C code, using NULL rather than 0 makes
the code clearer.
2017-03-23 17:53:47 +02:00
INADA Naoki 4c78c527d2 bpo-29622: Make AST constructor to accept less than enough number of positional arguments (GH-249)
bpo-29463 added optional "docstring" field to 4 AST types.
While it is optional, it breaks backward compatibility because AST constructor
requires number of positional argument is same to number of fields.

AST types accepts empty arguments, and incomplete keyword arguments.
But it's not big problem because field can be filled after creation, and checked when compiling.
So stop requiring complete set of fields for positional arguments too.
2017-02-24 02:48:17 +09:00
INADA Naoki cb41b2766d bpo-29463: Add docstring field to some AST nodes. (#46)
* bpo-29463: Add docstring field to some AST nodes.

ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring
field for now.  It was first statement of there body.

* fix document.  thanks travis!

* doc fixes
2017-02-22 16:31:59 +01:00
Berker Peksag d2f4404bbb Issue #28489: Merge from 3.6 2017-02-05 04:33:11 +03:00
Berker Peksag 6f80562862 Issue #28489: Fix comment in tokenizer.c
Patch by Ryan Gonzalez.
2017-02-05 04:32:39 +03:00
INADA Naoki fc489082c8 Issue #29369: Use Py_IDENTIFIER in Python-ast.c 2017-01-25 22:33:43 +09:00
Victor Stinner a5ed5f000a Use _PyObject_CallNoArg()
Replace:
    PyObject_CallObject(callable, NULL)
with:
    _PyObject_CallNoArg(callable)
2016-12-06 18:45:50 +01:00
Serhiy Storchaka 06515833fe Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
2016-11-20 09:13:07 +02:00
Steve Dower 6c2b9d3479 Issue #28333: Fixes off-by-one error that was adding an extra space. 2016-10-25 11:51:54 -07:00
Steve Dower 59bd34fa8a Issue #28333: Remove unnecessary increment. 2016-10-08 12:20:45 -07:00
Steve Dower 3cd187b9f5 Issue #28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk Sun) 2016-10-08 12:18:16 -07:00
Serhiy Storchaka 5e80855af3 Issue #24098: Fixed possible crash when AST is changed in process of
compiling it.
2016-10-07 21:55:49 +03:00
Serhiy Storchaka cf3806026b Issue #24098: Fixed possible crash when AST is changed in process of
compiling it.
2016-10-07 21:51:28 +03:00
Benjamin Peterson e2e792d98f merge 3.5 (#28184) 2016-09-19 22:17:16 -07:00
Benjamin Peterson f5e8e8fc2b merge 3.5 (#24022) 2016-09-18 23:44:02 -07:00
Benjamin Peterson 57bda335e1 merge 3.4 2016-09-18 23:43:18 -07:00
Benjamin Peterson 26d998cfdd properly handle the single null-byte file (closes #24022) 2016-09-18 23:41:11 -07:00
Benjamin Peterson 9ac11a752a properly free memory in pgen 2016-09-18 18:00:25 -07:00
Benjamin Peterson 5a715cfc57 merge 3.5 (#27981) 2016-09-12 22:07:14 -07:00
Benjamin Peterson 35ee948fa5 restructure fp_setreadl so as to avoid refleaks (closes #27981) 2016-09-12 22:06:58 -07:00
Brett Cannon a721abac29 Issue #26331: Implement the parsing part of PEP 515.
Thanks to Georg Brandl for the patch.
2016-09-09 14:57:09 -07:00
Yury Selivanov 52c4e7cc84 Issue #28008: Implement PEP 530 -- asynchronous comprehensions. 2016-09-09 10:36:01 -07:00
Yury Selivanov f8cb8a16a3 Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations.
Patch by Ivan Levkivskyi.
2016-09-08 20:50:03 -07:00
Christian Heimes c6cc23d0b9 Skip unused value in tokenizer code
In the case of an escape character, c is never read. tok_next() is
used to advance the pointer.

CID 1225097
2016-09-09 00:09:45 +02:00
Steve Dower 3929499914 Issue #1602: Windows console doesn't input or print Unicode (PEP 528)
Closes #17602: Adds a readline implementation for the Windows console
2016-08-30 21:22:36 -07:00
Steve Dower 940f33a50f Issue #23524: Finish removing _PyVerify_fd from sources 2016-09-08 11:21:54 -07:00
Benjamin Peterson 2f8bfef158 replace PY_SIZE_MAX with SIZE_MAX 2016-09-07 09:26:18 -07:00
Benjamin Peterson ca47063998 replace Py_(u)intptr_t with the c99 standard types 2016-09-06 13:47:26 -07:00
Victor Stinner 4bb31e90f0 Fix a clang warning in grammar.c
Clang is smarter than GCC and emits a warning for dead code after a function
declared with __attribute__((__noreturn__)) (Py_FatalError).
2016-08-19 15:11:56 +02:00
Berker Peksag 531396c764 Issue #27336: Fix compilation failures --without-threads 2016-06-17 13:25:01 +03:00
Serhiy Storchaka ec39756960 Issue #22570: Renamed Py_SETREF to Py_XSETREF. 2016-04-06 09:50:03 +03:00
Serhiy Storchaka 48842714b9 Issue #22570: Renamed Py_SETREF to Py_XSETREF. 2016-04-06 09:45:48 +03:00
Berker Peksag 2a65ecb780 Issue #26130: Remove redundant variable 's' from Parser/parser.c
Patch by Oren Milman.
2016-03-28 00:45:28 +03:00
Benjamin Peterson 7285d520e0 remove duplicated check for fractions and complex numbers (closes #26076)
Patch by Oren Milman.
2016-03-24 22:43:23 -07:00
Serhiy Storchaka a051bf3afb Issue #26581: Use the first coding cookie on a line, not the last one. 2016-03-20 23:47:48 +02:00
Serhiy Storchaka e431d3c9aa Issue #26581: Use the first coding cookie on a line, not the last one. 2016-03-20 23:36:29 +02:00
Victor Stinner 0611c26a58 On memory error, dump the memory block traceback
Issue #26564: _PyObject_DebugDumpAddress() now dumps the traceback where a
memory block was allocated on memory block. Use the tracemalloc module to get
the traceback.
2016-03-15 22:22:13 +01:00
Victor Stinner 8a1be61849 Add more checks on the GIL
Issue #10915, #15751, #26558:

* PyGILState_Check() now returns 1 (success) before the creation of the GIL and
  after the destruction of the GIL. It allows to use the function early in
  Python initialization and late in Python finalization.
* Add a flag to disable PyGILState_Check(). Disable PyGILState_Check() when
  Py_NewInterpreter() is called
* Add assert(PyGILState_Check()) to: _Py_dup(), _Py_fstat(), _Py_read()
  and _Py_write()
2016-03-14 22:07:55 +01:00
Victor Stinner 25219f596a Issue #26146: remove useless code
obj2ast_constant() code is baesd on obj2ast_object() which has a special case
for Py_None. But in practice, we don't need to have a special case for
constants.

Issue noticed by Joseph Jevnik on a review.
2016-01-27 00:37:59 +01:00
Victor Stinner f2c1aa1661 Add ast.Constant
Issue #26146: Add a new kind of AST node: ast.Constant. It can be used by
external AST optimizers, but the compiler does not emit directly such node.

An optimizer can replace the following AST nodes with ast.Constant:

* ast.NameConstant: None, False, True
* ast.Num: int, float, complex
* ast.Str: str
* ast.Bytes: bytes
* ast.Tuple if items are constants too: tuple
* frozenset

Update code to accept ast.Constant instead of ast.Num and/or ast.Str:

* compiler
* docstrings
* ast.literal_eval()
* Tools/parser/unparse.py
2016-01-26 00:40:57 +01:00
Serhiy Storchaka ef1585eb9a Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
Serhiy Storchaka 2d06e84455 Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
Serhiy Storchaka f006940351 Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
2015-12-24 10:39:57 +02:00
Serhiy Storchaka 5a57ade58e Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
2015-12-24 10:35:59 +02:00
Serhiy Storchaka 0304729ec4 Issue #25388: Fixed tokenizer crash when processing undecodable source code
with a null byte.
2015-11-14 15:12:04 +02:00
Serhiy Storchaka 7e2b870b85 Issue #25388: Fixed tokenizer crash when processing undecodable source code
with a null byte.
2015-11-14 15:11:17 +02:00
Serhiy Storchaka 0d441119f5 Issue #25388: Fixed tokenizer crash when processing undecodable source code
with a null byte.
2015-11-14 15:10:35 +02:00
Victor Stinner f9827ea618 Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node when
compiling AST from Python objects.
2015-11-06 17:01:48 +01:00
Victor Stinner c106c68aeb Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node when
compiling AST from Python objects.
2015-11-06 17:01:48 +01:00
Benjamin Peterson 860c8a404a merge 3.5 (#25502) 2015-10-28 23:15:22 -07:00
Benjamin Peterson 669ff66c32 remove duplicated imports (closes #25502) 2015-10-28 23:15:13 -07:00
Serhiy Storchaka fc632e3912 Merge with 3.5. 2015-10-06 18:52:52 +03:00
Eric V. Smith 235a6f0984 Issue #24965: Implement PEP 498 "Literal String Interpolation". Documentation is still needed, I'll open an issue for that. 2015-09-19 14:51:32 -04:00
Eric V. Smith 6408dc82fa Fixed indentation. 2015-09-12 18:53:36 -04:00
Serhiy Storchaka 481d3af82e Make asdl_c.py to generate Python-ast.c changed in issue #15989. 2015-09-06 23:29:04 +03:00
Yury Selivanov 96ec934e75 Issue #24619: Simplify async/await tokenization.
This commit simplifies async/await tokenization in tokenizer.c,
tokenize.py & lib2to3/tokenize.py.  Previous solution was to keep
a stack of async-def & def blocks, whereas the new approach is just
to remember position of the outermost async-def block.

This change won't bring any parsing performance improvements, but
it makes the code much easier to read and validate.
2015-07-23 15:01:58 +03:00
Yury Selivanov 8fb307cd65 Issue #24619: New approach for tokenizing async/await.
This commit fixes how one-line async-defs and defs are tracked
by tokenizer.  It allows to correctly parse invalid code such
as:

>>> async def f():
...     def g(): pass
...     async = 10

and valid code such as:

>>> async def f():
...     async def g(): pass
...     await z

As a consequence, is is now possible to have one-line
'async def foo(): await ..' functions:

>>> async def foo(): return await bar()
2015-07-22 13:33:45 +03:00
Yury Selivanov 8085b80c18 Issue 24226: Fix parsing of many sequential one-line 'def' statements. 2015-05-18 12:50:52 -04:00
Yury Selivanov 7544508f02 PEP 0492 -- Coroutines with async and await syntax. Issue #24017. 2015-05-11 22:57:16 -04:00
Benjamin Peterson 025e9ebd0a PEP 448: additional unpacking generalizations (closes #2292)
Patch by Neil Girdhar.
2015-05-05 20:16:41 -04:00
Benjamin Peterson 273a720f87 merge 3.4 (#24022) 2015-04-21 12:07:06 -04:00
Benjamin Peterson d73aca769f do not call into python api if an exception is set (#24022) 2015-04-21 12:05:19 -04:00
Serhiy Storchaka 45ec3288d0 Removed trailing whitespaces in miscalenous files. 2015-04-03 19:42:32 +03:00
Serhiy Storchaka a8cd4d482f Got rid of warnings "suggest braces around empty body in an ‘else’ statement"
in Parser/pgen.c.
2015-04-03 15:24:33 +03:00
Raymond Hettinger df1b699447 Issue #22823: Use set literals instead of creating a set from a list 2014-11-09 15:56:33 -08:00
Serhiy Storchaka 67c719b34b Silenced some warnings about comparison between signed and unsigned integer
expressions.
2014-09-05 10:10:23 +03:00
Guido van Rossum 416b516d46 Fix bootstrapping asdl -- it didn't work with Python 2.7. 2014-07-08 16:22:48 -07:00
Benjamin Peterson 3e439797ba merge 3.4 (#21642) 2014-06-07 12:39:51 -07:00
Benjamin Peterson c416162302 allow the keyword else immediately after (no space) an integer (closes #21642) 2014-06-07 12:36:39 -07:00
Eli Bendersky 5e3d338a74 Issue #19655: Replace the ASDL parser carried with CPython
The new parser does not rely on Spark (which is now removed from our repo),
uses modern 3.x idioms and is significantly smaller and simpler.

It generates exactly the same AST files (.h and .c), so in practice no builds
should be affected.
2014-05-09 17:58:22 -07:00
Benjamin Peterson d51374ed78 PEP 465: a dedicated infix operator for matrix multiplication (closes #21176) 2014-04-09 23:55:56 -04:00
Martin v. Löwis 78f1e4c865 Merge with 3.3 2014-02-28 15:43:36 +01:00
Martin v. Löwis 815b41b1cd Issue #20731: Properly position in source code files even if they
are opened in text mode. Patch by Serhiy Storchaka.
2014-02-28 15:27:29 +01:00
Benjamin Peterson 42ec031fe7 merge 3.3 (#20588) 2014-02-10 22:41:40 -05:00
Benjamin Peterson c2f665e721 don't put runtime values in array initializer for C89 compliance (closes #20588) 2014-02-10 22:19:02 -05:00
Serhiy Storchaka 5940b92909 Do not reset the line number because we already set file position to correct
value.

(fixes error in patch for issue #18960)
2014-01-09 20:13:52 +02:00
Serhiy Storchaka 1064a13bb0 Do not reset the line number because we already set file position to correct
value.

(fixes error in patch for issue #18960)
2014-01-09 20:12:49 +02:00
Serhiy Storchaka 7282ff6d5b Issue #18960: Fix bugs with Python source code encoding in the second line.
* The first line of Python script could be executed twice when the source
encoding (not equal to 'utf-8') was specified on the second line.

* Now the source encoding declaration on the second line isn't effective if
the first line contains anything except a comment.

* As a consequence, 'python -x' works now again with files with the source
encoding declarations specified on the second file, and can be used again
to make Python batch files on Windows.

* The tokenize module now ignore the source encoding declaration on the second
line if the first line contains anything except a comment.

* IDLE now ignores the source encoding declaration on the second line if the
first line contains anything except a comment.

* 2to3 and the findnocoding.py script now ignore the source encoding
declaration on the second line if the first line contains anything except
a comment.
2014-01-09 18:41:59 +02:00
Serhiy Storchaka 768c16ce02 Issue #18960: Fix bugs with Python source code encoding in the second line.
* The first line of Python script could be executed twice when the source
encoding (not equal to 'utf-8') was specified on the second line.

* Now the source encoding declaration on the second line isn't effective if
the first line contains anything except a comment.

* As a consequence, 'python -x' works now again with files with the source
encoding declarations specified on the second file, and can be used again
to make Python batch files on Windows.

* The tokenize module now ignore the source encoding declaration on the second
line if the first line contains anything except a comment.

* IDLE now ignores the source encoding declaration on the second line if the
first line contains anything except a comment.

* 2to3 and the findnocoding.py script now ignore the source encoding
declaration on the second line if the first line contains anything except
a comment.
2014-01-09 18:36:09 +02:00
Christian Heimes af01f66817 Issue #16136: Remove VMS support and VMS-related code 2013-12-21 16:19:10 +01:00
Christian Heimes 724b828e79 upcast int to size_t to silence two autological-constant-out-of-range-compare warnings with clang. 2013-12-04 08:42:46 +01:00
Victor Stinner cad876d542 Fix a compiler warning on Windows 64-bit in parsetok.c
Python parser doesn't support lines longer than INT_MAX bytes yet
2013-11-18 01:09:51 +01:00
Victor Stinner 3a8a333942 Fix compiler warnings on Windows 64-bit in grammar.c
INT_MAX states and labels should be enough for everyone
2013-11-18 01:07:38 +01:00
Serhiy Storchaka c679227e31 Issue #1772673: The type of char* arguments now changed to const char*. 2013-10-19 21:03:34 +03:00
Victor Stinner c548660af5 Issue #16742: My fix on PyOS_StdioReadline() was incomplete, PyMem_FREE() was
not patched
2013-10-19 02:40:16 +02:00
Antoine Pitrou d01d396e7f Issue #4555: All exported C symbols are now prefixed with either "Py" or "_Py".
("make smelly" now clean)
2013-10-12 22:52:43 +02:00
Victor Stinner 2fe9bac4dc Close #16742: Fix misuse of memory allocations in PyOS_Readline()
The GIL must be held to call PyMem_Malloc(), whereas PyOS_Readline() releases
the GIL to read input.

The result of the C callback PyOS_ReadlineFunctionPointer must now be a string
allocated by PyMem_RawMalloc() or PyMem_RawRealloc() (or NULL if an error
occurred), instead of a string allocated by PyMem_Malloc() or PyMem_Realloc().

Fixing this issue was required to setup a hook on PyMem_Malloc(), for example
using the tracemalloc module.

PyOS_Readline() copies the result of PyOS_ReadlineFunctionPointer() into a new
buffer allocated by PyMem_Malloc(). So the public API of PyOS_Readline() does
not change.
2013-10-10 16:18:20 +02:00
Eli Bendersky 1891cff587 Move open outside try/finally 2013-09-26 09:35:39 -07:00
Eli Bendersky 99081238e9 Don't use fancy new Python features like 'with' - some bots don't have them
and can't bootstrap the parser.
2013-09-26 06:41:36 -07:00
Eli Bendersky 58fe1b1307 Normalize whitespace 2013-09-26 06:32:22 -07:00
Eli Bendersky b788a385cd Small fixes in Parser/asdl.py - no change in functionality.
1. Make it work when invoked directly from the command-line. It was failing
   due to a couple of stale function/class usages in the __main__ section.
2. Close the parsed file in the parse() function after opening it.
2013-09-26 06:31:32 -07:00
Victor Stinner daf455554b Issue #18571: Implementation of the PEP 446: file descriptors and file handles
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
2013-08-28 00:53:59 +02:00
Victor Stinner 14e461d5b9 Close #11619: The parser and the import machinery do not encode Unicode
filenames anymore on Windows.
2013-08-26 22:28:21 +02:00
Ezio Melotti d640fe2af5 #18803: merge with 3.3. 2013-08-26 01:33:30 +03:00
Ezio Melotti 7c4a7e6f3c #18803: fix more typos. Patch by Févry Thibault. 2013-08-26 01:32:56 +03:00
Antoine Pitrou 9ed5f27266 Issue #18722: Remove uses of the "register" keyword in C code. 2013-08-13 20:18:52 +02:00
Christian Heimes 73207e03ad Issue #18368: PyOS_StdioReadline() no longer leaks memory when realloc() fails. 2013-08-06 16:03:33 +02:00
Christian Heimes 9ae513caa7 Issue #18368: PyOS_StdioReadline() no longer leaks memory when realloc() fails. 2013-08-06 15:59:16 +02:00
Christian Heimes 1289565f4b Silence warning about set but unused variable inside compile_atom() in non-debug builds 2013-07-31 23:48:04 +02:00
Christian Heimes 5e4d372524 Silence warning about set but unused variable inside compile_atom() in non-debug builds 2013-07-31 23:47:56 +02:00
Christian Heimes b7f1b38dea Issue #18552: Check return value of PyArena_AddPyObject() in obj2ast_object(). 2013-07-27 00:33:35 +02:00
Christian Heimes 70c94e7896 Issue #18552: Check return value of PyArena_AddPyObject() in obj2ast_object(). 2013-07-27 00:33:13 +02:00
Victor Stinner b318990cac (Merge 3.3) Parser/asdl_c.py: use Py_CLEAR() 2013-07-27 00:04:42 +02:00
Victor Stinner 1acc129d48 Parser/asdl_c.py: use Py_CLEAR() 2013-07-27 00:03:47 +02:00
Victor Stinner ee4b59c0f8 (Merge 3.3) According to the PEP 7, C code must "use 4-space indents"
Replace 8 spaces with 4.
2013-07-27 00:01:35 +02:00
Victor Stinner ce72e1ce6c According to the PEP 7, C code must "use 4-space indents"
Replace 8 spaces with 4.
2013-07-27 00:00:36 +02:00
Christian Heimes 7b3902a20f Some compilers complain about 'control reaches end of non-void function'
because they don't understand that Py_FatalError() terminates the program.
2013-07-22 16:34:28 +02:00
Christian Heimes 1eb0cb12ac Some compilers complain about 'control reaches end of non-void function'
because they don't understand that Py_FatalError() terminates the program.
2013-07-22 16:34:13 +02:00
Christian Heimes 826b754e32 Add sanity check to PyGrammar_LabelRepr() in order to catch invalid tokens when debugging
a new grammar.
CID 715360
2013-07-22 10:30:45 +02:00
Christian Heimes 53d2dc4045 Add sanity check to PyGrammar_LabelRepr() in order to catch invalid tokens when debugging
a new grammar.
CID 715360
2013-07-22 10:30:14 +02:00
Victor Stinner bdf630c4a7 Issue #18408: Fix Python-ast.c: handle init_types() failure (ex: MemoryError) 2013-07-17 00:17:15 +02:00
Benjamin Peterson cb2226cb69 merge 3.3 2013-07-15 20:50:25 -07:00
Benjamin Peterson 265fba40c8 move declaration to top of block 2013-07-15 20:50:22 -07:00
Benjamin Peterson fd9c0203de merge 3.3 (closes #18470) 2013-07-15 20:47:47 -07:00
Benjamin Peterson 2dbfd88245 check the return value of new_string() (closes #18470) 2013-07-15 19:15:34 -07:00
Victor Stinner 526daabf34 Issue #18408: parsetok() must not write into stderr on memory allocation error
The caller gets an error code and can raise a classic Python exception.
2013-07-11 23:17:33 +02:00
Victor Stinner 3bf5f530d9 Issue #18408: parsetok() must not write into stderr on memory allocation error
The caller gets an error code and can raise a classic Python exception.
2013-07-11 22:52:19 +02:00
Christian Heimes 22ed7fe906 Fix resource leak in parser, free node ptr
CID 1028068 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable n going out of scope leaks the storage it points to.
2013-06-29 21:03:51 +02:00
Serhiy Storchaka 9670543a00 Issue #18038: SyntaxError raised during compilation sources with illegal
encoding now always contains an encoding name.
2013-06-09 16:53:55 +03:00
Serhiy Storchaka 3af14aaba5 Issue #18038: SyntaxError raised during compilation sources with illegal
encoding now always contains an encoding name.
2013-06-09 16:51:52 +03:00
Victor Stinner 796977360f Issue #9566: Fix compiler warning on Windows 64-bit 2013-06-05 00:44:00 +02:00
Benjamin Peterson 8d89c2aaba change AST codegen to use PyModule_AddIntMacro 2013-05-20 10:28:48 -07:00
Benjamin Peterson 7654ab9ef0 placate msvc 2013-03-18 23:39:53 -07:00
Benjamin Peterson b72406b8fa refactor to fix refleaks 2013-03-18 23:24:41 -07:00
Benjamin Peterson cda75be02a unify some ast.argument's attrs; change Attribute column offset (closes #16795)
Patch from Sven Brauch.
2013-03-18 10:48:58 -07:00
Martin v. Löwis b26a9b10ea Replace WaitForSingleObject with WaitForSingleObjectEx,
for better WinRT compatibility.
2013-01-25 14:25:48 +01:00
Benjamin Peterson 442f20996d create NameConstant AST class for None, True, and False literals (closes #16619) 2012-12-06 17:41:04 -05:00
Mark Dickinson 073f067369 Issue #16546: merge fix from 3.3 2012-11-25 14:37:43 +00:00
Mark Dickinson ded35aeb9d Issue #16546: make ast.YieldFrom argument mandatory. 2012-11-25 14:36:26 +00:00
Benjamin Peterson 742b2f8d7a make PyGrammar_LabelRepr return a const char * (closes #16369) 2012-10-31 13:36:13 -04:00
Benjamin Peterson d0845588b8 make _PyParser_TokenNames const 2012-10-24 08:21:52 -07:00
Matthias Klose aee3c76acf - Issue #16262: fix out-of-src-tree builds, if mercurial is not installed. 2012-10-21 23:12:35 +02:00
Ezio Melotti 8a9cc526fe #15923: merge with 3.2. 2012-09-30 22:47:47 +03:00
Ezio Melotti cb2916a714 #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
Antoine Pitrou ca8aa4acf6 Issue #15144: Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t.
Patch by Serhiy Storchaka.
2012-09-20 20:56:47 +02:00
Georg Brandl cc98887e45 Remove unused variables in parsetok(). 2012-08-11 11:16:18 +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
Benjamin Peterson 481ae50ccd construct fields in the right order (closes #15517)
Patch from Taihyun Hwang.
2012-07-31 21:41:56 -07:00
Benjamin Peterson 8107176f9b add gc support to the AST base type (closes #15293) 2012-07-08 11:03:46 -07:00
Antoine Pitrou 507507473e Issue #15291: Fix a memory leak where AST nodes where not properly deallocated. 2012-07-08 12:43:32 +02:00
Jesus Cea 035997f1a3 Issue #1677: Unused variable warning in Non-Windows 2012-07-03 13:15:03 +02:00
Tim Golden 9175c3d804 Issue #1677: Handle better a race condition between the interactive interpreter and
the Ctrl-C signal handler on Windows
2012-06-29 18:39:26 +01:00
Tim Golden b92b757eed Issue #1677: Handle better a race condition between the interactive interpreter and
the Ctrl-C signal handler on Windows
2012-06-29 18:27:08 +01:00
Christian Heimes 0b3847de6d Issue #15096: Drop support for the ur string prefix 2012-06-20 11:17:58 +02:00
Benjamin Peterson 77fa9379e2 use Py_ssize_t for ast sequence lengths 2012-05-15 10:10:27 -07:00
Martin v. Löwis ce58ed3e7c Merge with 3.2: issue #14433 2012-04-30 06:20:37 +02:00
Martin v. Löwis e654c11f56 Issue #14433: Prevent msvcrt crash in interactive prompt when stdin is closed. 2012-04-30 06:10:41 +02:00
Benjamin Peterson 1767e0274b free AST's dict 2012-03-14 21:50:29 -05:00
Victor Stinner 45e50de1f5 Try to fix compilation of Python-ast.c on Visual Studio 2008 2012-03-13 01:17:31 +01:00
Benjamin Peterson 7e0dbfbbde give the AST class a __dict__ 2012-03-12 09:46:44 -07:00
Armin Ronacher 6ecf77b3f8 Basic support for PEP 414 without docs or tests. 2012-03-04 12:04:06 +00:00
Benjamin Peterson cff9237d57 check after comments, too (#13832) 2012-01-19 17:46:13 -05:00
Benjamin Peterson 188bee5873 don't leak node 2012-01-19 08:48:18 -05:00
Benjamin Peterson 79c1f96438 only check this when parsing python 2012-01-19 08:48:11 -05:00
Meador Inge fa21bf015d Issue #12705: Raise SyntaxError when compiling multiple statements as single interactive statement 2012-01-19 01:08:41 -06:00
Benjamin Peterson 8d5a62df10 murder tabs 2012-01-16 09:54:28 -05:00
Benjamin Peterson 527c622926 make YieldFrom its own distinct from Yield (closes #13780) 2012-01-14 08:58:23 -05:00
Nick Coghlan 1f7ce62bd6 Implement PEP 380 - 'yield from' (closes #11682) 2012-01-13 21:43:40 +10:00
Antoine Pitrou 3a5d4cb940 Issue #13748: Raw bytes literals can now be written with the rb prefix as well as br. 2012-01-12 22:46:19 +01:00
Benjamin Peterson f51d36a743 evidently some buildbots don't have python 3 installed 2011-12-29 12:07:21 -06:00
Benjamin Peterson 3ab85886d6 run AST toolchain on python3 2011-12-29 12:03:55 -06:00
Antoine Pitrou ab0e9f7089 Issue #10350: Read and save errno before calling a function which might overwrite it.
Original patch by Hallvard B Furuseth.
2011-12-16 12:29:37 +01:00
Antoine Pitrou c345ce1a69 Issue #10350: Read and save errno before calling a function which might overwrite it.
Original patch by Hallvard B Furuseth.
2011-12-16 12:28:32 +01:00
Amaury Forgeot d'Arc 942d5ba125 Merge branch 3.2 2011-11-22 22:02:01 +01:00
Amaury Forgeot d'Arc 58e8761da6 Issue #13436: Fix a bogus error message when an AST object was passed
an invalid integer value.
2011-11-22 21:51:55 +01:00
Antoine Pitrou f364e7b598 Fix memory leak with FLUFL-related syntax errors (!) 2011-11-13 01:02:02 +01:00
Antoine Pitrou 9ec2593bda Fix memory leak with FLUFL-related syntax errors (!) 2011-11-13 01:01:23 +01:00
Meador Inge 70d86bdef1 Issue 13243: Rename _Py_identifier to _Py_IDENTIFIER in asdl_c.py
Parser/asdl_c.py was missed in commit 7109f31300fb when _Py_identifier
was replaced with _Py_IDENTIFIER.  Thanks to Eric Snow for the patch.
2011-10-22 14:06:50 -05:00
Martin v. Löwis 1c67dd9b15 Port SetAttrString/HasAttrString to SetAttrId/GetAttrId. 2011-10-14 15:16:45 +02: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
Martin v. Löwis afe55bba33 Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
2011-10-09 10:38:36 +02:00
Martin v. Löwis d63a3b8beb Implement PEP 393. 2011-09-28 07:41:54 +02:00
Éric Araujo 6f08f53e79 Merge 3.2 2011-09-02 17:32:30 +02:00
Benjamin Peterson 0224d4e699 accept bytes for the AST 'string' type
This is a temporary kludge and all is well in 3.3.
2011-08-31 22:13:03 -04:00
Benjamin Peterson 5a3f49bb7e revert code which conditionally writes Python-ast.h (closes #12727) 2011-08-11 14:42:28 -05:00
Benjamin Peterson 257a1d0f28 2.x syntax 2011-08-09 18:48:02 -05:00
Benjamin Peterson 4ec450d3c7 make this work on 2.4 2011-08-09 18:38:57 -05:00
Benjamin Peterson 6f7500424c make this work with py2.5 2011-08-09 16:49:52 -05:00
Benjamin Peterson 398256b230 don't rewrite the header file if it hasn't changed; this reduces development build time 2011-08-09 16:28:58 -05:00
Benjamin Peterson 4dc6499613 the bool asdl type died a while ago 2011-08-09 16:10:09 -05:00
Benjamin Peterson e249841903 add a asdl bytes type, so Bytes.s be properly typechecked 2011-08-09 16:08:39 -05:00
Benjamin Peterson 8a4b42b7f4 merge 3.2 2011-07-22 11:10:43 -05:00
Benjamin Peterson 180e63507d None is ok for identifiers but not strings 2011-07-22 11:09:07 -05:00
Benjamin Peterson 86f088e8e5 merge 3.2 2011-07-22 10:55:02 -05:00
Benjamin Peterson 2193d2b72b type check AST strings and identifiers
This is related to a21829180423 as well as #12609 and #12610.
2011-07-22 10:50:23 -05:00
Benjamin Peterson efad2449fc hardcode the old svn __version__ 2011-07-22 10:39:12 -05:00
Benjamin Peterson 0bd152cd67 remove ast.__version__ (closes #12273) 2011-07-15 21:10:13 -05:00
Benjamin Peterson 620b2c8c98 comment which is not applicable anymore 2011-07-15 15:27:34 -05:00
Benjamin Peterson 0c1036270d remove intrcheck.c, which hasn't been used for years 2011-06-20 19:22:34 -05:00
Victor Stinner 0c9f31b4c0 (Merge 3.2) 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:47:01 +02:00
Victor Stinner 4f71101eed 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:46:00 +02:00
Benjamin Peterson 758888d437 don't restrict unexpected EOF errors to the first line (closes #12216) 2011-05-30 11:12:38 -05:00
Benjamin Peterson 43af12b0b4 unify TryExcept and TryFinally (closes #12199) 2011-05-29 11:43:10 -05:00
Benjamin Peterson bf1bbc1452 reflect with statements with multiple items in the AST (closes #12106) 2011-05-27 13:58:08 -05:00
Victor Stinner 00c5925533 (Merge 3.2) 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:21:26 +02:00
Victor Stinner db932786af 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:20:35 +02:00
Victor Stinner 4755ab010f 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:19:53 +02:00
Jesus Cea c1935d2abf Revert bb62908896fe, but keep the test 2011-04-25 04:03:58 +02:00
Jesus Cea 88f7841be7 Correctly merging #9319 into 3.3? 2011-04-25 03:46:43 +02:00
Victor Stinner c68b6aaec8 Issue #9319: Fix a crash on parsing a Python source code without encoding
cookie and not valid in UTF-8: use "<file>" as the filename instead of
reading from NULL.
2011-04-23 00:41:19 +02:00
Victor Stinner 4ae3b447c8 (Merge 3.2) 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:01:55 +02:00
Victor Stinner a870e35a7d (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 15:59:25 +02:00
Victor Stinner 52c950f229 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 15:55:44 +02:00
Victor Stinner fe7c5b5bdf Issue #9319: Include the filename in "Non-UTF8 code ..." syntax error. 2011-04-05 01:48:03 +02: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
Ezio Melotti 373089239b #11515: Merge with 3.2. 2011-03-15 06:03:08 +02:00
Benjamin Peterson c9723d09eb use only the hex version, since the revno is unreliable across repos 2011-03-13 16:36:08 -05:00
Benjamin Peterson 0d6245dd89 actually get file rev 2011-03-12 18:35:02 -06:00
Benjamin Peterson 6cb2b923e0 convert ast versioning to mercurial 2011-03-12 18:28:16 -06:00
Brett Cannon b94767ff44 Issue #8914: fix various warnings from the Clang static analyzer v254. 2011-02-22 20:15:44 +00:00
Victor Stinner 034c7537d8 Issue #10841: don't translate newlines for pgen 2011-01-07 18:56:19 +00:00
Victor Stinner 89e3436606 Issue #10841: set binary mode on files; the parser translates newlines
On Windows, set the binary mode on stdin, stdout, stderr and all
io.FileIO objects (to not translate newlines, \r\n <=> \n). The Python parser
translates newlines (\r\n => \n).
2011-01-07 18:47:22 +00:00
Victor Stinner aaa4e9a438 Remove arbitrary string length limits
PyUnicode_FromFormat() and PyErr_Format() allocates a buffer of the needed
size, it is no more a fixed-buffer of 500 bytes.
2011-01-05 03:33:26 +00:00
Victor Stinner 60fe499941 Compile pgenmain.c and printgrammar.c with PGEN defined 2010-12-28 23:05:20 +00:00
Victor Stinner 83098a4095 Issue #10778: decoding_fgets() decodes the filename from the filesystem
encoding instead of UTF-8.
2010-12-27 20:12:13 +00:00
Georg Brandl f55aa80b37 Merged revisions 85820,85823,85825,85840,85843-85845,85849-85851,85855,85867,85875,85907-85908,85911,85914 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r85820 | georg.brandl | 2010-10-24 16:20:22 +0200 (So, 24 Okt 2010) | 1 line

  Remove usage of exception indexing.
........
  r85823 | georg.brandl | 2010-10-24 16:32:45 +0200 (So, 24 Okt 2010) | 1 line

  Fix style.
........
  r85825 | georg.brandl | 2010-10-24 17:16:02 +0200 (So, 24 Okt 2010) | 1 line

  Add documentation about the default warnings filters.
........
  r85840 | georg.brandl | 2010-10-25 19:50:20 +0200 (Mo, 25 Okt 2010) | 1 line

  #3018: tkinter demo fixes for py3k.
........
  r85843 | georg.brandl | 2010-10-26 08:59:23 +0200 (Di, 26 Okt 2010) | 1 line

  Markup fix.
........
  r85844 | georg.brandl | 2010-10-26 12:39:14 +0200 (Di, 26 Okt 2010) | 1 line

  Work a bit more on tkinter demos.
........
  r85845 | georg.brandl | 2010-10-26 12:42:16 +0200 (Di, 26 Okt 2010) | 1 line

  faqwiz is removed.
........
  r85849 | georg.brandl | 2010-10-26 21:31:06 +0200 (Di, 26 Okt 2010) | 1 line

  #10200: typo.
........
  r85850 | georg.brandl | 2010-10-26 21:58:11 +0200 (Di, 26 Okt 2010) | 1 line

  #10200: typo.
........
  r85851 | georg.brandl | 2010-10-26 22:12:37 +0200 (Di, 26 Okt 2010) | 1 line

  Fix import.
........
  r85855 | georg.brandl | 2010-10-27 09:21:54 +0200 (Mi, 27 Okt 2010) | 1 line

  Encoding fix.
........
  r85867 | georg.brandl | 2010-10-27 22:01:51 +0200 (Mi, 27 Okt 2010) | 1 line

  Add David.
........
  r85875 | georg.brandl | 2010-10-28 10:38:30 +0200 (Do, 28 Okt 2010) | 1 line

  Fix bytes/str issues in get-remote-certificate.py.
........
  r85907 | georg.brandl | 2010-10-29 06:54:13 +0200 (Fr, 29 Okt 2010) | 1 line

  #10222: fix for overzealous AIX compiler.
........
  r85908 | georg.brandl | 2010-10-29 07:22:17 +0200 (Fr, 29 Okt 2010) | 1 line

  send_bytes obviously needs bytes...
........
  r85911 | georg.brandl | 2010-10-29 07:36:28 +0200 (Fr, 29 Okt 2010) | 1 line

  Fix markup error and update false positive entries from "make suspicious".
........
  r85914 | georg.brandl | 2010-10-29 08:17:38 +0200 (Fr, 29 Okt 2010) | 1 line

  (?:...) is a non-capturing, but still grouping construct.
........
2010-11-26 08:59:40 +00:00
Benjamin Peterson 0a4dae5309 fix refleak 2010-11-21 15:12:34 +00:00
Benjamin Peterson 787cddc93d Merged revisions 86545 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86545 | benjamin.peterson | 2010-11-19 22:31:07 -0600 (Fri, 19 Nov 2010) | 1 line

  new plan: functions that want 'tmp' can declare it
........
2010-11-20 04:37:00 +00:00
Benjamin Peterson d8f6597318 new plan: functions that want 'tmp' can declare it 2010-11-20 04:31:07 +00:00
Benjamin Peterson e82c169622 Merged revisions 86540 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86540 | benjamin.peterson | 2010-11-19 20:01:45 -0600 (Fri, 19 Nov 2010) | 1 line

  c89 declarations
........
2010-11-20 02:04:14 +00:00
Benjamin Peterson 0e9e98edc7 c89 declarations 2010-11-20 02:01:45 +00:00
Benjamin Peterson aab9585130 Merged revisions 86538 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86538 | benjamin.peterson | 2010-11-19 19:38:49 -0600 (Fri, 19 Nov 2010) | 1 line

  use %R format code; fixes invalid dereferencing #10391
........
2010-11-20 01:48:38 +00:00
Benjamin Peterson 5b066817e2 use %R format code; fixes invalid dereferencing #10391 2010-11-20 01:38:49 +00:00
Georg Brandl 2b15bd810d #10222: fix for overzealous AIX compiler. 2010-10-29 04:54:13 +00:00
Victor Stinner 15244f7b12 Recorded merge of revisions 85569-85570 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85569 | victor.stinner | 2010-10-16 15:14:10 +0200 (sam., 16 oct. 2010) | 4 lines

  Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expects
  filenames encoded to the filesystem encoding with surrogateescape error handler
  (to support undecodable bytes), instead of UTF-8 in strict mode.
........
  r85570 | victor.stinner | 2010-10-16 15:42:53 +0200 (sam., 16 oct. 2010) | 4 lines

  Fix ast_error_finish() and err_input(): filename can be NULL

  Fix my previous commit (r85569).
........
2010-10-19 01:22:07 +00:00
Victor Stinner 4c7c8c3023 Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expects
filenames encoded to the filesystem encoding with surrogateescape error handler
(to support undecodable bytes), instead of UTF-8 in strict mode.
2010-10-16 13:14:10 +00:00
Victor Stinner 22a351aabf Issue #10095: fp_setreadl() doesn't reopen the file, reuse instead the file
descriptor.
2010-10-14 12:04:34 +00:00
Benjamin Peterson 3e5cd1d04e Merged revisions 81465-81466,81468,81679,81735,81760,81868,82183 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81465 | georg.brandl | 2010-05-22 06:29:19 -0500 (Sat, 22 May 2010) | 2 lines

  Issue #3924: Ignore cookies with invalid "version" field in cookielib.
........
  r81466 | georg.brandl | 2010-05-22 06:31:16 -0500 (Sat, 22 May 2010) | 1 line

  Underscore the name of an internal utility function.
........
  r81468 | georg.brandl | 2010-05-22 06:43:25 -0500 (Sat, 22 May 2010) | 1 line

  #8635: document enumerate() start parameter in docstring.
........
  r81679 | benjamin.peterson | 2010-06-03 16:21:03 -0500 (Thu, 03 Jun 2010) | 1 line

  use a set for membership testing
........
  r81735 | michael.foord | 2010-06-05 06:46:59 -0500 (Sat, 05 Jun 2010) | 1 line

  Extract error message truncating into a method (unittest.TestCase._truncateMessage).
........
  r81760 | michael.foord | 2010-06-05 14:38:42 -0500 (Sat, 05 Jun 2010) | 1 line

  Issue 8302. SkipTest exception is setUpClass or setUpModule is now reported as a skip rather than an error.
........
  r81868 | benjamin.peterson | 2010-06-09 14:45:04 -0500 (Wed, 09 Jun 2010) | 1 line

  fix code formatting
........
  r82183 | benjamin.peterson | 2010-06-23 15:29:26 -0500 (Wed, 23 Jun 2010) | 1 line

  cpython only gc tests
........
2010-06-27 21:45:24 +00:00
Benjamin Peterson 60995fbdc5 Merged revisions 82160 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r82160 | benjamin.peterson | 2010-06-22 14:45:51 -0500 (Tue, 22 Jun 2010) | 1 line

  spacing nit; this isn't C
........
2010-06-22 20:02:39 +00:00
Benjamin Peterson 5b92772e24 use the 's' format code instead of 'U' 2010-06-07 22:24:18 +00:00
Senthil Kumaran bb35b21bce Merged revisions 81288 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r81288 | senthil.kumaran | 2010-05-18 19:18:45 +0530 (Tue, 18 May 2010) | 9 lines

  Merged revisions 81286 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r81286 | senthil.kumaran | 2010-05-18 19:10:23 +0530 (Tue, 18 May 2010) | 3 lines

    Doc Fix. Correct link to Zephyr ASDL Abstract page.
  ........
................
2010-05-18 13:51:07 +00:00
Senthil Kumaran 2b80fa6939 Merged revisions 81286 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81286 | senthil.kumaran | 2010-05-18 19:10:23 +0530 (Tue, 18 May 2010) | 3 lines

  Doc Fix. Correct link to Zephyr ASDL Abstract page.
........
2010-05-18 13:48:45 +00:00
Victor Stinner 0ac51bd1b6 Merged revisions 81222 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r81222 | victor.stinner | 2010-05-16 01:00:51 +0200 (dim., 16 mai 2010) | 11 lines

  Merged revisions 81220 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r81220 | victor.stinner | 2010-05-16 00:55:28 +0200 (dim., 16 mai 2010) | 4 lines

    Use 4-spaces for indentation (instead of tabs) in pgen outputs

    Regenerate (reindent) Python/graminit.c
  ........
................
2010-05-15 23:03:15 +00:00
Victor Stinner beba826023 Merged revisions 81220 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81220 | victor.stinner | 2010-05-16 00:55:28 +0200 (dim., 16 mai 2010) | 4 lines

  Use 4-spaces for indentation (instead of tabs) in pgen outputs

  Regenerate (reindent) Python/graminit.c
........
2010-05-15 23:00:51 +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
Victor Stinner 003a5e702b Use PyErr_Format() in decoding_fgets()
Avoid a buffer of 500 bytes allocated on the stack.
2010-04-28 17:06:46 +00:00
Benjamin Peterson 4893abc77a Merged revisions 79725 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79725 | benjamin.peterson | 2010-04-03 18:03:35 -0500 (Sat, 03 Apr 2010) | 4 lines

  use our own locale independent ctype macros

  requires building pyctype.o into pgen
........
2010-04-03 23:10:01 +00:00
Benjamin Peterson 8daa49ee34 Merged revisions 79723 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79723 | benjamin.peterson | 2010-04-03 17:48:51 -0500 (Sat, 03 Apr 2010) | 1 line

  ensure that the locale does not affect the tokenization of identifiers
........
2010-04-03 22:55:48 +00:00
Benjamin Peterson 21896a330a Merged revisions 77952,78030,78102,78104,78107,78206,78216,78296-78297,78328,78331-78332,78336,78339,78343,78378-78379,78415,78559,78717,78791 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77952 | mark.dickinson | 2010-02-03 10:50:14 -0600 (Wed, 03 Feb 2010) | 1 line

  Fix test_inspect.py data to match recent change to inspect_fodder.py (r77942).
........
  r78030 | benjamin.peterson | 2010-02-06 14:14:10 -0600 (Sat, 06 Feb 2010) | 1 line

  check type_getattro for correctness in a descriptor corner case
........
  r78102 | andrew.kuchling | 2010-02-07 19:35:35 -0600 (Sun, 07 Feb 2010) | 1 line

  Move distutils into its own subsection; add various items
........
  r78104 | andrew.kuchling | 2010-02-08 07:22:24 -0600 (Mon, 08 Feb 2010) | 1 line

  Add two items; move a subsection
........
  r78107 | antoine.pitrou | 2010-02-08 14:25:47 -0600 (Mon, 08 Feb 2010) | 3 lines

  Clarify and correct description for ccbench and iobench.
........
  r78206 | r.david.murray | 2010-02-16 11:55:26 -0600 (Tue, 16 Feb 2010) | 3 lines

  Make the references to Popen in the description of Call
  and check_call into links.
........
  r78216 | andrew.kuchling | 2010-02-18 08:16:48 -0600 (Thu, 18 Feb 2010) | 1 line

  Add various items
........
  r78296 | andrew.kuchling | 2010-02-21 20:08:45 -0600 (Sun, 21 Feb 2010) | 1 line

  Re-word
........
  r78297 | andrew.kuchling | 2010-02-21 20:29:10 -0600 (Sun, 21 Feb 2010) | 1 line

  #7076: mention SystemRandom class near start of the module docs; reword change description for clarity.  Noted by Shawn Ligocki.
........
  r78328 | jack.diederich | 2010-02-22 12:17:16 -0600 (Mon, 22 Feb 2010) | 1 line

  fixes issue #7530, serve_forever()
........
  r78331 | andrew.kuchling | 2010-02-22 12:38:23 -0600 (Mon, 22 Feb 2010) | 1 line

  Fix comment typo
........
  r78332 | andrew.kuchling | 2010-02-22 12:42:07 -0600 (Mon, 22 Feb 2010) | 2 lines

  #7627: MH.remove() would fail if the MH mailbox was locked;
  it would call _unlock_file() and pass it a closed file object.  Noted by Rob Austein.
........
  r78336 | jack.diederich | 2010-02-22 13:55:22 -0600 (Mon, 22 Feb 2010) | 1 line

  fixes issue #1522237, bad init check in _threading_local
........
  r78339 | jack.diederich | 2010-02-22 15:27:38 -0600 (Mon, 22 Feb 2010) | 1 line

  * fix issue#7476
........
  r78343 | andrew.kuchling | 2010-02-22 16:48:41 -0600 (Mon, 22 Feb 2010) | 10 lines

  #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.
........
  r78378 | jack.diederich | 2010-02-23 11:23:30 -0600 (Tue, 23 Feb 2010) | 1 line

  fixup markup error
........
  r78379 | jack.diederich | 2010-02-23 13:34:06 -0600 (Tue, 23 Feb 2010) | 1 line

   issue#6442 use in operator instead of has_key
........
  r78415 | dirkjan.ochtman | 2010-02-23 22:00:52 -0600 (Tue, 23 Feb 2010) | 1 line

  Issue #7733: add explicit reference in asyncore docs.
........
  r78559 | andrew.kuchling | 2010-03-01 13:45:21 -0600 (Mon, 01 Mar 2010) | 1 line

  #7637: update discussion of minidom.unlink() and garbage collection
........
  r78717 | benjamin.peterson | 2010-03-05 21:13:33 -0600 (Fri, 05 Mar 2010) | 1 line

  settscdump is definitely an implementation detail
........
  r78791 | andrew.kuchling | 2010-03-08 06:00:39 -0600 (Mon, 08 Mar 2010) | 1 line

  Add various items
........
2010-03-21 22:03:03 +00:00
Victor Stinner ffbc2f63e1 Merged revisions 78872 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r78872 | victor.stinner | 2010-03-12 15:45:56 +0100 (ven., 12 mars 2010) | 12 lines

  Merged revisions 78826 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r78826 | victor.stinner | 2010-03-10 23:30:19 +0100 (mer., 10 mars 2010) | 5 lines

    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-21 21:48:45 +00:00
Victor Stinner 52f6dd7a3d Merged revisions 78826 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78826 | victor.stinner | 2010-03-10 23:30:19 +0100 (mer., 10 mars 2010) | 5 lines

  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-12 14:45:56 +00:00
Victor Stinner 151205f24f Merged revisions 78608 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r78608 | victor.stinner | 2010-03-03 01:18:49 +0100 (mer., 03 mars 2010) | 12 lines

  Merged revisions 78603 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r78603 | victor.stinner | 2010-03-03 00:20:02 +0100 (mer., 03 mars 2010) | 5 lines

    Issue #7820: The parser tokenizer restores all bytes in the right if the BOM
    check fails.

    Fix an assertion in pydebug mode.
  ........
................
2010-03-03 00:22:21 +00:00
Victor Stinner 6aa278ee53 Merged revisions 78603 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78603 | victor.stinner | 2010-03-03 00:20:02 +0100 (mer., 03 mars 2010) | 5 lines

  Issue #7820: The parser tokenizer restores all bytes in the right if the BOM
  check fails.

  Fix an assertion in pydebug mode.
........
2010-03-03 00:18:49 +00:00
Benjamin Peterson 8f326b2369 Merged revisions 76052,76522,76591,76689,76697,76733 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76052 | gregory.p.smith | 2009-11-01 20:02:38 -0600 (Sun, 01 Nov 2009) | 5 lines

  see issue1006238, this merges in the following patch to ease cross
  compiling the printf %zd check.

   http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/python/files/python-2.5-cross-printf.patch?rev=1.1&view=markup
........
  r76522 | barry.warsaw | 2009-11-25 12:38:32 -0600 (Wed, 25 Nov 2009) | 2 lines

  Add mktime_tz to __all__.  It's documented as being available in email.utils.
........
  r76591 | benjamin.peterson | 2009-11-29 16:26:26 -0600 (Sun, 29 Nov 2009) | 4 lines

  now that deepcopy can handle instance methods, this hack can be removed #7409

  Thanks Robert Collins
........
  r76689 | benjamin.peterson | 2009-12-06 11:37:48 -0600 (Sun, 06 Dec 2009) | 1 line

  rewrite translate_newlines for clarity
........
  r76697 | benjamin.peterson | 2009-12-06 15:24:30 -0600 (Sun, 06 Dec 2009) | 2 lines

  fix test_parser from tokenizer tweak
........
  r76733 | benjamin.peterson | 2009-12-09 21:37:59 -0600 (Wed, 09 Dec 2009) | 1 line

  substitute PyDict_Check() for PyObject_IsInstance
........
2009-12-13 02:10:36 +00:00
Benjamin Peterson fc431270ac Merged revisions 76776 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r76776 | benjamin.peterson | 2009-12-12 19:23:39 -0600 (Sat, 12 Dec 2009) | 25 lines

  Merged revisions 76534,76538,76628,76701,76774 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r76534 | martin.v.loewis | 2009-11-26 02:42:05 -0600 (Thu, 26 Nov 2009) | 2 lines

    Fix typo.
  ........
    r76538 | georg.brandl | 2009-11-26 14:48:25 -0600 (Thu, 26 Nov 2009) | 1 line

    #7400: typo.
  ........
    r76628 | andrew.kuchling | 2009-12-02 08:27:11 -0600 (Wed, 02 Dec 2009) | 1 line

    Markup fixes
  ........
    r76701 | andrew.kuchling | 2009-12-07 20:37:05 -0600 (Mon, 07 Dec 2009) | 1 line

    Typo fix; grammar fix
  ........
    r76774 | benjamin.peterson | 2009-12-12 18:54:15 -0600 (Sat, 12 Dec 2009) | 1 line

    account for PyObject_IsInstance's new ability to fail
  ........
................
2009-12-13 01:29:00 +00:00
Benjamin Peterson 97dd987ae2 Merged revisions 76534,76538,76628,76701,76774 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76534 | martin.v.loewis | 2009-11-26 02:42:05 -0600 (Thu, 26 Nov 2009) | 2 lines

  Fix typo.
........
  r76538 | georg.brandl | 2009-11-26 14:48:25 -0600 (Thu, 26 Nov 2009) | 1 line

  #7400: typo.
........
  r76628 | andrew.kuchling | 2009-12-02 08:27:11 -0600 (Wed, 02 Dec 2009) | 1 line

  Markup fixes
........
  r76701 | andrew.kuchling | 2009-12-07 20:37:05 -0600 (Mon, 07 Dec 2009) | 1 line

  Typo fix; grammar fix
........
  r76774 | benjamin.peterson | 2009-12-12 18:54:15 -0600 (Sat, 12 Dec 2009) | 1 line

  account for PyObject_IsInstance's new ability to fail
........
2009-12-13 01:23:39 +00:00
Benjamin Peterson 8f6713f46d Merged revisions 76235 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r76235 | benjamin.peterson | 2009-11-12 20:25:08 -0600 (Thu, 12 Nov 2009) | 170 lines

  Merged revisions 75149,75260-75263,75265-75267,75292,75300,75376,75405,75429-75433,75437,75445,75501,75551,75572,75589-75591,75657,75742,75868,75952-75957,76057,76105,76139,76143,76162,76223 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r75149 | gregory.p.smith | 2009-09-29 16:56:31 -0500 (Tue, 29 Sep 2009) | 3 lines

    Mention issue6972 in extractall docs about overwriting things outside of
    the supplied path.
  ........
    r75260 | andrew.kuchling | 2009-10-05 16:24:20 -0500 (Mon, 05 Oct 2009) | 1 line

    Wording fix
  ........
    r75261 | andrew.kuchling | 2009-10-05 16:24:35 -0500 (Mon, 05 Oct 2009) | 1 line

    Fix narkup
  ........
    r75262 | andrew.kuchling | 2009-10-05 16:25:03 -0500 (Mon, 05 Oct 2009) | 1 line

    Document 'skip' parameter to constructor
  ........
    r75263 | andrew.kuchling | 2009-10-05 16:25:35 -0500 (Mon, 05 Oct 2009) | 1 line

    Note side benefit of socket.create_connection()
  ........
    r75265 | andrew.kuchling | 2009-10-05 17:31:11 -0500 (Mon, 05 Oct 2009) | 1 line

    Reword sentence
  ........
    r75266 | andrew.kuchling | 2009-10-05 17:32:48 -0500 (Mon, 05 Oct 2009) | 1 line

    Use standard comma punctuation; reword some sentences in the docs
  ........
    r75267 | andrew.kuchling | 2009-10-05 17:42:56 -0500 (Mon, 05 Oct 2009) | 1 line

    Backport r73983: Document the thousands separator.
  ........
    r75292 | benjamin.peterson | 2009-10-08 22:11:36 -0500 (Thu, 08 Oct 2009) | 1 line

    death to old CVS keyword
  ........
    r75300 | benjamin.peterson | 2009-10-09 16:48:14 -0500 (Fri, 09 Oct 2009) | 1 line

    fix some coding style
  ........
    r75376 | benjamin.peterson | 2009-10-11 20:26:07 -0500 (Sun, 11 Oct 2009) | 1 line

    platform we don't care about
  ........
    r75405 | neil.schemenauer | 2009-10-14 12:17:14 -0500 (Wed, 14 Oct 2009) | 4 lines

    Issue #1754094: Improve the stack depth calculation in the compiler.
    There should be no other effect than a small decrease in memory use.
    Patch by Christopher Tur Lesniewski-Laas.
  ........
    r75429 | benjamin.peterson | 2009-10-14 20:47:28 -0500 (Wed, 14 Oct 2009) | 1 line

    pep8ify if blocks
  ........
    r75430 | benjamin.peterson | 2009-10-14 20:49:37 -0500 (Wed, 14 Oct 2009) | 1 line

    use floor division and add a test that exercises the tabsize codepath
  ........
    r75431 | benjamin.peterson | 2009-10-14 20:56:25 -0500 (Wed, 14 Oct 2009) | 1 line

    change test to what I intended
  ........
    r75432 | benjamin.peterson | 2009-10-14 22:05:39 -0500 (Wed, 14 Oct 2009) | 1 line

    some cleanups
  ........
    r75433 | benjamin.peterson | 2009-10-14 22:06:55 -0500 (Wed, 14 Oct 2009) | 1 line

    make inspect.isabstract() always return a boolean; add a test for it, too #7069
  ........
    r75437 | benjamin.peterson | 2009-10-15 10:44:46 -0500 (Thu, 15 Oct 2009) | 1 line

    only clear a module's __dict__ if the module is the only one with a reference to it #7140
  ........
    r75445 | vinay.sajip | 2009-10-16 09:06:44 -0500 (Fri, 16 Oct 2009) | 1 line

    Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE.
  ........
    r75501 | antoine.pitrou | 2009-10-18 13:37:11 -0500 (Sun, 18 Oct 2009) | 3 lines

    Add a comment about unreachable code, and fix a typo
  ........
    r75551 | benjamin.peterson | 2009-10-19 22:14:10 -0500 (Mon, 19 Oct 2009) | 1 line

    use property api
  ........
    r75572 | benjamin.peterson | 2009-10-20 16:55:17 -0500 (Tue, 20 Oct 2009) | 1 line

    clarify buffer arg #7178
  ........
    r75589 | benjamin.peterson | 2009-10-21 21:26:47 -0500 (Wed, 21 Oct 2009) | 1 line

    whitespace
  ........
    r75590 | benjamin.peterson | 2009-10-21 21:36:47 -0500 (Wed, 21 Oct 2009) | 1 line

    rewrite to be nice to other implementations
  ........
    r75591 | benjamin.peterson | 2009-10-21 21:50:38 -0500 (Wed, 21 Oct 2009) | 4 lines

    rewrite for style, clarify, and comments

    Also, use the hasattr() like scheme of allowing BaseException exceptions through.
  ........
    r75657 | antoine.pitrou | 2009-10-24 07:41:27 -0500 (Sat, 24 Oct 2009) | 3 lines

    Fix compilation error in debug mode.
  ........
    r75742 | benjamin.peterson | 2009-10-26 17:51:16 -0500 (Mon, 26 Oct 2009) | 1 line

    use 'is' instead of id()
  ........
    r75868 | benjamin.peterson | 2009-10-27 15:59:18 -0500 (Tue, 27 Oct 2009) | 1 line

    test expect base classes
  ........
    r75952 | georg.brandl | 2009-10-29 15:38:32 -0500 (Thu, 29 Oct 2009) | 1 line

    Use the correct function name in docstring.
  ........
    r75953 | georg.brandl | 2009-10-29 15:39:50 -0500 (Thu, 29 Oct 2009) | 1 line

    Remove mention of the old -X command line switch.
  ........
    r75954 | georg.brandl | 2009-10-29 15:53:00 -0500 (Thu, 29 Oct 2009) | 1 line

    Use constants instead of magic integers for test result.  Do not re-run with --verbose3 for environment changing tests.
  ........
    r75955 | georg.brandl | 2009-10-29 15:54:03 -0500 (Thu, 29 Oct 2009) | 1 line

    Use a single style for all the docstrings in the math module.
  ........
    r75956 | georg.brandl | 2009-10-29 16:16:34 -0500 (Thu, 29 Oct 2009) | 1 line

    I do not think the "railroad" program mentioned is still available.
  ........
    r75957 | georg.brandl | 2009-10-29 16:44:56 -0500 (Thu, 29 Oct 2009) | 1 line

    Fix constant name.
  ........
    r76057 | benjamin.peterson | 2009-11-02 09:06:45 -0600 (Mon, 02 Nov 2009) | 1 line

    prevent a rather unlikely segfault
  ........
    r76105 | georg.brandl | 2009-11-04 01:38:12 -0600 (Wed, 04 Nov 2009) | 1 line

    #7259: show correct equivalent for operator.i* operations in docstring; fix minor issues in operator docs.
  ........
    r76139 | benjamin.peterson | 2009-11-06 19:04:38 -0600 (Fri, 06 Nov 2009) | 1 line

    spelling
  ........
    r76143 | georg.brandl | 2009-11-07 02:26:07 -0600 (Sat, 07 Nov 2009) | 1 line

    #7271: fix typo.
  ........
    r76162 | benjamin.peterson | 2009-11-08 22:10:53 -0600 (Sun, 08 Nov 2009) | 1 line

    discuss how to use -p
  ........
    r76223 | georg.brandl | 2009-11-12 02:29:46 -0600 (Thu, 12 Nov 2009) | 1 line

    Give the profile module a module directive.
  ........
................
2009-11-13 02:29:35 +00:00
Benjamin Peterson a0dfa82eca Merged revisions 75149,75260-75263,75265-75267,75292,75300,75376,75405,75429-75433,75437,75445,75501,75551,75572,75589-75591,75657,75742,75868,75952-75957,76057,76105,76139,76143,76162,76223 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75149 | gregory.p.smith | 2009-09-29 16:56:31 -0500 (Tue, 29 Sep 2009) | 3 lines

  Mention issue6972 in extractall docs about overwriting things outside of
  the supplied path.
........
  r75260 | andrew.kuchling | 2009-10-05 16:24:20 -0500 (Mon, 05 Oct 2009) | 1 line

  Wording fix
........
  r75261 | andrew.kuchling | 2009-10-05 16:24:35 -0500 (Mon, 05 Oct 2009) | 1 line

  Fix narkup
........
  r75262 | andrew.kuchling | 2009-10-05 16:25:03 -0500 (Mon, 05 Oct 2009) | 1 line

  Document 'skip' parameter to constructor
........
  r75263 | andrew.kuchling | 2009-10-05 16:25:35 -0500 (Mon, 05 Oct 2009) | 1 line

  Note side benefit of socket.create_connection()
........
  r75265 | andrew.kuchling | 2009-10-05 17:31:11 -0500 (Mon, 05 Oct 2009) | 1 line

  Reword sentence
........
  r75266 | andrew.kuchling | 2009-10-05 17:32:48 -0500 (Mon, 05 Oct 2009) | 1 line

  Use standard comma punctuation; reword some sentences in the docs
........
  r75267 | andrew.kuchling | 2009-10-05 17:42:56 -0500 (Mon, 05 Oct 2009) | 1 line

  Backport r73983: Document the thousands separator.
........
  r75292 | benjamin.peterson | 2009-10-08 22:11:36 -0500 (Thu, 08 Oct 2009) | 1 line

  death to old CVS keyword
........
  r75300 | benjamin.peterson | 2009-10-09 16:48:14 -0500 (Fri, 09 Oct 2009) | 1 line

  fix some coding style
........
  r75376 | benjamin.peterson | 2009-10-11 20:26:07 -0500 (Sun, 11 Oct 2009) | 1 line

  platform we don't care about
........
  r75405 | neil.schemenauer | 2009-10-14 12:17:14 -0500 (Wed, 14 Oct 2009) | 4 lines

  Issue #1754094: Improve the stack depth calculation in the compiler.
  There should be no other effect than a small decrease in memory use.
  Patch by Christopher Tur Lesniewski-Laas.
........
  r75429 | benjamin.peterson | 2009-10-14 20:47:28 -0500 (Wed, 14 Oct 2009) | 1 line

  pep8ify if blocks
........
  r75430 | benjamin.peterson | 2009-10-14 20:49:37 -0500 (Wed, 14 Oct 2009) | 1 line

  use floor division and add a test that exercises the tabsize codepath
........
  r75431 | benjamin.peterson | 2009-10-14 20:56:25 -0500 (Wed, 14 Oct 2009) | 1 line

  change test to what I intended
........
  r75432 | benjamin.peterson | 2009-10-14 22:05:39 -0500 (Wed, 14 Oct 2009) | 1 line

  some cleanups
........
  r75433 | benjamin.peterson | 2009-10-14 22:06:55 -0500 (Wed, 14 Oct 2009) | 1 line

  make inspect.isabstract() always return a boolean; add a test for it, too #7069
........
  r75437 | benjamin.peterson | 2009-10-15 10:44:46 -0500 (Thu, 15 Oct 2009) | 1 line

  only clear a module's __dict__ if the module is the only one with a reference to it #7140
........
  r75445 | vinay.sajip | 2009-10-16 09:06:44 -0500 (Fri, 16 Oct 2009) | 1 line

  Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE.
........
  r75501 | antoine.pitrou | 2009-10-18 13:37:11 -0500 (Sun, 18 Oct 2009) | 3 lines

  Add a comment about unreachable code, and fix a typo
........
  r75551 | benjamin.peterson | 2009-10-19 22:14:10 -0500 (Mon, 19 Oct 2009) | 1 line

  use property api
........
  r75572 | benjamin.peterson | 2009-10-20 16:55:17 -0500 (Tue, 20 Oct 2009) | 1 line

  clarify buffer arg #7178
........
  r75589 | benjamin.peterson | 2009-10-21 21:26:47 -0500 (Wed, 21 Oct 2009) | 1 line

  whitespace
........
  r75590 | benjamin.peterson | 2009-10-21 21:36:47 -0500 (Wed, 21 Oct 2009) | 1 line

  rewrite to be nice to other implementations
........
  r75591 | benjamin.peterson | 2009-10-21 21:50:38 -0500 (Wed, 21 Oct 2009) | 4 lines

  rewrite for style, clarify, and comments

  Also, use the hasattr() like scheme of allowing BaseException exceptions through.
........
  r75657 | antoine.pitrou | 2009-10-24 07:41:27 -0500 (Sat, 24 Oct 2009) | 3 lines

  Fix compilation error in debug mode.
........
  r75742 | benjamin.peterson | 2009-10-26 17:51:16 -0500 (Mon, 26 Oct 2009) | 1 line

  use 'is' instead of id()
........
  r75868 | benjamin.peterson | 2009-10-27 15:59:18 -0500 (Tue, 27 Oct 2009) | 1 line

  test expect base classes
........
  r75952 | georg.brandl | 2009-10-29 15:38:32 -0500 (Thu, 29 Oct 2009) | 1 line

  Use the correct function name in docstring.
........
  r75953 | georg.brandl | 2009-10-29 15:39:50 -0500 (Thu, 29 Oct 2009) | 1 line

  Remove mention of the old -X command line switch.
........
  r75954 | georg.brandl | 2009-10-29 15:53:00 -0500 (Thu, 29 Oct 2009) | 1 line

  Use constants instead of magic integers for test result.  Do not re-run with --verbose3 for environment changing tests.
........
  r75955 | georg.brandl | 2009-10-29 15:54:03 -0500 (Thu, 29 Oct 2009) | 1 line

  Use a single style for all the docstrings in the math module.
........
  r75956 | georg.brandl | 2009-10-29 16:16:34 -0500 (Thu, 29 Oct 2009) | 1 line

  I do not think the "railroad" program mentioned is still available.
........
  r75957 | georg.brandl | 2009-10-29 16:44:56 -0500 (Thu, 29 Oct 2009) | 1 line

  Fix constant name.
........
  r76057 | benjamin.peterson | 2009-11-02 09:06:45 -0600 (Mon, 02 Nov 2009) | 1 line

  prevent a rather unlikely segfault
........
  r76105 | georg.brandl | 2009-11-04 01:38:12 -0600 (Wed, 04 Nov 2009) | 1 line

  #7259: show correct equivalent for operator.i* operations in docstring; fix minor issues in operator docs.
........
  r76139 | benjamin.peterson | 2009-11-06 19:04:38 -0600 (Fri, 06 Nov 2009) | 1 line

  spelling
........
  r76143 | georg.brandl | 2009-11-07 02:26:07 -0600 (Sat, 07 Nov 2009) | 1 line

  #7271: fix typo.
........
  r76162 | benjamin.peterson | 2009-11-08 22:10:53 -0600 (Sun, 08 Nov 2009) | 1 line

  discuss how to use -p
........
  r76223 | georg.brandl | 2009-11-12 02:29:46 -0600 (Thu, 12 Nov 2009) | 1 line

  Give the profile module a module directive.
........
2009-11-13 02:25:08 +00:00
Benjamin Peterson aeaa592516 Merged revisions 76230 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76230 | benjamin.peterson | 2009-11-12 17:39:44 -0600 (Thu, 12 Nov 2009) | 2 lines

  fix several compile() issues by translating newlines in the tokenizer
........
2009-11-13 00:17:59 +00:00
Skip Montanaro ba1e0f46ab Issue 7147 - remove ability to attempt to build Python without complex number support (was broken anyway) 2009-10-18 14:25:35 +00:00
Kristján Valur Jónsson ae4cfb1bb3 http://bugs.python.org/issue6836
Merging revisions 75103,75104 from trunk to py3k
2009-09-28 13:45:02 +00:00
Georg Brandl c3c6fed6fe Merged revisions 74010,74034,74054 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

................
  r74010 | r.david.murray | 2009-07-15 16:16:54 +0200 (Mi, 15 Jul 2009) | 2 lines

  PEP-8-ify r73389.
................
  r74034 | alexandre.vassalotti | 2009-07-17 07:35:59 +0200 (Fr, 17 Jul 2009) | 2 lines

  The output() function takes only one string argument.
................
  r74054 | alexandre.vassalotti | 2009-07-17 10:31:44 +0200 (Fr, 17 Jul 2009) | 14 lines

  Merged revisions 74051-74052 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74051 | alexandre.vassalotti | 2009-07-17 03:54:23 -0400 (Fri, 17 Jul 2009) | 2 lines

    Initialize variables in PyCurses_getsyx() to avoid compiler warnings.
  ........
    r74052 | alexandre.vassalotti | 2009-07-17 04:09:04 -0400 (Fri, 17 Jul 2009) | 3 lines

    Fix GCC warning about fprintf used without a string literal and
    without format arguments.
  ........
................
2009-08-13 09:15:16 +00:00
Alexandre Vassalotti df6f3fdaaf The output() function takes only one string argument. 2009-07-17 05:35:59 +00:00
Benjamin Peterson 78565b2216 Merged revisions 73376,73393,73398,73400,73404-73405,73409,73419-73421,73432,73457,73460,73485-73486,73488-73489,73501-73502,73513-73514 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73376 | benjamin.peterson | 2009-06-11 17:29:23 -0500 (Thu, 11 Jun 2009) | 1 line

  remove check for case handled in sub-function
........
  r73393 | alexandre.vassalotti | 2009-06-12 13:56:57 -0500 (Fri, 12 Jun 2009) | 2 lines

  Clear reference to the static PyExc_RecursionErrorInst in _PyExc_Fini.
........
  r73398 | alexandre.vassalotti | 2009-06-12 15:57:12 -0500 (Fri, 12 Jun 2009) | 3 lines

  Add const qualifier to PyErr_SetFromErrnoWithFilename and to
  PyErr_SetFromErrnoWithUnicodeFilename.
........
  r73400 | alexandre.vassalotti | 2009-06-12 16:43:47 -0500 (Fri, 12 Jun 2009) | 2 lines

  Delete outdated make file for building the parser with MSVC 6.
........
  r73404 | benjamin.peterson | 2009-06-12 20:40:00 -0500 (Fri, 12 Jun 2009) | 1 line

  keep the slice.step field as NULL if no step expression is given
........
  r73405 | benjamin.peterson | 2009-06-12 22:46:30 -0500 (Fri, 12 Jun 2009) | 1 line

  prevent import statements from assigning to None
........
  r73409 | benjamin.peterson | 2009-06-13 08:06:21 -0500 (Sat, 13 Jun 2009) | 1 line

  allow importing from a module named None if it has an 'as' clause
........
  r73419 | benjamin.peterson | 2009-06-13 11:19:19 -0500 (Sat, 13 Jun 2009) | 1 line

  set Print.values to NULL if there are no values
........
  r73420 | benjamin.peterson | 2009-06-13 12:08:53 -0500 (Sat, 13 Jun 2009) | 1 line

  give a better error message when deleting ()
........
  r73421 | benjamin.peterson | 2009-06-13 15:23:33 -0500 (Sat, 13 Jun 2009) | 1 line

  when no module is given in a 'from' relative import, make ImportFrom.module NULL
........
  r73432 | amaury.forgeotdarc | 2009-06-14 16:20:40 -0500 (Sun, 14 Jun 2009) | 3 lines

  #6227: Because of a wrong indentation, the test was not testing what it should.
  Ensure that the snippet in doctest_aliases actually contains aliases.
........
  r73457 | benjamin.peterson | 2009-06-16 18:13:09 -0500 (Tue, 16 Jun 2009) | 1 line

  add underscores
........
  r73460 | benjamin.peterson | 2009-06-16 22:23:04 -0500 (Tue, 16 Jun 2009) | 1 line

  remove unused 'encoding' member from the compiler struct
........
  r73485 | benjamin.peterson | 2009-06-19 17:07:47 -0500 (Fri, 19 Jun 2009) | 1 line

  remove duplicate test
........
  r73486 | benjamin.peterson | 2009-06-19 17:09:17 -0500 (Fri, 19 Jun 2009) | 1 line

  add missing assertion #6313
........
  r73488 | benjamin.peterson | 2009-06-19 17:16:28 -0500 (Fri, 19 Jun 2009) | 1 line

  show that this one isn't used
........
  r73489 | benjamin.peterson | 2009-06-19 17:21:12 -0500 (Fri, 19 Jun 2009) | 1 line

  use closures
........
  r73501 | benjamin.peterson | 2009-06-21 18:01:07 -0500 (Sun, 21 Jun 2009) | 1 line

  don't need to add the name 'lambda' as assigned
........
  r73502 | benjamin.peterson | 2009-06-21 18:03:36 -0500 (Sun, 21 Jun 2009) | 1 line

  remove tmpname support since it's no longer used
........
  r73513 | benjamin.peterson | 2009-06-22 20:18:57 -0500 (Mon, 22 Jun 2009) | 1 line

  fix grammar
........
  r73514 | benjamin.peterson | 2009-06-22 22:01:56 -0500 (Mon, 22 Jun 2009) | 1 line

  remove some unused symtable constants
........
2009-06-28 19:19:51 +00:00
Benjamin Peterson d76c8da098 Merged revisions 73623-73624 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r73623 | benjamin.peterson | 2009-06-28 12:22:03 -0500 (Sun, 28 Jun 2009) | 58 lines

  Merged revisions 73004,73439,73496,73509,73529,73564,73576-73577,73595-73596,73605 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r73004 | jeffrey.yasskin | 2009-05-28 22:44:31 -0500 (Thu, 28 May 2009) | 5 lines

    Fix nearly all compilation warnings under Apple gcc-4.0.  Tested with OPT="-g
    -Wall -Wstrict-prototypes -Werror" in both --with-pydebug mode and --without.
    There's still a batch of non-prototype warnings in Xlib.h that I don't know how
    to fix.
  ........
    r73439 | benjamin.peterson | 2009-06-15 19:29:31 -0500 (Mon, 15 Jun 2009) | 1 line

    don't mask encoding errors when decoding a string #6289
  ........
    r73496 | vinay.sajip | 2009-06-21 12:37:27 -0500 (Sun, 21 Jun 2009) | 1 line

    Issue #6314: logging.basicConfig() performs extra checks on the "level" argument.
  ........
    r73509 | amaury.forgeotdarc | 2009-06-22 14:33:48 -0500 (Mon, 22 Jun 2009) | 2 lines

    #4490 Fix sample code run by "python -m xml.sax.xmlreader"
  ........
    r73529 | r.david.murray | 2009-06-23 13:02:46 -0500 (Tue, 23 Jun 2009) | 4 lines

    Fix issue 5230 by having pydoc's safeimport check to see if the import
    error was thrown from itself in order to decide if the module can't be
    found.  Thanks to Lucas Prado Melo for collaborating on the fix and tests.
  ........
    r73564 | amaury.forgeotdarc | 2009-06-25 17:29:29 -0500 (Thu, 25 Jun 2009) | 6 lines

    #2016 Fix a crash in function call when the **kwargs dictionary is mutated
    during the function call setup.

    This even gives a slight speedup, probably because tuple allocation
    is faster than PyMem_NEW.
  ........
    r73576 | benjamin.peterson | 2009-06-26 18:37:06 -0500 (Fri, 26 Jun 2009) | 1 line

    document is_declared_global()
  ........
    r73577 | benjamin.peterson | 2009-06-27 09:16:23 -0500 (Sat, 27 Jun 2009) | 1 line

    link to extensive generator docs in the reference manual
  ........
    r73595 | ezio.melotti | 2009-06-27 18:45:39 -0500 (Sat, 27 Jun 2009) | 1 line

    stmt and setup can contain multiple statements, see #5896
  ........
    r73596 | ezio.melotti | 2009-06-27 19:07:45 -0500 (Sat, 27 Jun 2009) | 1 line

    Fixed a wrong apostrophe
  ........
    r73605 | georg.brandl | 2009-06-28 07:10:18 -0500 (Sun, 28 Jun 2009) | 1 line

    Remove stray pychecker directive.
  ........
................
  r73624 | benjamin.peterson | 2009-06-28 12:32:20 -0500 (Sun, 28 Jun 2009) | 1 line

  document BufferedIOBase.raw and TextIOBase.buffer
................
2009-06-28 17:35:48 +00:00
Benjamin Peterson 0289b15820 Merged revisions 73004,73439,73496,73509,73529,73564,73576-73577,73595-73596,73605 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73004 | jeffrey.yasskin | 2009-05-28 22:44:31 -0500 (Thu, 28 May 2009) | 5 lines

  Fix nearly all compilation warnings under Apple gcc-4.0.  Tested with OPT="-g
  -Wall -Wstrict-prototypes -Werror" in both --with-pydebug mode and --without.
  There's still a batch of non-prototype warnings in Xlib.h that I don't know how
  to fix.
........
  r73439 | benjamin.peterson | 2009-06-15 19:29:31 -0500 (Mon, 15 Jun 2009) | 1 line

  don't mask encoding errors when decoding a string #6289
........
  r73496 | vinay.sajip | 2009-06-21 12:37:27 -0500 (Sun, 21 Jun 2009) | 1 line

  Issue #6314: logging.basicConfig() performs extra checks on the "level" argument.
........
  r73509 | amaury.forgeotdarc | 2009-06-22 14:33:48 -0500 (Mon, 22 Jun 2009) | 2 lines

  #4490 Fix sample code run by "python -m xml.sax.xmlreader"
........
  r73529 | r.david.murray | 2009-06-23 13:02:46 -0500 (Tue, 23 Jun 2009) | 4 lines

  Fix issue 5230 by having pydoc's safeimport check to see if the import
  error was thrown from itself in order to decide if the module can't be
  found.  Thanks to Lucas Prado Melo for collaborating on the fix and tests.
........
  r73564 | amaury.forgeotdarc | 2009-06-25 17:29:29 -0500 (Thu, 25 Jun 2009) | 6 lines

  #2016 Fix a crash in function call when the **kwargs dictionary is mutated
  during the function call setup.

  This even gives a slight speedup, probably because tuple allocation
  is faster than PyMem_NEW.
........
  r73576 | benjamin.peterson | 2009-06-26 18:37:06 -0500 (Fri, 26 Jun 2009) | 1 line

  document is_declared_global()
........
  r73577 | benjamin.peterson | 2009-06-27 09:16:23 -0500 (Sat, 27 Jun 2009) | 1 line

  link to extensive generator docs in the reference manual
........
  r73595 | ezio.melotti | 2009-06-27 18:45:39 -0500 (Sat, 27 Jun 2009) | 1 line

  stmt and setup can contain multiple statements, see #5896
........
  r73596 | ezio.melotti | 2009-06-27 19:07:45 -0500 (Sat, 27 Jun 2009) | 1 line

  Fixed a wrong apostrophe
........
  r73605 | georg.brandl | 2009-06-28 07:10:18 -0500 (Sun, 28 Jun 2009) | 1 line

  Remove stray pychecker directive.
........
2009-06-28 17:22:03 +00:00
Benjamin Peterson 87c8d87b91 Merged revisions 73196,73278-73280,73299,73308,73312-73313,73317-73318,73321,73324,73331,73335,73340,73363 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73196 | benjamin.peterson | 2009-06-03 20:40:29 -0500 (Wed, 03 Jun 2009) | 1 line

  use the offical api
........
  r73278 | benjamin.peterson | 2009-06-07 17:33:11 -0500 (Sun, 07 Jun 2009) | 1 line

  inherit from object
........
  r73279 | benjamin.peterson | 2009-06-07 17:35:00 -0500 (Sun, 07 Jun 2009) | 1 line

  always inherit from an appropiate base class
........
  r73280 | benjamin.peterson | 2009-06-07 17:54:35 -0500 (Sun, 07 Jun 2009) | 1 line

  use booleans for flags
........
  r73299 | georg.brandl | 2009-06-08 13:41:36 -0500 (Mon, 08 Jun 2009) | 1 line

  Typo fix.
........
  r73308 | benjamin.peterson | 2009-06-08 17:18:32 -0500 (Mon, 08 Jun 2009) | 1 line

  remove useless assertion
........
  r73312 | benjamin.peterson | 2009-06-08 18:44:13 -0500 (Mon, 08 Jun 2009) | 1 line

  remove error checks already done in set_context()
........
  r73313 | r.david.murray | 2009-06-08 19:44:22 -0500 (Mon, 08 Jun 2009) | 4 lines

  Issue 2947: document how return code handling translates from
  os.popen to subprocess.  Also fixes reference link in the
  os.spawn documentation.
........
  r73317 | benjamin.peterson | 2009-06-09 12:24:26 -0500 (Tue, 09 Jun 2009) | 1 line

  make ast.c depend on the grammar
........
  r73318 | benjamin.peterson | 2009-06-09 12:29:51 -0500 (Tue, 09 Jun 2009) | 1 line

  explain why keyword names are not just NAME
........
  r73321 | benjamin.peterson | 2009-06-09 16:13:43 -0500 (Tue, 09 Jun 2009) | 1 line

  update symbol.py from with statement changes
........
  r73324 | amaury.forgeotdarc | 2009-06-09 17:53:16 -0500 (Tue, 09 Jun 2009) | 2 lines

  Avoid invoking the parser/compiler just to test the presence of a function.
........
  r73331 | benjamin.peterson | 2009-06-10 08:45:31 -0500 (Wed, 10 Jun 2009) | 1 line

  fix spelling
........
  r73335 | raymond.hettinger | 2009-06-10 11:15:40 -0500 (Wed, 10 Jun 2009) | 1 line

  Fix signed/unsigned compiler warning.
........
  r73340 | amaury.forgeotdarc | 2009-06-10 15:30:19 -0500 (Wed, 10 Jun 2009) | 2 lines

  Fix a typo spotted by Nick Coghlan.
........
  r73363 | benjamin.peterson | 2009-06-11 12:51:17 -0500 (Thu, 11 Jun 2009) | 1 line

  use multi-with syntax
........
2009-06-11 22:54:11 +00:00
Georg Brandl 8a73278cd8 #2725: Fix missing local, and handle errors without tracebacks. 2009-04-12 11:34:13 +00:00
Brett Cannon e3944a5e1e The BDFL has retired! Long live the FLUFL (Friendly Language Uncle For Life)! 2009-04-01 05:08:41 +00:00
Benjamin Peterson f5b52246ed ignore the coding cookie in compile(), exec(), and eval() if the source is a string #4626 2009-03-02 23:31:26 +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
Martin v. Löwis a9b54c78d7 Merged revisions 68523 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68523 | martin.v.loewis | 2009-01-11 10:26:54 +0100 (So, 11 Jan 2009) | 2 lines

  Issue #4279: Fix build of parsermodule under Cygwin.
........
2009-01-11 09:30:50 +00:00
Georg Brandl 1f01debe6f Merged revisions 68162,68166,68171,68176,68195-68196,68210,68232 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68162 | ronald.oussoren | 2009-01-02 16:06:00 +0100 (Fri, 02 Jan 2009) | 3 lines

  Fix for issue 4472 is incompatible with Cygwin, this patch
  should fix that.
........
  r68166 | benjamin.peterson | 2009-01-02 19:26:23 +0100 (Fri, 02 Jan 2009) | 1 line

  document PyMemberDef
........
  r68171 | georg.brandl | 2009-01-02 21:25:14 +0100 (Fri, 02 Jan 2009) | 3 lines

  #4811: fix markup glitches (mostly remains of the conversion),
  found by Gabriel Genellina.
........
  r68176 | andrew.kuchling | 2009-01-02 22:00:35 +0100 (Fri, 02 Jan 2009) | 1 line

  Add various items
........
  r68195 | georg.brandl | 2009-01-03 14:45:15 +0100 (Sat, 03 Jan 2009) | 2 lines

  Remove useless string literal.
........
  r68196 | georg.brandl | 2009-01-03 15:29:53 +0100 (Sat, 03 Jan 2009) | 2 lines

  Fix indentation.
........
  r68210 | georg.brandl | 2009-01-03 20:10:12 +0100 (Sat, 03 Jan 2009) | 2 lines

  Set eol-style correctly for mp_distributing.py.
........
  r68232 | georg.brandl | 2009-01-03 22:52:16 +0100 (Sat, 03 Jan 2009) | 2 lines

  Grammar fix.
........
2009-01-03 22:47:39 +00:00
Kristján Valur Jónsson 19288c247a Fix an issue in the tokenizer, where a file is opened by fd, but the underlying PyFileIO object wasn created with the closefd attribute true.
Also fix error handling for close() int _fileio.c .  It was incorrect, looking for a negative refcount, and so errors weren't raised.  This is why this issue wasn't caught.
There is a second reason why it isn't seen:  Class IOBase in io.py has a try:/except: around the close() funtion in the __del__() method.  This also masks these error conditions.

This issue was discovered by removing the _set_invalid_parameter_handler() fiddling, thus enabling the C runtime checks on windows.
2008-12-18 17:15:54 +00:00
Benjamin Peterson e84f03f78c there are only four asdl builtin types in py3k 2008-12-06 18:32:13 +00:00
Benjamin Peterson 9aebc61ad8 Merged revisions 67030-67031 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67030 | benjamin.peterson | 2008-10-26 15:21:13 -0500 (Sun, 26 Oct 2008) | 1 line

  fix __future__ imports when multiple features are given
........
  r67031 | benjamin.peterson | 2008-10-26 15:33:19 -0500 (Sun, 26 Oct 2008) | 1 line

  add forgotten test for r67030
........
2008-10-26 20:58:53 +00:00
Benjamin Peterson 1a6e0d0831 Merged revisions 66974,66977,66984,66989,66992,66994-66996,66998-67000,67007,67015 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66974 | benjamin.peterson | 2008-10-19 08:59:01 -0500 (Sun, 19 Oct 2008) | 1 line

  fix compiler warning
........
  r66977 | benjamin.peterson | 2008-10-19 14:39:16 -0500 (Sun, 19 Oct 2008) | 1 line

  mention -n
........
  r66984 | armin.ronacher | 2008-10-20 16:29:08 -0500 (Mon, 20 Oct 2008) | 3 lines

  Fixed #4062, added import for _ast.__version__ to ast to match the documented behavior.
........
  r66989 | matthias.klose | 2008-10-21 04:12:25 -0500 (Tue, 21 Oct 2008) | 2 lines

  - install versioned manpage
........
  r66992 | benjamin.peterson | 2008-10-21 15:51:13 -0500 (Tue, 21 Oct 2008) | 1 line

  make sure to call iteritems()
........
  r66994 | amaury.forgeotdarc | 2008-10-21 17:01:38 -0500 (Tue, 21 Oct 2008) | 6 lines

  #4157 move two test functions out of platform.py.

  Turn them into unit tests, and correct an obvious typo:
      (("a", "b") ("c", "d") ("e", "f"))
  compiles even with the missing commas, but does not execute very well...
........
  r66995 | benjamin.peterson | 2008-10-21 17:18:29 -0500 (Tue, 21 Oct 2008) | 1 line

  return ArgInfo from inspect.getargvalues #4092
........
  r66996 | benjamin.peterson | 2008-10-21 17:20:31 -0500 (Tue, 21 Oct 2008) | 1 line

  add NEWs note for last change
........
  r66998 | benjamin.peterson | 2008-10-22 15:57:43 -0500 (Wed, 22 Oct 2008) | 1 line

  fix a few typos
........
  r66999 | benjamin.peterson | 2008-10-22 16:05:30 -0500 (Wed, 22 Oct 2008) | 1 line

  and another typo...
........
  r67000 | benjamin.peterson | 2008-10-22 16:16:34 -0500 (Wed, 22 Oct 2008) | 1 line

  fix #4150: pdb's up command didn't work for generators in post-mortem
........
  r67007 | benjamin.peterson | 2008-10-23 16:43:48 -0500 (Thu, 23 Oct 2008) | 1 line

  only nonempty __slots__ don't work
........
  r67015 | georg.brandl | 2008-10-25 02:00:52 -0500 (Sat, 25 Oct 2008) | 2 lines

  Typo fix.
........
2008-10-25 15:49:17 +00:00
Benjamin Peterson 206e3074d3 Merged revisions 66887,66891,66902-66903,66905-66906,66911-66913,66922,66927-66928,66936,66939-66940,66962,66964,66973 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

................
  r66887 | benjamin.peterson | 2008-10-13 16:51:40 -0500 (Mon, 13 Oct 2008) | 1 line

  document how to disable fixers
................
  r66891 | amaury.forgeotdarc | 2008-10-14 16:47:22 -0500 (Tue, 14 Oct 2008) | 5 lines

  #4122: On Windows, Py_UNICODE_ISSPACE cannot be used in an extension module:
  compilation fails with "undefined reference to _Py_ascii_whitespace"

  Will backport to 2.6.
................
  r66902 | skip.montanaro | 2008-10-15 06:49:10 -0500 (Wed, 15 Oct 2008) | 1 line

  easter egg
................
  r66903 | benjamin.peterson | 2008-10-15 15:34:09 -0500 (Wed, 15 Oct 2008) | 1 line

  don't recurse into directories that start with '.'
................
  r66905 | benjamin.peterson | 2008-10-15 16:05:55 -0500 (Wed, 15 Oct 2008) | 1 line

  support the optional line argument for idle
................
  r66906 | benjamin.peterson | 2008-10-15 16:58:46 -0500 (Wed, 15 Oct 2008) | 1 line

  add a much requested newline
................
  r66911 | benjamin.peterson | 2008-10-15 18:10:28 -0500 (Wed, 15 Oct 2008) | 41 lines

  Merged revisions 66805,66841,66860,66884-66886,66893,66907,66910 via svnmerge from
  svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

  ........
    r66805 | benjamin.peterson | 2008-10-04 20:11:02 -0500 (Sat, 04 Oct 2008) | 1 line

    mention what the fixes directory is for
  ........
    r66841 | benjamin.peterson | 2008-10-07 17:48:12 -0500 (Tue, 07 Oct 2008) | 1 line

    use assertFalse and assertTrue
  ........
    r66860 | benjamin.peterson | 2008-10-08 16:05:07 -0500 (Wed, 08 Oct 2008) | 1 line

    instead of abusing the pattern matcher, use start_tree to find a next binding
  ........
    r66884 | benjamin.peterson | 2008-10-13 15:50:30 -0500 (Mon, 13 Oct 2008) | 1 line

    don't print tokens to stdout when -v is given
  ........
    r66885 | benjamin.peterson | 2008-10-13 16:28:57 -0500 (Mon, 13 Oct 2008) | 1 line

    add the -x option to disable fixers
  ........
    r66886 | benjamin.peterson | 2008-10-13 16:33:53 -0500 (Mon, 13 Oct 2008) | 1 line

    cut down on some crud
  ........
    r66893 | benjamin.peterson | 2008-10-14 17:16:54 -0500 (Tue, 14 Oct 2008) | 1 line

    add an optional set literal fixer
  ........
    r66907 | benjamin.peterson | 2008-10-15 16:59:41 -0500 (Wed, 15 Oct 2008) | 1 line

    don't write backup files by default
  ........
    r66910 | benjamin.peterson | 2008-10-15 17:43:10 -0500 (Wed, 15 Oct 2008) | 1 line

    add the -n option; it stops backupfiles from being written
  ........
................
  r66912 | hirokazu.yamamoto | 2008-10-16 01:25:25 -0500 (Thu, 16 Oct 2008) | 2 lines

  removed unused _PyUnicode_FromFileSystemEncodedObject.
  made win32_chdir, win32_wchdir static.
................
  r66913 | benjamin.peterson | 2008-10-16 13:52:14 -0500 (Thu, 16 Oct 2008) | 1 line

  document that deque indexing is O(n) #4123
................
  r66922 | benjamin.peterson | 2008-10-16 14:40:14 -0500 (Thu, 16 Oct 2008) | 1 line

  use new showwarnings signature for idle #3391
................
  r66927 | andrew.kuchling | 2008-10-16 15:15:47 -0500 (Thu, 16 Oct 2008) | 1 line

  Fix wording (2.6.1 backport candidate)
................
  r66928 | georg.brandl | 2008-10-16 15:20:56 -0500 (Thu, 16 Oct 2008) | 2 lines

  Add more TOC to the whatsnew index page.
................
  r66936 | georg.brandl | 2008-10-16 16:20:15 -0500 (Thu, 16 Oct 2008) | 2 lines

  #4131: FF3 doesn't write cookies.txt files.
................
  r66939 | georg.brandl | 2008-10-16 16:36:39 -0500 (Thu, 16 Oct 2008) | 2 lines

  part of #4012: kill off old name "processing".
................
  r66940 | georg.brandl | 2008-10-16 16:38:48 -0500 (Thu, 16 Oct 2008) | 2 lines

  #4083: add "as" to except handler grammar as per PEP 3110.
................
  r66962 | benjamin.peterson | 2008-10-17 15:01:01 -0500 (Fri, 17 Oct 2008) | 1 line

  clarify CALL_FUNCTION #4141
................
  r66964 | georg.brandl | 2008-10-17 16:41:49 -0500 (Fri, 17 Oct 2008) | 2 lines

  Fix duplicate word.
................
  r66973 | armin.ronacher | 2008-10-19 03:27:43 -0500 (Sun, 19 Oct 2008) | 3 lines

  Fixed #4067 by implementing _attributes and _fields for the AST root node.
................
2008-10-19 14:07:49 +00:00
Brett Cannon da78043237 Latin-1 source code was not being properly decoded when passed through
compile(). This was due to left-over special-casing before UTF-8 became the
default source encoding.

Closes issue #3574. Thanks to Victor Stinner for help with the patch.
2008-10-17 03:38:50 +00:00
Amaury Forgeot d'Arc cf8016a8d6 Issues #2384 and #3975: Tracebacks were not correctly printed when the source file
contains a ``coding:`` header: the wrong line was displayed, and the encoding was not respected.

Patch by Victor Stinner.
2008-10-09 23:37:48 +00:00
Benjamin Peterson 75080dab8d Merged revisions 66379 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66379 | benjamin.peterson | 2008-09-10 17:28:00 -0500 (Wed, 10 Sep 2008) | 1 line

  update asdl_c.py from r66377
........
2008-09-10 22:37:34 +00:00
Amaury Forgeot d'Arc 9252287f2c Follow-up of #3773: In PyTokenizer_FindEncoding, remove the call to PyErr_NoMemory when PyMem_MALLOC() fails.
It is not stritly necessary, the function may already return NULL without an exception set,
for example when the file cannot be opened.

Discussed with Benjamin Peterson.
2008-09-04 22:53:19 +00:00
Amaury Forgeot d'Arc 1b933ed50a #3773: Check for errors around the use of PyTokenizer_FindEncoding().
reviewed by Brett Cannon.
2008-09-04 22:34:09 +00:00
Brett Cannon 8a9583ec5c PyTokenizer_FindEncoding() always failed because it set the tokenizer state
with only a file pointer when it called fp_setreadl() which expected a file
path. Changed fp_setreadl() to use either a file path or file descriptor
(derived from the file pointer) to fix the issue.

Closes issue 3594.
Reviewed by Antoine Pitrou and Benjamin Peterson.
2008-09-04 05:04:25 +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
Amaury Forgeot d'Arc 9c74b14fe9 Merged revisions 64114 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r64114 | gregory.p.smith | 2008-06-11 09:41:16 +0200 (mer., 11 juin 2008) | 6 lines

  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-18 00:47:36 +00:00
Benjamin Peterson e68df0fbe5 Merged revisions 64212 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r64212 | benjamin.peterson | 2008-06-12 19:09:47 -0500 (Thu, 12 Jun 2008) | 3 lines

  #1683 prevent forking from interfering in threading storage
  This should prevent some test_multiprocessing failures
........
2008-06-13 00:26:50 +00:00
Martin v. Löwis 1a21451b1d Implement PEP 3121: new module initialization and finalization API. 2008-06-11 05:26:20 +00:00
Georg Brandl e1b5ac6408 Remove meaning of -ttt, but still accept -t option on cmdline for compatibility. 2008-06-04 13:06:58 +00:00
Georg Brandl a26f8ca668 Revert r63934 -- it was mixing two patches. 2008-06-04 13:01:30 +00:00
Georg Brandl f954c4b9fb Remove meaning of -ttt, but still accept -t option on cmdline for compatibility. 2008-06-04 11:41:32 +00:00
Georg Brandl e81f5ef1eb Remove __metaclass__ remains. 2008-05-27 20:34:09 +00:00
Christian Heimes 2c9c7a5f33 Renamed files bytesobject.[ch] and stringobject.[ch]
Fixed Windows build
2008-05-26 13:42:13 +00:00
Christian Heimes 72b710a596 Renamed PyString to PyBytes 2008-05-26 13:28:38 +00:00
Christian Heimes 9c4756ea26 Renamed PyBytes to PyByteArray 2008-05-26 13:22:05 +00:00
Christian Heimes 81ee3efede Merged revisions 62425-62429,62434-62436,62441,62444,62446-62448,62450-62455,62463,62465-62466,62469,62474,62476-62478,62480,62485,62492,62497-62498,62500,62507,62513-62514,62516,62521,62531,62535,62545-62546,62548-62551,62553-62559,62569,62574,62577,62593,62595,62604-62606,62608,62616,62626-62627,62636,62638,62644-62645,62647-62648,62651-62653,62656,62661,62663,62680,62686-62687,62696,62699-62703,62711 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

................
  r62425 | andrew.kuchling | 2008-04-21 03:45:57 +0200 (Mon, 21 Apr 2008) | 1 line

  Comment typo
................
  r62426 | mark.dickinson | 2008-04-21 03:55:50 +0200 (Mon, 21 Apr 2008) | 2 lines

  Silence 'r may be used uninitialized' compiler warning.
................
  r62427 | andrew.kuchling | 2008-04-21 04:08:00 +0200 (Mon, 21 Apr 2008) | 1 line

  Markup fix
................
  r62428 | andrew.kuchling | 2008-04-21 04:08:13 +0200 (Mon, 21 Apr 2008) | 1 line

  Wording changes
................
  r62429 | andrew.kuchling | 2008-04-21 04:14:24 +0200 (Mon, 21 Apr 2008) | 1 line

  Add various items
................
  r62434 | thomas.heller | 2008-04-21 15:46:55 +0200 (Mon, 21 Apr 2008) | 1 line

  Fix typo.
................
  r62435 | david.goodger | 2008-04-21 16:40:22 +0200 (Mon, 21 Apr 2008) | 1 line

  corrections ("reStructuredText" is one word)
................
  r62436 | david.goodger | 2008-04-21 16:43:33 +0200 (Mon, 21 Apr 2008) | 1 line

  capitalization
................
  r62441 | gregory.p.smith | 2008-04-21 19:46:40 +0200 (Mon, 21 Apr 2008) | 2 lines

  explicitly flush after the ... since there wasn't a newline
................
  r62444 | jeroen.ruigrok | 2008-04-21 22:15:39 +0200 (Mon, 21 Apr 2008) | 2 lines

  Windows x64 also falls under VER_PLATFORM_WIN32_NT.
................
  r62446 | gregory.p.smith | 2008-04-21 23:31:08 +0200 (Mon, 21 Apr 2008) | 3 lines

  If sys.stdin is not a tty, fall back to default_getpass after printing
  a warning instead of failing with a termios.error.
................
  r62447 | mark.dickinson | 2008-04-22 00:32:24 +0200 (Tue, 22 Apr 2008) | 8 lines

  test_math and test_cmath are failing on the FreeBSD 6.2 trunk buildbot,
  apparently because tanh(-0.) loses the sign of zero on that platform.
  If true, this is a bug in FreeBSD.

  Added a configure test to verify this.  I still need to figure out
  how best to deal with this failure.
................
  r62448 | amaury.forgeotdarc | 2008-04-22 00:35:30 +0200 (Tue, 22 Apr 2008) | 7 lines

  Issue 2665: On Windows, sys.stderr does not contain a valid file when running without a console.
  It seems to work, but will fail at the first flush.

  This causes IDLE to crash when too many warnings are printed.

  Will backport.
................
  r62450 | benjamin.peterson | 2008-04-22 00:57:00 +0200 (Tue, 22 Apr 2008) | 2 lines

  Fix Sphinx warnings
................
  r62451 | mark.dickinson | 2008-04-22 02:54:27 +0200 (Tue, 22 Apr 2008) | 3 lines

  Make configure test for tanh(-0.) == -0. committed in r62447 actually
  work.  (The test wasn't properly linked with libm.  Sigh.)
................
  r62452 | benjamin.peterson | 2008-04-22 04:16:03 +0200 (Tue, 22 Apr 2008) | 2 lines

  Various io doc updates
................
  r62453 | neal.norwitz | 2008-04-22 07:07:47 +0200 (Tue, 22 Apr 2008) | 1 line

  Add Thomas Lee
................
  r62454 | gregory.p.smith | 2008-04-22 10:08:41 +0200 (Tue, 22 Apr 2008) | 8 lines

  Major improvements:
  * Default to using /dev/tty for the password prompt and input before
    falling back to sys.stdin and sys.stderr.
  * Use sys.stderr instead of sys.stdout.
  * print the 'password may be echoed' warning to stream used to display
    the prompt rather than always sys.stderr.
  * warn() with GetPassWarning when input may be echoed.
................
  r62455 | gregory.p.smith | 2008-04-22 10:11:33 +0200 (Tue, 22 Apr 2008) | 2 lines

  update the getpass entry
................
  r62463 | amaury.forgeotdarc | 2008-04-22 23:14:41 +0200 (Tue, 22 Apr 2008) | 5 lines

  Issue #2670: urllib2.build_opener() failed when two handlers
  derive the same default base class.

  Will backport.
................
  r62465 | skip.montanaro | 2008-04-23 00:45:09 +0200 (Wed, 23 Apr 2008) | 3 lines

  Factor in documentation changes from issue 1753732.
................
  r62466 | gregory.p.smith | 2008-04-23 03:06:42 +0200 (Wed, 23 Apr 2008) | 2 lines

  syntax fixup
................
  r62469 | benjamin.peterson | 2008-04-23 22:38:06 +0200 (Wed, 23 Apr 2008) | 2 lines

  #2673 Fix example typo in optparse docs
................
  r62474 | martin.v.loewis | 2008-04-24 11:50:50 +0200 (Thu, 24 Apr 2008) | 2 lines

  Add Guilherme Polo.
................
  r62476 | martin.v.loewis | 2008-04-24 15:16:36 +0200 (Thu, 24 Apr 2008) | 3 lines

  Remove Py_Refcnt, Py_Type, Py_Size, as they were added only
  for backwards compatibility, yet 2.5 did not have them at all.
................
  r62477 | martin.v.loewis | 2008-04-24 15:17:24 +0200 (Thu, 24 Apr 2008) | 2 lines

  Fix typo.
................
  r62478 | martin.v.loewis | 2008-04-24 15:18:03 +0200 (Thu, 24 Apr 2008) | 2 lines

  Add Jesus Cea.
................
  r62480 | amaury.forgeotdarc | 2008-04-24 20:07:05 +0200 (Thu, 24 Apr 2008) | 4 lines

  Issue2681: the literal 0o8 was wrongly accepted, and evaluated as float(0.0).
  This happened only when 8 is the first digit.
  Credits go to Lukas Meuser.
................
  r62485 | amaury.forgeotdarc | 2008-04-24 22:10:26 +0200 (Thu, 24 Apr 2008) | 5 lines

  Disable gc when running test_trace, or we may record the __del__ of collected objects.

  See http://mail.python.org/pipermail/python-checkins/2008-April/068633.html
  the extra events perfectly match several calls to socket._fileobject.__del__()
................
  r62492 | neal.norwitz | 2008-04-25 05:40:17 +0200 (Fri, 25 Apr 2008) | 1 line

  Fix typo (now -> no)
................
  r62497 | armin.rigo | 2008-04-25 11:35:18 +0200 (Fri, 25 Apr 2008) | 2 lines

  A new crasher.
................
  r62498 | thomas.heller | 2008-04-25 17:44:16 +0200 (Fri, 25 Apr 2008) | 1 line

  Add from_buffer and from_buffer_copy class methods to ctypes types.
................
  r62500 | mark.dickinson | 2008-04-25 18:59:09 +0200 (Fri, 25 Apr 2008) | 3 lines

  Issue 2635: fix bug in the fix_sentence_endings option to textwrap.fill.
................
  r62507 | benjamin.peterson | 2008-04-25 23:43:56 +0200 (Fri, 25 Apr 2008) | 2 lines

  Allow test_import to work when it is invoked directly
................
  r62513 | georg.brandl | 2008-04-26 20:31:07 +0200 (Sat, 26 Apr 2008) | 2 lines

  #2691: document PyLong (s)size_t APIs, patch by Alexander Belopolsky.
................
  r62514 | georg.brandl | 2008-04-26 20:32:17 +0200 (Sat, 26 Apr 2008) | 2 lines

  Add missing return type to dealloc.
................
  r62516 | alexandre.vassalotti | 2008-04-27 02:52:24 +0200 (Sun, 27 Apr 2008) | 2 lines

  Fixed URL of PEP 205 in weakref's module docstring.
................
  r62521 | georg.brandl | 2008-04-27 11:39:59 +0200 (Sun, 27 Apr 2008) | 2 lines

  #2677: add note that not all functions may accept keyword args.
................
  r62531 | georg.brandl | 2008-04-27 19:38:55 +0200 (Sun, 27 Apr 2008) | 2 lines

  Use correct XHTML tags.
................
  r62535 | benjamin.peterson | 2008-04-27 20:14:39 +0200 (Sun, 27 Apr 2008) | 2 lines

  #2700 Document PyNumber_ToBase
................
  r62545 | skip.montanaro | 2008-04-27 22:53:57 +0200 (Sun, 27 Apr 2008) | 1 line

  minor wording changes, rewrap a few lines
................
  r62546 | kurt.kaiser | 2008-04-27 23:07:41 +0200 (Sun, 27 Apr 2008) | 7 lines

  Home / Control-A toggles between left margin and end of leading white
  space.  Patch 1196903 Jeff Shute.

  M    idlelib/PyShell.py
  M    idlelib/EditorWindow.py
  M    idlelib/NEWS.txt
................
  r62548 | kurt.kaiser | 2008-04-27 23:38:05 +0200 (Sun, 27 Apr 2008) | 2 lines

  Improved AutoCompleteWindow logic.  Patch 2062 Tal Einat.
................
  r62549 | kurt.kaiser | 2008-04-27 23:52:19 +0200 (Sun, 27 Apr 2008) | 4 lines

  Autocompletion of filenames now support alternate separators, e.g. the
  '/' char on Windows.  Patch 2061 Tal Einat.
................
  r62550 | skip.montanaro | 2008-04-28 00:49:56 +0200 (Mon, 28 Apr 2008) | 6 lines

  A few small changes:
  * The only exception we should catch when trying to import cStringIO is an
    ImportError.
  * Delete the function signatures embedded in the mk*temp docstrings.
  * The tempdir global variable was initialized twice.
................
  r62551 | skip.montanaro | 2008-04-28 00:52:02 +0200 (Mon, 28 Apr 2008) | 4 lines

  Wrap some long paragraphs and include the default values for optional
  function parameters.
................
  r62553 | skip.montanaro | 2008-04-28 04:57:23 +0200 (Mon, 28 Apr 2008) | 7 lines

  Minor cleanups:
  * Avoid creating unused local variables where we can.  Where we can't prefix
    the unused variables with '_'.
  * Avoid shadowing builtins where it won't change the external interface of a
    function.
  * Use None as default path arg to readmodule and readmodule_ex.
................
  r62554 | skip.montanaro | 2008-04-28 04:59:45 +0200 (Mon, 28 Apr 2008) | 6 lines

  Correct documentation to match implementation: "Class" instead of
  "class_descriptor", "Function" instead of "function_descriptor".  Note
  default path value for readmodule*.  Wrap some long paragraphs.  Don't
  mention 'inpackage' which isn't part of the public API.
................
  r62555 | brett.cannon | 2008-04-28 05:23:50 +0200 (Mon, 28 Apr 2008) | 5 lines

  Fix a bug introduced by the warnings rewrite where tracebacks were being
  improperly indented.

  Closes issue #2699.
................
  r62556 | skip.montanaro | 2008-04-28 05:25:37 +0200 (Mon, 28 Apr 2008) | 2 lines

  Wrap some long lines.
................
  r62557 | skip.montanaro | 2008-04-28 05:27:53 +0200 (Mon, 28 Apr 2008) | 6 lines

  Get rid of _test(), _main(), _debug() and _check().  Tests are no longer
  needed (better set available in Lib/test/test_robotparser.py).  Clean up a
  few PEP 8 nits (compound statements on a single line, whitespace around
  operators).
................
  r62558 | brett.cannon | 2008-04-28 06:50:06 +0200 (Mon, 28 Apr 2008) | 3 lines

  Rename the test_traceback_print() function to traceback_print() to prevent
  test_capi from automatically calling the function.
................
  r62559 | georg.brandl | 2008-04-28 07:16:30 +0200 (Mon, 28 Apr 2008) | 2 lines

  Fix markup.
................
  r62569 | amaury.forgeotdarc | 2008-04-28 23:07:06 +0200 (Mon, 28 Apr 2008) | 5 lines

  test_sundry performs minimal tests (a simple import...) on modules that are not tested otherwise.

  Some of them now have tests and can be removed.
  Only 70 to go...
................
  r62574 | andrew.kuchling | 2008-04-29 04:03:54 +0200 (Tue, 29 Apr 2008) | 1 line

  Strip down SSL docs; I'm not managing to get test programs working, so I'll just give a minimal description
................
  r62577 | martin.v.loewis | 2008-04-29 08:10:53 +0200 (Tue, 29 Apr 2008) | 2 lines

  Add Rodrigo and Heiko.
................
  r62593 | nick.coghlan | 2008-04-30 16:23:36 +0200 (Wed, 30 Apr 2008) | 1 line

  Update command line usage documentation to reflect 2.6 changes (also includes some minor cleanups). Addresses TODO list issue 2258
................
  r62595 | andrew.kuchling | 2008-04-30 18:19:55 +0200 (Wed, 30 Apr 2008) | 1 line

  Typo fix
................
  r62604 | benjamin.peterson | 2008-04-30 23:03:58 +0200 (Wed, 30 Apr 2008) | 2 lines

  make test_support's captured_output a bit more robust when exceptions happen
................
  r62605 | georg.brandl | 2008-04-30 23:08:42 +0200 (Wed, 30 Apr 2008) | 2 lines

  #1748: use functools.wraps instead of rolling own metadata update.
................
  r62606 | benjamin.peterson | 2008-04-30 23:25:55 +0200 (Wed, 30 Apr 2008) | 2 lines

  Remove some from __future__ import with_statements
................
  r62608 | benjamin.peterson | 2008-05-01 00:03:36 +0200 (Thu, 01 May 2008) | 2 lines

  Fix typo in whatsnew
................
  r62616 | georg.brandl | 2008-05-01 20:24:32 +0200 (Thu, 01 May 2008) | 2 lines

  Fix synopsis.
................
  r62626 | brett.cannon | 2008-05-02 04:25:09 +0200 (Fri, 02 May 2008) | 6 lines

  Fix a backwards-compatibility mistake where a new optional argument for
  warnings.showwarning() was being used. This broke pre-existing replacements for
  the function since they didn't support the extra argument.

  Closes issue 2705.
................
  r62627 | gregory.p.smith | 2008-05-02 09:26:52 +0200 (Fri, 02 May 2008) | 20 lines

  This should fix issue2632.  A long description of the two competing
  problems is in the bug report (one old, one recently introduced trying
  to fix the old one).  In short:

  buffer data during socket._fileobject.read() and readlines() within a
  cStringIO object instead of a [] of str()s returned from the recv()
  call.

  This prevents excessive memory use due to the size parameter being
  passed to recv() being grossly larger than the actual size of the data
  returned *and* prevents excessive cpu usage due to looping in python
  calling recv() with a very tiny size value if min() is used as the
  previous memory-use bug "fix" did.

  It also documents what the socket._fileobject._rbufsize member is
  actually used for.

  This is a candidate for back porting to 2.5.
................
  r62636 | mark.hammond | 2008-05-02 14:48:15 +0200 (Fri, 02 May 2008) | 2 lines

  #2581: Vista UAC/elevation support for bdist_wininst
................
  r62638 | facundo.batista | 2008-05-02 19:39:00 +0200 (Fri, 02 May 2008) | 3 lines


  Fixed some test structures. Thanks Mark Dickinson.
................
  r62644 | ronald.oussoren | 2008-05-02 21:45:11 +0200 (Fri, 02 May 2008) | 7 lines

  Fix for issue #2573: Can't change the framework name on OS X builds

  This introduces a new configure option: --with-framework-name=NAME
  (defaulting to 'Python'). This allows you to install several copies
  of the Python framework with different names (such as a normal build
  and a debug build).
................
  r62645 | ronald.oussoren | 2008-05-02 21:58:56 +0200 (Fri, 02 May 2008) | 2 lines

  Finish fix for issue2573, previous patch was incomplete.
................
  r62647 | martin.v.loewis | 2008-05-02 23:30:20 +0200 (Fri, 02 May 2008) | 13 lines

  Merged revisions 62263-62646 via svnmerge from
  svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

  ........
    r62470 | david.wolever | 2008-04-24 02:11:07 +0200 (Do, 24 Apr 2008) | 3 lines

    Fixed up and applied the patch for #2431 -- speeding up 2to3 with a lookup table.
  ........
    r62646 | martin.v.loewis | 2008-05-02 23:29:27 +0200 (Fr, 02 Mai 2008) | 2 lines

    Fix whitespace.
  ........
................
  r62648 | ronald.oussoren | 2008-05-02 23:42:35 +0200 (Fri, 02 May 2008) | 4 lines

  Fix for #1905: PythonLauncher not working correctly on OSX 10.5/Leopard

  This fixes both Python Launchar and the terminalcommand module.
................
  r62651 | ronald.oussoren | 2008-05-02 23:54:56 +0200 (Fri, 02 May 2008) | 2 lines

  Fix for issue #2520 (cannot import macerrors)
................
  r62652 | benjamin.peterson | 2008-05-03 00:12:58 +0200 (Sat, 03 May 2008) | 2 lines

  capitalization nit for reStructuredText
................
  r62653 | brett.cannon | 2008-05-03 03:02:41 +0200 (Sat, 03 May 2008) | 2 lines

  Fix some indentation errors.
................
  r62656 | brett.cannon | 2008-05-03 05:19:39 +0200 (Sat, 03 May 2008) | 6 lines

  Fix the C implementation of 'warnings' to infer the filename of the module that
  raised an exception properly when __file__ is not set, __name__ == '__main__',
  and sys.argv[0] is a false value.

  Closes issue2743.
................
  r62661 | amaury.forgeotdarc | 2008-05-03 14:21:13 +0200 (Sat, 03 May 2008) | 8 lines

  In test_io, StatefulIncrementalDecoderTest was not part of the test suite.
  And of course, the test failed:
  a bytearray was used without reason in io.TextIOWrapper.tell().

  The difference is that iterating over bytes (i.e. str in python2.6) returns 1-char bytes,
  whereas bytearrays yield integers.
  This code should still work with python3.0
................
  r62663 | benjamin.peterson | 2008-05-03 17:56:42 +0200 (Sat, 03 May 2008) | 2 lines

  The compiling struct is now passed around to all AST helpers (see issue 2720)
................
  r62680 | benjamin.peterson | 2008-05-03 23:35:18 +0200 (Sat, 03 May 2008) | 2 lines

  Moved testing of builtin types out of test_builtin and into type specific modules
................
  r62686 | mark.dickinson | 2008-05-04 04:25:46 +0200 (Sun, 04 May 2008) | 4 lines

  Make sure that Context traps and flags dictionaries have values 0 and 1
  (as documented) rather than True and False.
................
  r62687 | benjamin.peterson | 2008-05-04 05:05:49 +0200 (Sun, 04 May 2008) | 2 lines

  Fix typo in whatsnew
................
  r62696 | georg.brandl | 2008-05-04 11:15:04 +0200 (Sun, 04 May 2008) | 2 lines

  #2752: wrong meaning of '' for socket host.
................
  r62699 | christian.heimes | 2008-05-04 13:50:53 +0200 (Sun, 04 May 2008) | 1 line

  Added note that Python requires at least Win2k SP4
................
  r62700 | gerhard.haering | 2008-05-04 14:59:57 +0200 (Sun, 04 May 2008) | 3 lines

  SQLite requires 64-bit integers in order to build. So the whole HAVE_LONG_LONG
  #ifdefing was useless.
................
  r62701 | gerhard.haering | 2008-05-04 15:15:12 +0200 (Sun, 04 May 2008) | 3 lines

  Applied sqliterow-richcmp.diff patch from Thomas Heller in Issue2152. The
  sqlite3.Row type is now correctly hashable.
................
  r62702 | gerhard.haering | 2008-05-04 15:42:44 +0200 (Sun, 04 May 2008) | 5 lines

  Implemented feature request 2157: Converter names are cut off at '('
  characters. This avoids the common case of something like 'NUMBER(10)' not
  being parsed as 'NUMBER', like expected. Also corrected the docs about
  converter names being case-sensitive. They aren't any longer.
................
  r62703 | georg.brandl | 2008-05-04 17:45:05 +0200 (Sun, 04 May 2008) | 2 lines

  #2757: Remove spare newline.
................
  r62711 | benjamin.peterson | 2008-05-04 21:10:02 +0200 (Sun, 04 May 2008) | 2 lines

  Fix typo in bugs.rst
................
2008-05-04 22:42:01 +00:00
Neal Norwitz 32dde22186 Merged revisions 61440-61441,61443,61445-61448,61451-61452,61455-61457,61459-61464,61466-61467,61469-61470,61476-61477,61479,61481-61482,61485,61487,61490,61493-61494,61497,61499-61502,61505-61506,61508,61511-61514,61519,61521-61522,61530-61531,61533-61537,61541-61555,61557-61558,61561-61562,61566-61569,61572-61574,61578-61579,61583-61584,61588-61589,61592,61594,61598-61601,61603-61604,61607-61612,61617,61619-61620,61624,61626,61628-61630,61635-61638,61640-61643,61645,61648,61653-61655,61659-61662,61664,61666,61668-61671,61673,61675,61679-61680,61682,61685-61686,61689-61695,61697-61699,61701-61703,61706,61710,61713,61717,61723,61726-61730,61736,61738,61740,61742,61745-61752,61754-61760,61762-61764,61768,61770-61772,61774-61775,61784-61787,61789-61792,61794-61795,61797-61806,61808-61809,61811-61812,61814-61819,61824,61826-61833,61835-61840,61843-61845,61848,61850,61854-61862,61865-61866,61868,61872-61873,61876-61877,61883-61888,61890-61891,61893-61899,61901-61903,61905-61912,61914,61917,61920-61921,61927,61930,61932-61934,61939,61941-61942,61944-61951,61955,61960-61963,61980,61982-61983,61991,61994-61996,62001-62003,62008-62010,62016-62017,62022,62024,62027,62031-62034,62041,62045-62046,62055-62058,62060-62066,62068-62074,62076-62079,62081-62083,62086-62089,62092-62094,62098,62101,62104,62106-62109,62115-62122,62124-62125,62128,62130,62132,62134-62135,62137,62139-62140,62144,62146,62151,62155,62157,62162-62166,62171-62172,62175-62176,62178,62181-62186,62188-62192,62196,62200-62203,62206,62211-62213,62215-62218,62222,62224-62226,62228,62232,62236,62240-62245,62248,62250-62254,62256-62258,62262,62264-62265,62267-62270,62272-62276,62280-62288,62291-62292,62299-62301,62307,62312,62316-62318,62322-62331,62333-62337,62339-62344,62346-62348 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r62323 | brett.cannon | 2008-04-13 10:09:43 -0700 (Sun, 13 Apr 2008) | 3 lines

  Add an explicit check for output in a test to try to diagnose a failure on
  Windows.
........
  r62324 | brett.cannon | 2008-04-13 10:41:31 -0700 (Sun, 13 Apr 2008) | 3 lines

  Fix spliting on colons on Windows machines with a file path by limiting the
  number of splits.
........
  r62329 | benjamin.peterson | 2008-04-13 13:35:56 -0700 (Sun, 13 Apr 2008) | 2 lines

  #2627 Let it be known what pgen generates
........
  r62330 | benjamin.peterson | 2008-04-13 13:40:03 -0700 (Sun, 13 Apr 2008) | 2 lines

  Added an ignore file for Bazaar #2510
........
  r62331 | georg.brandl | 2008-04-13 13:50:29 -0700 (Sun, 13 Apr 2008) | 2 lines

  Improve -X error message.
........
  r62334 | andrew.kuchling | 2008-04-13 15:39:12 -0700 (Sun, 13 Apr 2008) | 1 line

  Add example
........
  r62340 | amaury.forgeotdarc | 2008-04-14 12:55:40 -0700 (Mon, 14 Apr 2008) | 2 lines

  Update project files for all Windows supported compilers
........
  r62341 | amaury.forgeotdarc | 2008-04-14 13:07:48 -0700 (Mon, 14 Apr 2008) | 6 lines

  Correct a refleak found by "regrtest.py -R:: test_structmembers"

  Some other minor updates in _warnings.c:
  - make a function static
  - rename a shadowing local variable
........
  r62347 | andrew.kuchling | 2008-04-14 19:24:15 -0700 (Mon, 14 Apr 2008) | 1 line

  Various items; begin writing the SSL section
........
  r62348 | neal.norwitz | 2008-04-14 20:46:21 -0700 (Mon, 14 Apr 2008) | 1 line

  Prevent namespace pollution, add static for internal functions
........
2008-04-15 06:43:13 +00:00
Neal Norwitz ee9b10a987 Merged revisions 61440-61441,61443,61445-61448,61451-61452,61455-61457,61459-61464,61466-61467,61469-61470,61476-61477,61479,61481-61482,61485,61487,61490,61493-61494,61497,61499-61502,61505-61506,61508,61511-61514,61519,61521-61522,61530-61531,61533-61537,61541-61555,61557-61558,61561-61562,61566-61569,61572-61574,61578-61579,61583-61584,61588-61589,61592,61594,61598-61601,61603-61604,61607-61612,61617,61619-61620,61624,61626,61628-61630,61635-61638,61640-61643,61645,61648,61653-61655,61659-61662,61664,61666,61668-61671,61673,61675,61679-61680,61682,61685-61686,61689-61695,61697-61699,61701-61703,61706,61710,61713,61717,61723,61726-61730,61736,61738,61740,61742,61745-61752,61754-61760,61762-61764,61768,61770-61772,61774-61775,61784-61787,61789-61792,61794-61795,61797-61806,61808-61809,61811-61812,61814-61819,61824,61826-61833,61835-61840,61843-61845,61848,61850,61854-61862,61865-61866,61868,61872-61873,61876-61877,61883-61888,61890-61891,61893-61899,61901-61903,61905-61912,61914,61917,61920-61921,61927,61930,61932-61934,61939,61941-61942,61944-61951,61955,61960-61963,61980,61982-61983,61991,61994-61996,62001-62003,62008-62010,62016-62017,62022,62024,62027,62031-62034,62041,62045-62046,62048,62050-62051,62055-62066,62068-62074,62076-62078 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r62048 | georg.brandl | 2008-03-29 23:53:55 -0700 (Sat, 29 Mar 2008) | 2 lines

  Adapt test_ast to the new ExceptHandler type.
........
  r62050 | georg.brandl | 2008-03-30 00:09:22 -0700 (Sun, 30 Mar 2008) | 2 lines

  Convert test_ast to unittest and add a test for r62049.
........
  r62051 | georg.brandl | 2008-03-30 12:00:49 -0700 (Sun, 30 Mar 2008) | 2 lines

  Make _fields attr for no fields consistent with _attributes attr.
........
  r62059 | georg.brandl | 2008-03-30 13:20:39 -0700 (Sun, 30 Mar 2008) | 2 lines

  Make AST nodes pickleable.
........
2008-03-31 05:29:39 +00:00
Neal Norwitz ad74aa8dc0 Merged revisions 62047 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r62047 | georg.brandl | 2008-03-29 23:40:17 -0700 (Sat, 29 Mar 2008) | 2 lines

  Patch #2511: Give the "excepthandler" AST item proper attributes by making it a Sum.
........
2008-03-31 05:14:30 +00:00