Commit Graph

2913 Commits

Author SHA1 Message Date
R. David Murray 3310a10a68 Update issue 6070 patch to match the patch that was actually tested
on Windows.
2009-07-07 09:54:16 +00:00
R. David Murray 23a736a4f0 Issue 6070: when creating a compiled file, after copying the mode bits, on
posix zap the execute bit in case it was set on the .py file, since the
compiled files are not directly executable on posix.  Patch by Marco N.
2009-07-07 01:06:13 +00:00
Benjamin Peterson 753d16234f when print() gets unicode arguments, sep and end should be unicode by default #4618 2009-07-02 18:16:45 +00:00
Benjamin Peterson 4a3cf191f4 small optimization: avoid popping the current block until we have to 2009-07-01 23:45:19 +00:00
Georg Brandl e323e0e91a Fix error handling in PyCode_Optimize, by Alexander Schremmer at EuroPython sprint. 2009-06-29 14:44:49 +00:00
Alexandre Vassalotti 7274cffa9e Update docstrings for sys.getdlopenflags() and sys.setdlopenflags(). 2009-06-29 01:01:51 +00:00
Benjamin Peterson 8f7b94eae9 use stack macros 2009-06-28 16:14:07 +00:00
Benjamin Peterson b8338ab92c add two generic macros for peeking and setting in the stack 2009-06-28 16:08:02 +00:00
Benjamin Peterson 1a4ceb2f4b fix grammar 2009-06-23 01:18:57 +00:00
Benjamin Peterson d9920c255d remove tmpname support since it's no longer used 2009-06-21 23:03:36 +00:00
Benjamin Peterson f67caf8523 don't need to add the name 'lambda' as assigned 2009-06-21 23:01:07 +00:00
Benjamin Peterson 5ecf57adcf remove unused 'encoding' member from the compiler struct 2009-06-17 03:23:04 +00:00
Benjamin Peterson 8fa3e933c1 update ast version 2009-06-13 20:30:48 +00:00
Benjamin Peterson a72be3b325 when no module is given in a 'from' relative import, make ImportFrom.module NULL 2009-06-13 20:23:33 +00:00
Benjamin Peterson 52c4bec76b give a better error message when deleting () 2009-06-13 17:08:53 +00:00
Benjamin Peterson 5d1ff94b9e set Print.values to NULL if there are no values 2009-06-13 16:19:19 +00:00
Benjamin Peterson d1f5a59edb allow importing from a module named None if it has an 'as' clause 2009-06-13 13:06:21 +00:00
Benjamin Peterson 565e1b6bb7 prevent import statements from assigning to None 2009-06-13 03:46:30 +00:00
Benjamin Peterson 4afbba3d34 keep the slice.step field as NULL if no step expression is given 2009-06-13 01:40:00 +00:00
Alexandre Vassalotti a6e3474d02 Add const qualifier to PyErr_SetFromErrnoWithFilename and to
PyErr_SetFromErrnoWithUnicodeFilename.
2009-06-12 20:57:12 +00:00
Benjamin Peterson 4efb5d0b82 remove check for case handled in sub-function 2009-06-11 22:29:23 +00:00
Benjamin Peterson b266481ed8 revert r73361 2009-06-11 17:49:38 +00:00
Benjamin Peterson e5fa5fe8fc remove duplicate check 2009-06-11 16:25:52 +00:00
Benjamin Peterson a5a5728cf0 remove error checks already done in set_context() 2009-06-08 23:44:13 +00:00
Benjamin Peterson 8ea4ded9a6 remove useless assertion 2009-06-08 22:18:32 +00:00
Antoine Pitrou 46dbe27f7e Issue #5330: C functions called with keyword arguments were not reported by
the various profiling modules (profile, cProfile). Patch by Hagen Fürstenau.
2009-05-30 21:27:00 +00:00
Jeffrey Yasskin 7937d939b1 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.
2009-05-29 03:44:31 +00:00
Philip Jenvey dd0388a1c2 further hint to where the open docs really are 2009-05-28 03:12:16 +00:00
Benjamin Peterson aafa18aa05 teach the peepholer about SETUP_WITH 2009-05-26 12:49:59 +00:00
Georg Brandl 944f684ce6 Allow multiple context managers in one with statement, as proposed
in http://codereview.appspot.com/53094 and accepted by Guido.

