Commit Graph

3215 Commits

Author SHA1 Message Date
Antoine Pitrou 11cc480ed0 Temporary debug for Windows buildbots. 2012-01-25 14:39:21 +01:00
Antoine Pitrou 0e5fd59a27 Make guard more dynamic (apparently the size of a filesystem timestamp may vary under Windows). 2012-01-25 03:31:39 +01:00
Antoine Pitrou d1c818a9c0 Issue #11235: Fix OverflowError when trying to import a source file whose modification time doesn't fit in a 32-bit timestamp. 2012-01-24 17:44:06 +01:00
Benjamin Peterson 5f8d60647b add another year to glorious PSF IP 2011-12-31 22:42:26 -06:00
Amaury Forgeot d'Arc 4bf21e28df Issue #13546: Fixed an overflow issue that could crash the intepreter when
calling sys.setrecursionlimit((1<<31)-1).

2.7 only.
2011-12-07 21:46:48 +01:00
Benjamin Peterson a5ae1f0c25 remove py3k warning for callable 2011-11-06 08:20:12 -05:00
Benjamin Peterson 0c0d756098 don't let a tuple msg be interpreted as arguments to AssertionError (closes #13268) 2011-10-27 08:21:59 -04:00
Charles-François Natali 46180751e9 Merge. 2011-10-12 21:10:02 +02:00
Charles-François Natali 1f3ff7bc3f Issue #13156: revert changeset f6feed6ec3f9, which was only relevant for native
TLS implementations, and fails with the ad-hoc TLS implementation when a thread
doesn't have an auto thread state (e.g. a thread created outside of Python
calling into a subinterpreter).
2011-10-12 21:07:54 +02:00
Victor Stinner 63c22fac72 Issue #7732: Fix a crash on importing a module if a directory has the same name
than a Python module (e.g. "__init__.py"): don't close the file twice.

