summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Fix:Michael W. Hudson2005-04-181-1/+1
| | | | | | | | [ 1176893 ] Readline segfault by unsilly-ing PyGILState_Release(). Backport candidate.
* Make a handy macro, Py_DEFAULT_RECURSION_LIMIT to allow to defineHye-Shik Chang2005-04-041-2/+5
| | | | | a default value of recursion limit from build systems. 1000 levels are still too high for some 64bit systems.
* I suppose a bug report or even a fix would be a better response, butMichael W. Hudson2005-03-301-1/+2
| | | | | commit a yelp about a noted flaw the error messages for METH_KEYWORDS functions under some circumstances.
* Move exception finalisation later in the shutdown process - thisAnthony Baxter2005-03-291-7/+8
| | | | fixes the crash seen in bug #1165761
* Add 0 to _POSIX_SEMAPHORES. Will backport to 2.4.Martin v. Löwis2005-03-281-1/+3
|
* Patch #1163249 - Correctly handle _POSIX_SEMAPHORES == -1 to mean noAnthony Baxter2005-03-161-0/+4
| | | | support for posix semaphores.
* Add two new functions, any() and all().Raymond Hettinger2005-03-111-0/+65
|
* Allow classes to be defined with empty parentheses. This means thatBrett Cannon2005-03-052-8/+10
| | | | ``class C(): pass`` is no longer a syntax error.
* Patch #1115086: support PY_LONGLONG in structmember.Martin v. Löwis2005-03-031-0/+32
|
* Revert previous checkin on getargs 'L' code. Try to convert allMartin v. Löwis2005-03-031-1/+0
| | | | | numbers in PyLong_AsLongLong, and update test suite accordingly. Backported to 2.4.
* Patch #802188: better parser error message for non-EOL following line cont.Martin v. Löwis2005-03-031-0/+3
|
* Clear internal call error in 'L' format. Fixes #723201.Martin v. Löwis2005-03-031-0/+1
| | | | Backported to 2.4.
* Silence a gcc warning about putting in parentheses around && expressions mixedBrett Cannon2005-03-031-5/+6
| | | | with || expressions. Also clarifies intend of 'if' conditional.
* Preserve sign of -0.0 when result is run through marshal.Raymond Hettinger2005-02-231-2/+4
|
* Document how the pattern recognizer keeps all of its references in bounds.Raymond Hettinger2005-02-211-0/+8
| | | | | | Add a test in case the underlying assumptions ever change (i.e. the compiler starts generating code blocks that are not punctuated by RETURN_VALUE).
* Teach the peepholer to fold unary operations on constants.Raymond Hettinger2005-02-201-0/+62
| | | | | Afterwards, -0.5 loads in a single step and no longer requires a runtime UNARY_NEGATIVE operation.
* Remove the set conversion which didn't work with: [] in (0,)Raymond Hettinger2005-02-101-53/+1
|
* Have set conversion replace existing constant if not used elsewhere.Raymond Hettinger2005-02-091-1/+7
|
* Close the discussion in SF bug 1069160.Guido van Rossum2005-02-081-1/+3
|
* Adopt Skip's idea to optimize lists of constants in the contextRaymond Hettinger2005-02-071-7/+13
| | | | of a "in" or "not in" test.
* Transform "x in (1,2,3)" to "x in frozenset([1,2,3])".Raymond Hettinger2005-02-061-1/+48
| | | | | Inspired by Skip's idea to recognize the throw-away nature of sequences in this context and to transform their type to one with better performance.
* Fix bug that allowed future statements virtually anywhere in a module.Jeremy Hylton2005-02-041-2/+1
| | | | | | | If we exit via the break here, we need to set ff_last_lineno or FUTURE_POSSIBLE() will remain true. The bug affected statements containing a variety of expressions, but not all expressions. It has been present since Python 2.2.
* Partially revert #1074011; don't try to fflush stdin.Martin v. Löwis2005-01-271-1/+10
| | | | Backported to 2.3 and 2.4.
* Do not fold a constant if a large sequence will result.Raymond Hettinger2005-01-261-5/+15
| | | | Saves space in the presence of code like: (None,)*10000
* happy new year! (on the trunk)Anthony Baxter2005-01-251-1/+1
|
* Flush std{in,out,err} before closing it. Fixes #1074011.Martin v. Löwis2005-01-231-3/+10
| | | | Will backport to 2.4 and 2.3.
* Change the name of the macro used by --with-tsc builds to the lessMichael W. Hudson2005-01-181-29/+32
| | | | inscrutable READ_TIMESTAMP.
* -X died some time ago; remove a tiny bit of associated cruft.Michael W. Hudson2005-01-181-4/+0
|
* make thread stack size compile-time tunable on OS/2Andrew MacIntyre2005-01-171-1/+5
|
* remove unused variableFred Drake2005-01-121-1/+0
|
* SF 1098985: set objects cannot be marshalledRaymond Hettinger2005-01-111-1/+66
|
* comment tweakSkip Montanaro2005-01-081-1/+1
|
* Re-running python with/without the -Qnew flag uses incorrectly optimizedArmin Rigo2005-01-071-6/+3
| | | | | bytecodes from the previously saved .pyc files. Fixed by disabling the static optimization of BINARY_DIVIDE between two constants.
* Teach the peephole optimizer to fold simple constant expressions.Raymond Hettinger2005-01-021-1/+118
|
* Any call to marshal.dumps() with the new optional argument 'version' justArmin Rigo2004-12-201-1/+1
| | | | | immediately segfaults, due to a typo! This was obviously never tested... Added a test for it, and also fixed the documentation.
* Put parentheses around the assignment in the 'while' loop conditionalBrett Cannon2004-12-071-1/+1
| | | | expression in min_max() to shut gcc up.
* SF patch #1077353: add key= argument to min and maxRaymond Hettinger2004-12-031-39/+71
| | | | (First draft of patch contributed by Steven Bethard.)
* Hye-Shik Chang's fix for Bug 875692.Kurt B. Kaiser2004-11-231-0/+6
| | | | | | | | | Improve signal handling, especially when using threads, by forcing an early re-execution of PyEval_EvalFrame() "periodic" code when things_to_do is not cleared by Py_MakePendingCalls(). M Misc/NEWS M Python/ceval.c
* SF bug 1061968: threads: segfault or Py_FatalError at exitTim Peters2004-11-081-13/+12
| | | | | | | | | | | | | | | | | PyGILState_Ensure(): The fix in 2.4a3 for bug 1010677 reintroduced thread shutdown race bug 225673. Repaired by (once again) ensuring the GIL is held whenever deleting a thread state. Alas, there's no useful test case for this shy bug. Four years ago, only Guido could provoke it, on his box, and today only Armin can provoke it on his box. I've never been able to provoke it (but not for lack of trying!). This is a critical fix for 2.3.5 too, since the fix for 1010677 got backported there already and so also reintroduced 225673. I don't intend to backport this fix. For whoever (if anyone) does, there are other thread fixes in 2.4 that need backporting too, and I bet they need to happen first for this patch to apply cleanly.
* SF patch 1025636: Check for NULL returns in compile.c:com_import_stmtJeremy Hylton2004-11-071-4/+14
| | | | There is no test for this change, because there is no way to provoke memory errors on demand. Test suite passes, though.
* SF patch #1035255: Remove CoreServices / CoreFoundation dependencies in coreRaymond Hettinger2004-11-051-158/+67
| | | | | | | | | | | | | (Contributed by Bob Ippolito.) This patch trims down the Python core on Darwin by making it independent of CoreFoundation and CoreServices. It does this by: Changed linker flags in configure/configure.in Removed the unused PyMac_GetAppletScriptFile Moved the implementation of PyMac_StrError to the MacOS module Moved the implementation of PyMac_GetFullPathname to the Carbon.File module
* Maintain peepholer's cumlc invariant by updating the running totalRaymond Hettinger2004-11-021-0/+4
| | | | | | everytime a LOAD_CONSTANT is encountered, created, or overwritten. Added two tests to cover cases affected by the patch.
* Simplify and future proof NOP counting in the peepholer.Raymond Hettinger2004-11-011-13/+6
| | | | No longer assumes that the input is NOP free.
* Fixed a comment and added another one.Armin Rigo2004-10-301-1/+4
|
* Adopt some peepholer suggestions from Armin Rigo:Raymond Hettinger2004-10-301-15/+20
| | | | | | | | * Use simpler, faster two pass algorithm for markblocks(). * Free the blocks variable if not NULL and exiting without change. * Verify that the rest of the compiler has not set an exception. * Make the test for tuple of constants less restrictive. * Embellish the comment for chained conditional jumps.
* SF bug #1053819: Segfault in tuple_of_constantsRaymond Hettinger2004-10-261-1/+9
| | | | | | | Peepholer could be fooled into misidentifying a tuple_of_constants. Added code to count consecutive occurrences of LOAD_CONST. Use the count to weed out the misidentified cases. Added a unittest.
* SF bug #1048870: call arg of lambda not updatingRaymond Hettinger2004-10-241-0/+2
|
* Patch #975056 - fixes for restartable signals on *BSD. In addition,Anthony Baxter2004-10-131-24/+19
| | | | a few remaining calls to signal() were converted to PyOS_setsig().
* SF patch 1044089: New C API function PyEval_ThreadsInitialized(), by NickTim Peters2004-10-112-4/+6
| | | | | Coghlan, for determining whether PyEval_InitThreads() has been called. Also purged the undocumented+unused _PyThread_Started int.
* Revert rev 2.35. It was based on erroneous reasoning -- the currentTim Peters2004-10-101-15/+8
| | | | | | | thread's id can't get duplicated, because (of course!) the current thread is still running. The code should work either way, but reverting the gratuitous change should make backporting easier, and gets the bad reasoning out of 2.35's new comments.