The construct is transformed into multiple With AST nodes so that
there should be no problems with the semantics.
2009-05-25 21:02:56 +00:00
Benjamin Peterson 49a6b0ef70 take into account the fact that SETUP_WITH pushes a finally block 2009-05-25 20:12:57 +00:00
Benjamin Peterson 1880d8b823 add a SETUP_WITH opcode
It speeds up the with statement and correctly looks up the special
methods involved.
2009-05-25 13:13:44 +00:00
Benjamin Peterson 87e5006d8c handle errors from _PyObject_LookupSpecial when __get__ fails 2009-05-25 02:40:21 +00:00
Jeffrey Yasskin 655d835415 Issue #6042:
lnotab-based tracing is very complicated and isn't documented very well.  There
were at least 3 comment blocks purporting to document co_lnotab, and none did a
very good job. This patch unifies them into Objects/lnotab_notes.txt which
tries to completely capture the current state of affairs.

I also discovered that we've attached 2 layers of patches to the basic tracing
scheme. The first layer avoids jumping to instructions that don't start a line,
to avoid problems in if statements and while loops.  The second layer
discovered that jumps backward do need to trace at instructions that don't
start a line, so it added extra lnotab entries for 'while' and 'for' loops, and
added a special case for backward jumps within the same line. I replaced these
patches by just treating forward and backward jumps differently.
2009-05-23 23:23:01 +00:00
Benjamin Peterson e5afa3b24b support building with subversion 1.7 #6094 2009-05-23 19:24:37 +00:00
Hirokazu Yamamoto b24bb27d22 Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more. 2009-05-17 02:52:09 +00:00
R. David Murray 525cffcd7e Move news item to correct section, remove spurious 'see below'
from docstring.
2009-05-13 13:07:14 +00:00
R. David Murray a3ec697cbd Issue 5994: add docstrings to marshal. 2009-05-13 00:30:29 +00:00
Benjamin Peterson 4c1fe51ca0 don't ignore exceptions from _PyObject_LengthHint 2009-05-09 19:17:59 +00:00
Benjamin Peterson af1692a266 convert some more special methods to use _PyObject_LookupSpecial 2009-05-09 16:36:39 +00:00
Jeffrey Yasskin f7f858d141 Issue 5954, PyFrame_GetLineNumber:
Most uses of PyCode_Addr2Line
(http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get
the line number of a specified frame, but there's no way to do that directly.
Forcing people to go through the code object makes them know more about the
guts of the interpreter than they should need.

The remaining uses of PyCode_Addr2Line seem to be getting the line from a
traceback (for example,
http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line),
which is replaced by the tb_lineno field.  So we may be able to deprecate
PyCode_Addr2Line entirely for external use.
2009-05-08 22:23:21 +00:00
Eric Smith a985a3aee4 Issue #5920: Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson. 2009-05-05 18:26:08 +00:00
Mark Dickinson 01fce5adc0 Don't use PyOS_strnicmp for NaN and Inf detection: it's locale-aware. 2009-05-03 22:33:34 +00:00
Mark Dickinson 777e4ff503 Eliminate some locale-dependent calls to isspace and tolower. 2009-05-03 20:59:48 +00:00
Eric Smith 9139cc6a3b Issue #1588: Add complex.__format__. 2009-04-30 00:58:58 +00:00
Mark Dickinson df108ca324 Remove format_float and use _PyOS_double_to_string instead. 2009-04-29 21:56:53 +00:00
Mark Dickinson 92fcc9c991 Issue #5864: format(1234.5, '.4') gives misleading result
(Backport of r72109 from py3k.)
2009-04-29 20:41:00 +00:00
Eric Smith 94cc00ce4d Silence warning on Windows. 2009-04-28 07:33:09 +00:00
Eric Smith cac7af6863 Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to py3k. Should fix Windows buildbot errors. 2009-04-27 19:04:37 +00:00
Mark Dickinson e73cbe7a4e Fix typo in function name 2009-04-26 19:54:55 +00:00