PyFile_FromFile() does also close the file if PyString_FromString() failed. It
did already close the file on fill_file_fields() error (e.g. if the file is a
directory).
2011-09-23 19:37:03 +02:00
Victor Stinner ed36c06f1d Fix the import machinery if there is an error on sys.path or sys.meta_path
find_module() now raises a RuntimeError, instead of ImportError, on an error on
sys.path or sys.meta_path because load_package() and import_submodule() returns
None and clear the exception if a ImportError occurred.
2011-09-15 19:45:53 +02:00
Victor Stinner 871a0fbf46 Remove unused variable if Python is build without threads 2011-09-02 00:21:36 +02:00
Antoine Pitrou 4cfae027b3 Issue #1813: Fix codec lookup and setting/getting locales under Turkish locales. 2011-07-24 02:51:01 +02:00
Benjamin Peterson 5eed3062f5 allow None identifiers 2011-07-22 17:20:58 -05:00
Benjamin Peterson 77820242dd verify the types of AST strings and identifiers (closes #12609 and #12610) 2011-07-22 10:39:50 -05:00
Raymond Hettinger 39540a0226 Improve docstring for divmod() 2011-07-19 11:59:20 -07:00
Benjamin Peterson c3349cd22e port 8d05f697acd4 (#11627) 2011-07-15 14:15:40 -05:00
Victor Stinner ba8b3a2ca7 Close #12501: Adjust callable() warning: callable() is only not supported in
Python 3.1. callable() is again supported in Python 3.2.
2011-07-08 02:07:45 +02:00
Benjamin Peterson 4833c98f85 start out this branch always with filename NULL 2011-07-04 22:27:16 -05:00
Benjamin Peterson 9b6c60530b plug refleak 2011-07-03 22:18:34 -05:00
Victor Stinner 65c153547b Issue #12467: warnings: fix a race condition if a warning is emitted at
shutdown, if globals()['__file__'] is None.
2011-07-04 03:05:37 +02:00
Raymond Hettinger 19b851d11b sys.checkinterval() now refreshes the current countdown ticker. 2011-06-01 18:21:42 -07:00
Ned Deily 482f908410 Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
2011-05-28 00:11:54 -07:00
Barry Warsaw cf0d8ab818 Replay changeset 70238:03e488b5c009 from fubar branch. Original commit
message:

Reconcile with the 2.6svn branch.  The 2.6.7 release will be made from
Subversion, but there were differences, so this brings them in sync.  These
changes should *not* propagate to any newer versions.
2011-05-23 15:22:56 -04:00
Georg Brandl 11041f0af9 Port #6498 fix: fix several misspellings of "SystemExit" as "SystemError". 2011-05-15 08:50:32 +02:00
Victor Stinner 0a92d1849e Issue #8651: PyArg_Parse*() functions raise an OverflowError if the file
doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int (length
bigger than 2^31-1 bytes).
2011-05-03 15:09:24 +02:00
Victor Stinner 645b9f67ae Issue #8651: Fix "z#" format of PyArg_Parse*() function: the size was not
written if PY_SSIZE_T_CLEAN is defined.
2011-05-03 15:06:11 +02:00
Antoine Pitrou 4394e0db24 Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_*
APIs, to avoid a crash with the pthread implementation in RHEL 5.  Patch
by Charles-François Natali.
2011-04-27 19:20:48 +02:00
Ezio Melotti c283a85e12 Issue #5057: fix a bug in the peepholer that led to non-portable pyc files between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP chars (e.g. u"\U00012345"[0]). 2011-04-15 16:14:04 +03:00
Ned Deily 04cb72f968 Issue9670: Back out changeset b0d2b696da19; test fails on other platforms
and on OS X with pydebug.
2011-04-09 14:59:30 -07:00
Ned Deily e427f0f432 Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(Patch by Ronald Oussoren)
2011-04-09 12:29:58 -07:00
Benjamin Peterson 7859d4098c remove this dead subversion code 2011-03-25 16:57:30 -05:00
Ezio Melotti c2077b0d9b #11565: Fix several typos. Patch by Piotr Kasprzyk. 2011-03-16 12:34:31 +02:00
Ezio Melotti 24b07bcba3 #11515: fix several typos. Patch by Piotr Kasprzyk. 2011-03-15 18:55:01 +02:00
Georg Brandl 3a5508e2c0 Port build identification from default branch. 2011-03-06 10:42:21 +01:00
Georg Brandl 94800df632 Merged revisions 88430,88438,88440 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88430 | georg.brandl | 2011-02-15 20:48:59 +0100 (Di, 15 Feb 2011) | 1 line

  #730467: Another small AIX fix.
........
  r88438 | georg.brandl | 2011-02-19 09:44:47 +0100 (Sa, 19 Feb 2011) | 1 line

  #10709: add back an updated AIX-NOTES (as README.AIX).
........
  r88440 | georg.brandl | 2011-02-19 09:58:23 +0100 (Sa, 19 Feb 2011) | 1 line

  #11184: Fix large file support on AIX.
........
2011-02-25 11:09:02 +00:00
David Malcolm 4c29e1cd01 Merged revisions 87796 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87796 | david.malcolm | 2011-01-06 12:01:36 -0500 (Thu, 06 Jan 2011) | 6 lines

  Issue #10655: Fix the build on PowerPC on Linux with GCC when building with
  timestamp profiling (--with-tsc): the preprocessor test for the PowerPC
  support now looks for "__powerpc__" as well as "__ppc__": the latter seems to
  only be present on OS X; the former is the correct one for Linux with GCC.
........
2011-01-06 17:39:24 +00:00
Benjamin Peterson fe0263d36f Merged revisions 87607 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87607 | benjamin.peterson | 2011-01-01 08:28:31 -0600 (Sat, 01 Jan 2011) | 1 line

  update copyright to 2011
........
2011-01-01 14:30:24 +00:00
R. David Murray 64a1e7cab1 Merged revisions 87251 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87251 | r.david.murray | 2010-12-14 18:06:25 -0500 (Tue, 14 Dec 2010) | 4 lines

  #4236: avoid possible Fatal Error when import is called from __del__

  Patch by Simon Cross, crasher test code by Martin von Löwis.
........
2010-12-15 01:36:03 +00:00
Benjamin Peterson 07f5451517 remove dictmaker rule; it's unused 2010-12-11 04:25:57 +00:00
Benjamin Peterson ec9f9f535a Merged revisions 85904 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85904 | benjamin.peterson | 2010-10-28 22:28:14 -0500 (Thu, 28 Oct 2010) | 1 line

  decrement offset when it points to a newline (#10186 followup)
........
2010-10-29 03:45:34 +00:00
Benjamin Peterson f99f33da60 Merged revisions 85814 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85814 | benjamin.peterson | 2010-10-23 21:52:05 -0500 (Sat, 23 Oct 2010) | 1 line

  remove broken code accounting an offset the size of the line #10186
........
2010-10-24 03:00:35 +00:00
Benjamin Peterson 045bbcdc8e Merged revisions 85757 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85757 | benjamin.peterson | 2010-10-20 16:25:23 -0500 (Wed, 20 Oct 2010) | 1 line

  fix uninitialized struct member #10152
........
2010-10-20 21:28:09 +00:00
Benjamin Peterson f76942d6bf Merged revisions 85562 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85562 | benjamin.peterson | 2010-10-15 22:45:45 -0500 (Fri, 15 Oct 2010) | 1 line

  don't identify the toplevel namespace by name #9997
........
2010-10-16 03:51:38 +00:00
Amaury Forgeot d'Arc 41b986c352 Merged revisions 85236 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85236 | amaury.forgeotdarc | 2010-10-06 00:15:37 +0200 (mer., 06 oct. 2010) | 2 lines

  #9060 Let platforms without dup2() compile the replacement fonction without error.
........
2010-10-05 22:21:03 +00:00
Benjamin Peterson da4fabac87 Rolled back revisions 85003 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
2010-09-25 03:27:12 +00:00
Benjamin Peterson 2af840455e Merged revisions 85003 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85003 | benjamin.peterson | 2010-09-24 22:14:33 -0500 (Fri, 24 Sep 2010) | 1 line

  don't count keyword arguments as positional #9943
........
2010-09-25 03:17:56 +00:00
Antoine Pitrou 0a7b65b7da Merged revisions 84623 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84623 | antoine.pitrou | 2010-09-08 14:37:10 +0200 (mer., 08 sept. 2010) | 4 lines

  Issue #9797: pystate.c wrongly assumed that zero couldn't be a valid
  thread-local storage key.
........
2010-09-08 12:40:49 +00:00
Amaury Forgeot d'Arc b1147f5d0a Merged revisions 84209, 84214 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84209 | amaury.forgeotdarc | 2010-08-19 19:43:15 +0200 (jeu., 19 août 2010) | 5 lines

  Check the return values for all functions returning an ast node.
  Failure to do it may result in strange error messages or even crashes,
  in admittedly convoluted cases that are normally syntax errors, like:
      def f(*xx, __debug__): pass
........
  r84214 | amaury.forgeotdarc | 2010-08-19 23:32:38 +0200 (jeu., 19 août 2010) | 3 lines

  Add tests for r84209 (crashes in the Ast builder)
  Also remove one tab, and move a check closer to the possible failure.
........
2010-08-19 21:50:08 +00:00
Antoine Pitrou a03ff6d3cd sys.stderr and sys.excepthook can be None at interpreter shutdown,
in which case display the appropriate error message.
(part of #5319)
2010-08-08 21:37:51 +00:00
Georg Brandl e64de92f74 Merged revisions 83429,83436 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint

................
  r83429 | georg.brandl | 2010-08-01 21:14:56 +0200 (So, 01 Aug 2010) | 37 lines

  Merged revisions 83352,83356-83358,83362,83366,83368-83369 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/branches/py3k

  ........
    r83352 | georg.brandl | 2010-07-31 20:11:07 +0200 (Sa, 31 Jul 2010) | 1 line

    #9440: Remove borderline test case that fails based on unpredictable conditions such as compiler flags.
  ........
    r83356 | georg.brandl | 2010-07-31 21:29:15 +0200 (Sa, 31 Jul 2010) | 1 line

    Remove trailing whitespace.
  ........
    r83357 | georg.brandl | 2010-07-31 21:59:55 +0200 (Sa, 31 Jul 2010) | 1 line

    #5778: document that sys.version can contain a newline.
  ........
    r83358 | georg.brandl | 2010-07-31 22:05:31 +0200 (Sa, 31 Jul 2010) | 1 line

    #9442: do not document a specific format for sys.version; rather refer to version_info and the platform module.
  ........
    r83362 | georg.brandl | 2010-07-31 23:12:15 +0200 (Sa, 31 Jul 2010) | 1 line

    #8910: add a file explaining why Lib/test/data is there.
  ........
    r83366 | georg.brandl | 2010-07-31 23:26:40 +0200 (Sa, 31 Jul 2010) | 1 line

    There always is a False and True now.
  ........
    r83368 | georg.brandl | 2010-07-31 23:40:15 +0200 (Sa, 31 Jul 2010) | 1 line

    #7909: the prefixes \\.\ and \\?\ indicate special Windows paths, do not try to manipulate them.  See http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx for details.
  ........
    r83369 | georg.brandl | 2010-07-31 23:41:42 +0200 (Sa, 31 Jul 2010) | 1 line

    Fix "Berkeley" name.
  ........
................
  r83436 | georg.brandl | 2010-08-01 21:33:15 +0200 (So, 01 Aug 2010) | 42 lines

  Merged revisions 83259,83261,83264-83265,83268-83269,83271-83272,83281 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/branches/py3k

  ........
    r83259 | georg.brandl | 2010-07-30 09:03:39 +0200 (Fr, 30 Jul 2010) | 1 line

    Clarification.
  ........
    r83261 | georg.brandl | 2010-07-30 09:21:26 +0200 (Fr, 30 Jul 2010) | 1 line

    #9230: allow Pdb.checkline() to be called without a current frame, for setting breakpoints before starting debugging.
  ........
    r83264 | georg.brandl | 2010-07-30 10:45:26 +0200 (Fr, 30 Jul 2010) | 1 line

    Document the "jump" command in pdb.__doc__, and add a version tag for "until X".
  ........
    r83265 | georg.brandl | 2010-07-30 10:54:49 +0200 (Fr, 30 Jul 2010) | 1 line

    #8015: fix crash when entering an empty line for breakpoint commands.  Also restore environment properly when an exception occurs during the definition of commands.
  ........
    r83268 | georg.brandl | 2010-07-30 11:23:23 +0200 (Fr, 30 Jul 2010) | 2 lines

    Issue #8048: Prevent doctests from failing when sys.displayhook has
    been reassigned.
  ........
    r83269 | georg.brandl | 2010-07-30 11:43:00 +0200 (Fr, 30 Jul 2010) | 1 line

    #6719: In pdb, do not stop somewhere in the encodings machinery if the source file to be debugged is in a non-builtin encoding.
  ........
    r83271 | georg.brandl | 2010-07-30 11:59:28 +0200 (Fr, 30 Jul 2010) | 1 line

    #5727: Restore the ability to use readline when calling into pdb in doctests.
  ........
    r83272 | georg.brandl | 2010-07-30 12:29:19 +0200 (Fr, 30 Jul 2010) | 1 line

    #5294: Fix the behavior of pdb "continue" command when called in the top-level debugged frame.
  ........
    r83281 | georg.brandl | 2010-07-30 15:36:43 +0200 (Fr, 30 Jul 2010) | 1 line

    Add myself for pdb.
  ........
................
2010-08-01 22:10:15 +00:00
Georg Brandl e277325285 Merged revisions 83352,83356-83358,83362,83366,83368-83369 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83352 | georg.brandl | 2010-07-31 20:11:07 +0200 (Sa, 31 Jul 2010) | 1 line

  #9440: Remove borderline test case that fails based on unpredictable conditions such as compiler flags.
........
  r83356 | georg.brandl | 2010-07-31 21:29:15 +0200 (Sa, 31 Jul 2010) | 1 line

  Remove trailing whitespace.
........
  r83357 | georg.brandl | 2010-07-31 21:59:55 +0200 (Sa, 31 Jul 2010) | 1 line

  #5778: document that sys.version can contain a newline.
........
  r83358 | georg.brandl | 2010-07-31 22:05:31 +0200 (Sa, 31 Jul 2010) | 1 line

  #9442: do not document a specific format for sys.version; rather refer to version_info and the platform module.
........
  r83362 | georg.brandl | 2010-07-31 23:12:15 +0200 (Sa, 31 Jul 2010) | 1 line

  #8910: add a file explaining why Lib/test/data is there.
........
  r83366 | georg.brandl | 2010-07-31 23:26:40 +0200 (Sa, 31 Jul 2010) | 1 line

  There always is a False and True now.
........
  r83368 | georg.brandl | 2010-07-31 23:40:15 +0200 (Sa, 31 Jul 2010) | 1 line

  #7909: the prefixes \\.\ and \\?\ indicate special Windows paths, do not try to manipulate them.  See http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx for details.
........
  r83369 | georg.brandl | 2010-07-31 23:41:42 +0200 (Sa, 31 Jul 2010) | 1 line

  Fix "Berkeley" name.
........
2010-08-01 19:14:56 +00:00
Benjamin Peterson 947ce58a90 prevent assignment to set literals 2010-06-24 00:12:40 +00:00
Stefan Krah 27db0d20de Issue #8930: Remaining indentation fixes after the Grand Unified Indenting. 2010-06-23 18:17:18 +00:00
Stefan Krah 7ff78257af Issue #8930: Remaining indentation fixes after the Grand Unified Indenting. 2010-06-23 18:12:09 +00:00
Antoine Pitrou c31616d558 Merged revisions 82169 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r82169 | antoine.pitrou | 2010-06-22 23:42:05 +0200 (mar., 22 juin 2010) | 4 lines

  Fix misindents in compile.c (for Benjamin).
  Of course, whoever used the wrong indentation rules needs to be spanked.
........
2010-06-22 21:47:04 +00:00
Antoine Pitrou a4d36a9572 Fix misindents in compile.c (for Benjamin).
Of course, whoever used the wrong indentation rules needs to be spanked.
2010-06-22 21:42:05 +00:00
Benjamin Peterson 5b9ce31c39 bump revision 2010-06-22 19:49:47 +00:00
Benjamin Peterson c6660cf4d6 different spellings are just unacceptable 2010-06-11 21:40:37 +00:00
Benjamin Peterson 1056ca264f fix code formatting 2010-06-09 19:45:04 +00:00
Victor Stinner c3e40e0454 Merged revisions 81537 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81537 | victor.stinner | 2010-05-26 00:30:32 +0200 (mer., 26 mai 2010) | 3 lines

  Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding and
  error handler, instead of writing to the C stderr file in utf-8
........
2010-05-25 22:40:38 +00:00
Victor Stinner c49dfcc8dc Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding and
error handler, instead of writing to the C stderr file in utf-8
2010-05-25 22:30:32 +00:00
Antoine Pitrou 52ca516cac Merged revisions 81398 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81398 | antoine.pitrou | 2010-05-21 19:12:38 +0200 (ven., 21 mai 2010) | 6 lines

  Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows
  embedders of the interpreter to set sys.argv without also modifying
  sys.path.  This helps fix `CVE-2008-5983
  <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
........
2010-05-21 17:22:43 +00:00
Antoine Pitrou 6a2656094d Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows
embedders of the interpreter to set sys.argv without also modifying
sys.path.  This helps fix `CVE-2008-5983
<http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
2010-05-21 17:12:38 +00:00
Brett Cannon 7d006260a5 Merged revisions 81380 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81380 | brett.cannon | 2010-05-20 11:37:55 -0700 (Thu, 20 May 2010) | 8 lines

  Turned out that if you used explicit relative import syntax
  (e.g. from .os import sep) and it failed, import would still try the implicit
  relative import semantics of an absolute import (from os import sep). That's
  not right, so when level is negative, only do explicit relative import
  semantics.

  Fixes issue #7902. Thanks to Meador Inge for the patch.
........
2010-05-20 18:41:08 +00:00
Brett Cannon eb3cd301ae Turned out that if you used explicit relative import syntax
(e.g. from .os import sep) and it failed, import would still try the implicit
relative import semantics of an absolute import (from os import sep). That's
not right, so when level is negative, only do explicit relative import
semantics.

Fixes issue #7902. Thanks to Meador Inge for the patch.
2010-05-20 18:37:55 +00:00
Victor Stinner 8bdd22a7e6 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 22:58:41 +00:00
Victor Stinner 3bea1ede7d Use 4-spaces for indentation (instead of tabs) in pgen outputs
Regenerate (reindent) Python/graminit.c
2010-05-15 22:55:28 +00:00
Antoine Pitrou c7c96a90bc 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:15:40 +00:00
Antoine Pitrou c83ea137d7 Untabify C files. Will watch buildbots. 2010-05-09 14:46:46 +00:00
Jean-Paul Calderone 0819b092d6 Merged revisions 81007 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81007 | jean-paul.calderone | 2010-05-08 16:06:02 -0400 (Sat, 08 May 2010) | 1 line

  Skip signal handler re-installation if it is not necessary.  Issue 8354.
........
2010-05-08 21:11:28 +00:00
Jean-Paul Calderone e54ddf1ed2 Skip signal handler re-installation if it is not necessary. Issue 8354. 2010-05-08 20:06:02 +00:00
Mark Dickinson e02c9d22f6 Merged revisions 80758 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80758 | mark.dickinson | 2010-05-04 17:18:25 +0100 (Tue, 04 May 2010) | 9 lines

  Issue #1533: fix inconsistency in range function argument processing:
  any non-float non-integer argument is now converted to an integer (if
  possible) using its __int__ method.  Previously, only small arguments
  were treated this way; larger arguments (those whose __int__ was
  outside the range of a C long) would produce a TypeError.

  Patch by Alexander Belopolsky (with minor modifications).
........
2010-05-07 13:23:18 +00:00
Brett Cannon f4f0bf850b Revert a change where an expression is not needed now, but could be in the future. 2010-05-05 23:11:08 +00:00
Brett Cannon 5335e77810 Remove an unneeded variable assignment.
Found using Clang's static analyzer.
2010-05-05 20:53:20 +00:00
Brett Cannon 0b64be2389 Explicitly add stdio.h and string.h to make strtod.c work standalone.
Found using Clang's static analyzer.
2010-05-05 20:50:03 +00:00
Brett Cannon c33e82d23c Change to a Py_XDECREF and fix some whitespace.
Found using Clang's static analyzer.
2010-05-05 20:38:52 +00:00
Brett Cannon 1771ecf879 Remove an unnecessary variable assignment.
Found using Clang's static analyzer.
2010-05-05 20:35:24 +00:00
Brett Cannon fa84d923ec Remove two unneeded branches to an 'if' statement by applying De Morgan's Law
and creating a single 'if' statement along with a NULL default value for a
variable.

Also clean up a bunch of whitespace.

Found using Clang's static analyzer.
2010-05-05 20:30:30 +00:00
Brett Cannon 2ee5183852 Remove an unneeded variable increment.
Found using Clang's static analyzer.
2010-05-05 20:27:49 +00:00
Brett Cannon 8b9c04941b Remove an unneeded variable and fix a little whitespace.
Found using Clang's static analyzer.
2010-05-05 20:26:58 +00:00
Brett Cannon b166afc17c Fix whitespace. 2010-05-05 20:25:47 +00:00
Brett Cannon 417439e6cd Partially revert the over-reaching r80813. 2010-05-05 20:24:30 +00:00
Brett Cannon 0b03f10afb Remove three unneeded variable assignments.
Found using Clang's static analyzer.
2010-05-05 20:20:19 +00:00
Mark Dickinson ef9b4abfea Fix trailing whitespace. 2010-05-04 16:19:06 +00:00
Mark Dickinson a8d2668818 Issue #1533: fix inconsistency in range function argument processing:
any non-float non-integer argument is now converted to an integer (if
possible) using its __int__ method.  Previously, only small arguments
were treated this way; larger arguments (those whose __int__ was
outside the range of a C long) would produce a TypeError.

Patch by Alexander Belopolsky (with minor modifications).
2010-05-04 16:18:25 +00:00
Brett Cannon 1994969c15 When DeprecationWarning was silenced by default, it also silenced any use of -Q
by default as well. This change fixes that by treating -Q like -3 when it comes
to DeprecationWarning; using it causes the silencing to not occur.

Fixes issue #7319.
2010-04-25 22:33:36 +00:00
Antoine Pitrou 18e63fbe64 Issue #7332: Remove the 16KB stack-based buffer in
PyMarshal_ReadLastObjectFromFile, which doesn't bring any noticeable
benefit compared to the dynamic memory allocation fallback.  Patch by
Charles-François Natali.
2010-04-21 22:53:29 +00:00
Antoine Pitrou 72ec2e2bdf 14 years later, we still don't know what it's for.
Spotted by the PyPy developers.

Original commit is:

branch:      trunk
user:        guido
date:        Mon Aug 19 21:32:04 1996 +0200
files:       Python/getargs.c
description:
[svn r6499] Support for keyword arguments (PyArg_ParseTupleAndKeywords) donated by
Geoff Philbrick <philbric@delphi.hks.com> (slightly changed by me).

Also a little change to make the file acceptable to K&R C compilers
(HPUX, SunOS 4.x).
2010-04-06 15:38:25 +00:00
Benjamin Peterson 3482370d8b Merged revisions 79763 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79763 | benjamin.peterson | 2010-04-04 18:03:22 -0500 (Sun, 04 Apr 2010) | 1 line

  fix tabs
........
2010-04-04 23:15:45 +00:00
Benjamin Peterson f5e7b3e826 fix tabs 2010-04-04 23:03:22 +00:00
Benjamin Peterson 498289ef28 Merged revisions 79642,79644 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79642 | benjamin.peterson | 2010-04-02 20:08:34 -0500 (Fri, 02 Apr 2010) | 1 line

  split out large test function
........
  r79644 | benjamin.peterson | 2010-04-02 20:28:57 -0500 (Fri, 02 Apr 2010) | 1 line

  give TypeError when trying to set T_STRING_INPLACE
........
2010-04-03 01:40:44 +00:00
Benjamin Peterson 1c7c11ef61 give TypeError when trying to set T_STRING_INPLACE 2010-04-03 01:28:57 +00:00
Benjamin Peterson bea424af98 more _PyString_Resize error checking 2010-04-03 00:57:33 +00:00
Antoine Pitrou 76c8649038 Issue #8276: PyEval_CallObject() is now only available in macro form. The
function declaration, which was kept for backwards compatibility reasons,
is now removed (the macro was introduced in 1997!).
2010-04-01 16:42:11 +00:00
Benjamin Peterson 06638735fc make naming convention consistent 2010-03-25 23:27:16 +00:00
Larry Hastings 402b73fb8d Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
2010-03-25 00:54:54 +00:00
Benjamin Peterson bb9d726357 take into account keyword arguments when passing too many args 2010-03-21 20:30:30 +00:00
Benjamin Peterson 965458931f improve error message from passing inadequate number of keyword arguments #6474
Note this removes the "non-keyword" or "keyword" phrases from these messages.
2010-03-21 20:21:00 +00:00
Benjamin Peterson 88e7ebac4c co_varnames is certainly a tuple, so let's not waste time finding out 2010-03-21 19:39:52 +00:00