Commit Graph

8030 Commits

Author SHA1 Message Date
Larry Hastings b7ccb20423 Issue #20294: Argument Clinic now supports argument parsing for __new__ and
__init__ functions.
2014-01-18 23:50:21 -08:00
Benjamin Peterson dc3cce077d merge 3.3 (#17811) 2014-01-18 22:57:05 -05:00
Benjamin Peterson e83ed43281 improve description of buffers argument for readv/writev (closes #17811)
Patch by Nikolaus Rath.
2014-01-18 22:54:59 -05:00
Larry Hastings bebf73511a Issue #20287: Argument Clinic's output is now configurable, allowing
delaying its output or even redirecting it to a separate file.
2014-01-17 17:47:17 -08:00
Gregory P. Smith 83fed26953 avoid a compiler warning about assigning const char * to char *. 2014-01-17 12:09:05 -08:00
Gregory P. Smith f34890937b avoid a compiler warning about assigning const char * to char *. 2014-01-17 12:08:49 -08:00
Larry Hastings 2a727916c5 Issue #20226: Major improvements to Argument Clinic.
* You may now specify an expression as the default value for a
  parameter!  Example: "sys.maxsize - 1".  This support is
  intentionally quite limited; you may only use values that
  can be represented as static C values.
* Removed "doc_default", simplified support for "c_default"
  and "py_default".  (I'm not sure we still even need
  "py_default", but I'm leaving it in for now in case a
  use presents itself.)
* Parameter lines support a trailing '\\' as a line
  continuation character, allowing you to break up long lines.
* The argument parsing code generated when supporting optional
  groups now uses PyTuple_GET_SIZE instead of PyTuple_GetSize,
  leading to a 850% speedup in parsing.  (Just kidding, this
  is an unmeasurable difference.)
* A bugfix for the recent regression where the generated
  prototype from pydoc for builtins would be littered with
  unreadable "=<object ...>"" default values for parameters
  that had no default value.
* Converted some asserts into proper failure messages.
* Many doc improvements and fixes.
2014-01-16 11:32:01 -08:00
Serhiy Storchaka 18cc3da508 Issue #19936: Remove executable bits from C source files and several forgotten
test files.
2014-01-16 18:50:53 +02:00
Serhiy Storchaka 7f470d0f9c Issue #19936: Remove executable bits from C source files and several forgotten
test files.
2014-01-16 18:48:45 +02:00
Serhiy Storchaka 8f8ec92de8 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.  Fixed
shebang lines in the unittestgui and checkpip scripts.
2014-01-16 17:33:23 +02:00
Serhiy Storchaka b992a0e102 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.  Fixed
shebang line to use python3 executable in the unittestgui script.
2014-01-16 17:15:49 +02:00
Stefan Krah 7936c81d51 Merge from 3.3. 2014-01-16 14:43:22 +01:00
Stefan Krah 16540408f4 Issue #19936: Disable shebang lines in order to prevent using a random
system python.
2014-01-16 14:33:27 +01:00
Antoine Pitrou f5207e617b Clinic-ize the crypt module. Derby! 2014-01-14 21:00:27 +01:00
Benjamin Peterson 901acb4d89 merge 3.3 (#20251) 2014-01-14 00:22:50 -05:00
Benjamin Peterson a677d7628b remove overly strict assertion (closes #20251) 2014-01-14 00:21:49 -05:00
Benjamin Peterson e19d9d1467 merge 3.3 (#20250) 2014-01-13 23:56:30 -05:00
Benjamin Peterson 9cb33b7d03 correct defaultdict signature in docstring (closes #20250)
Patch from Andrew Barnert.
2014-01-13 23:56:05 -05:00
Benjamin Peterson c6b37e21f5 merge 3.3 (#20246) 2014-01-13 23:14:42 -05:00
Benjamin Peterson 5688222907 merge 3.2 (#20246) 2014-01-13 23:12:55 -05:00
Benjamin Peterson fbf648ebba complain when nbytes > buflen to fix possible buffer overflow (closes #20246) 2014-01-13 22:59:38 -05:00
Benjamin Peterson a51791aa94 fix refleak in the error case 2014-01-13 09:20:53 -05:00
Larry Hastings 8666e65206 Issue #20228: Argument Clinic now has special support for class special
methods.
2014-01-12 14:12:59 -08:00
Larry Hastings 4a55fc5a9d Issue #20214: Fixed a number of small issues and documentation errors in
Argument Clinic (see issue for details).
2014-01-12 11:09:57 -08:00
Benjamin Peterson 463753831c fix build when SCHED_SPORADIC is defined (closes #20217) 2014-01-10 09:22:40 -06:00
Antoine Pitrou 78ace81c93 Issue #20207: Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly asked for. 2014-01-09 20:09:03 +01:00
Antoine Pitrou 2f7c31678a Remove conditional: it is useless at this point (OpenSSL headers are not yet included) 2014-01-09 20:07:41 +01:00
Antoine Pitrou cd3d7cabef Issue #20207: Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly asked for. 2014-01-09 20:02:20 +01:00
Benjamin Peterson 766e10c4a8 merge 3.3 2014-01-09 09:36:23 -06:00
Benjamin Peterson 21e7d4cd5e fix zipimport ref leak 2014-01-09 09:36:10 -06:00
Victor Stinner 149e540adf (Merge 3.3) Issue #20113: os.readv() and os.writev() now raise an OSError
exception on error instead of returning -1.
2014-01-08 15:26:12 +01:00
Victor Stinner 57ddf78b6b Issue #20113: os.readv() and os.writev() now raise an OSError exception on
error instead of returning -1.
2014-01-08 15:21:28 +01:00
Gregory P. Smith 2e385e2592 Fixes issue #19081: When a zipimport .zip file in sys.path being imported from
is modified during the lifetime of the Python process after zipimport has
already cached the zip's table of contents we detect this and recover
rather than read bad data from the .zip (causing odd import errors).
2014-01-07 18:34:23 -08:00
Gregory P. Smith 2bcbc14117 Fixes Issue #19081: When a zipimport .zip file in sys.path being imported from
is modified during the lifetime of the Python process after zipimport has
already cached the zip's table of contents we detect this and recover
rather than read bad data from the .zip (causing odd import errors).
2014-01-07 18:30:07 -08:00
Larry Hastings df7c22b25b Issue #19723: Missed one conversion to the new Argument Clinic syntax. 2014-01-07 14:25:26 -08:00
Brett Cannon b05cbe61b3 Issue #12837: Silence a Clang compiler warning on OS X.
Now makes CPython build without warnings on OS X under Clang with
-Wno-unused-value -Wno-empty-body -Qunused-arguments
-Wno-deprecated-declarations.

Thanks to David Watson for taking an initial stab at a solution.
2014-01-07 17:01:01 -05:00
Larry Hastings 61272b77b0 Issue #19273: The marker comments Argument Clinic uses have been changed
to improve readability.
2014-01-07 12:41:53 -08:00
Larry Hastings 77561cccb2 Issue #20141: Improved Argument Clinic's support for the PyArg_Parse "O!"
format unit.
2014-01-07 12:13:13 -08:00
Larry Hastings 16c5191ab3 Issue #20144: Argument Clinic now supports simple constants as parameter
default values.  inspect.Signature correspondingly supports them in
__text_signature__ fields for builtins.
2014-01-07 11:53:01 -08:00
Larry Hastings 3f144c2ad7 Issue #20142: Py_buffer variables generated by Argument Clinic are now
initialized with a default value.
2014-01-06 10:34:00 -08:00
Stefan Krah 0455c3fd28 Whitespace. 2014-01-04 13:03:48 +01:00
Larry Hastings 78cf85c669 Issue #19659: Added documentation for Argument Clinic. 2014-01-04 12:44:57 -08:00
Larry Hastings 3cceb38486 Issue #19976: Argument Clinic METH_NOARGS functions now always
take two parameters.
2014-01-04 11:09:09 -08:00
Stefan Krah 41adc26708 Merge from 3.3. 2014-01-04 13:06:59 +01:00
Martin v. Löwis 24e43308b7 * Issue #16113: Remove sha3 module again.
Patch by Christian Heimes, with modifications.
2014-01-03 14:05:06 +01:00
Victor Stinner 5c86733c8a Issue #18294: Fix uint_converter() in zlibmodule.c, fix the "> UINT_MAX" check 2014-01-03 12:26:12 +01:00
Victor Stinner daeffd2c08 audioop: adpcm2lin() and lin2adpcm() now raises a TypeError instead of a
SystemError if the state type is invalid.
2014-01-03 03:26:47 +01:00
Victor Stinner e8794526db threading.RLock._acquire_restore() now raises a TypeError instead of a
SystemError when it is not called with 2 arguments
2014-01-02 12:47:24 +01:00
Victor Stinner f4c68db162 (Merge 3.3) parser: fix usage of Py_BuildValue() to build a parser error
Fix typo: "os" format => "Os"
2014-01-02 11:50:10 +01:00
Victor Stinner 5f8d485982 parser: fix usage of Py_BuildValue() to build a parser error
Fix typo: "os" format => "Os"
2014-01-02 11:49:27 +01:00