Commit Graph

2365 Commits

Author SHA1 Message Date
Larry Hastings c20472640c Issue #20390: Small fixes and improvements for Argument Clinic. 2014-01-25 20:43:29 -08:00
Zachary Ware 9d7849f454 Issue #20376: Argument Clinic now escapes backslashes in docstrings. 2014-01-25 03:26:20 -06:00
Zachary Ware 021bb87845 Issue #20381: Fix sanity checking on default arguments when c_default is
also specified.
2014-01-24 22:52:30 -06:00
Larry Hastings 5c66189e88 Issue #20189: Four additional builtin types (PyTypeObject,
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
2014-01-24 06:17:25 -08:00
Larry Hastings 462582651c Two minor Argument Clinic bugfixes: use the name of the class in the
docstring for __new__ and __init__, and always use "goto exit" instead of
returning "NULL" for failure to parse (as _new__ and __init__ return ints).
2014-01-22 03:05:49 -08:00
Zachary Ware 071baa63c4 Argument Clinic: make 'destination' directive work. 2014-01-21 23:07:12 -06:00
Larry Hastings 665757847e Improve fix for issue #20300. 2014-01-19 03:01:23 -08:00
Larry Hastings c4fe092bc3 Issue #20300: Fix exception when setting conversion class member "default"
to None.
2014-01-19 02:27:34 -08:00
Larry Hastings b7ccb20423 Issue #20294: Argument Clinic now supports argument parsing for __new__ and
__init__ functions.
2014-01-18 23:50:21 -08:00
Larry Hastings b470575e24 Issue #20299: Argument Clinic custom converters may now change the default
value of c_default and py_default with a class member.
2014-01-18 21:54:15 -08:00
Serhiy Storchaka 49776ef9e7 Use correct C type in byte_converter. 2014-01-19 00:38:36 +02:00
Larry Hastings 4903e00141 Issue #20292: Small bug fix for Argument Clinic supporting format units
for strings with explicit encodings.
2014-01-18 00:26:16 -08: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
Larry Hastings 1abd708681 Issue #20226: Added tests for new features and regressions. 2014-01-16 14:15:03 -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
Georg Brandl aabebde358 Closes #20235: Report file and line on unexpected exceptions in Argument Clinic. 2014-01-16 06:53:54 +01:00
Larry Hastings 4a714d48ad Issue #20268: Argument Clinic now supports cloning the parameters
and return converter from existing functions.
2014-01-14 22:22:41 -08:00
Antoine Pitrou d7fb7919e3 Replace assert with a proper error 2014-01-14 21:02:43 +01:00
Antoine Pitrou cc1d31e09e improve an error message in clinic 2014-01-14 20:52:01 +01: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
Larry Hastings 583baa8fef Issue #20196: Fixed a bug where Argument Clinic did not generate correct
parsing code for functions with positional-only parameters where all arguments
are optional.
2014-01-12 08:49:30 -08:00
Serhiy Storchaka f4c9664a24 Fixed the serve.py script.
The application object must return an iterable yielding bytestrings.
2014-01-11 11:53:13 +02:00
Serhiy Storchaka 02d5db2777 Fixed the serve.py script.
The application object must return an iterable yielding bytestrings.
2014-01-11 11:52:20 +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
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 9026113fd4 Issue #20157: When Argument Clinic renames a parameter because its name
collides with a C keyword, it no longer exposes that rename to PyArg_Parse.
2014-01-07 12:21:08 -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 eb31e9d6ed Issue #20143: The line numbers reported in Argument Clinic errors are
now more accurate.
2014-01-06 11:10:08 -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
Larry Hastings 6d2ea21337 Argument Clinic: fixed test suite, improved howto. 2014-01-05 02:50:45 -08: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
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
Martin v. Löwis c70d4f4d79 Issue #19728: Enable pip installation by default on Windows. 2014-01-02 14:12:30 +01:00
Serhiy Storchaka 8c4f57d1d5 Issue #20046: Locale alias table no longer contains entities which can be
calculated.  Generalized support of the euro modifier.
2013-12-27 00:56:53 +02:00
Serhiy Storchaka e190fac5f9 Issue #20027: Fixed locale aliases for devanagari locales. 2013-12-26 21:21:52 +02:00
Serhiy Storchaka 5eb01530b2 Issue #20027: Fixed locale aliases for devanagari locales. 2013-12-26 21:20:59 +02:00
Serhiy Storchaka a3409489b7 Issue #20033: makelocalealias.py now works with non-ASCII locales and produces
the same result as in 2.x.
2013-12-23 18:56:31 +02:00
Serhiy Storchaka 55c6cc408c Issue #20033: makelocalealias.py now works with non-ASCII locales and produces
the same result as in 2.x.
2013-12-23 18:56:08 +02:00
Benjamin Peterson eaedaeccf2 update Barry's email (#19563) 2013-12-22 19:45:38 -06:00
Benjamin Peterson 8fb007f329 merge 3.3 (#19563) 2013-12-22 19:45:53 -06:00
Christian Heimes cb3558dcc1 Issue #18215: Add script Tools/ssl/test_multiple_versions.py to compile and
run Python's unit tests with multiple versions of OpenSSL.
2013-12-16 14:35:39 +01:00
Zachary Ware 14fff88773 Issue #19788: kill_python(_d).exe is now run as a PreBuildEvent on the
pythoncore sub-project.  This should prevent build errors due a previous
build's python(_d).exe still running.
2013-11-26 16:34:45 -06:00
Zachary Ware bb65b5bf1d Issue #19788: kill_python(_d).exe is now run as a PreBuildEvent on the
pythoncore sub-project.  This should prevent build errors due a previous
build's python(_d).exe still running.
2013-11-26 16:32:59 -06:00
Larry Hastings dc6aaec9e3 Clinic: fix "self converters" with METH_NOARGS functions. 2013-11-24 04:41:57 -08:00
Larry Hastings 2f9a9aaf21 Clinic: Add warning for untested (and unused in CPython!) format units. 2013-11-24 04:23:35 -08:00
Larry Hastings 44e2eaab54 Issue #19674: inspect.signature() now produces a correct signature
for some builtins.
2013-11-23 15:37:55 -08:00
Larry Hastings dcd340eeeb Issue #19358: "make clinic" now runs the Argument Clinic preprocessor
over all CPython source files.
2013-11-23 14:58:45 -08:00
Larry Hastings ebdcb50b8a Issue #19730: Argument Clinic now supports all the existing PyArg
"format units" as legacy converters, as well as two new features:
"self converters" and the "version" directive.
2013-11-23 14:54:00 -08:00
Martin v. Löwis 8d0d369067 Update Tcl/Tk to 8.6.1. 2013-11-23 23:05:27 +01:00
Martin v. Löwis 3ed82c55a8 Package _overlapped. 2013-11-23 22:02:00 +01:00
Serhiy Storchaka 6787a3806e Issue #15204: Deprecated the 'U' mode in file-like objects. 2013-11-23 22:12:06 +02:00
Antoine Pitrou 59b7ff2d43 Undo (hopefully) buildbot failures 2013-11-23 18:22:02 +01:00
Antoine Pitrou 23828f6d8e Undo (hopefully) buildbot failures 2013-11-23 18:20:42 +01:00
Antoine Pitrou b17d2aa552 Issue #19308: fix the gdb plugin on gdbs linked with Python 3 2013-11-23 17:40:36 +01:00
Antoine Pitrou e50240c504 Issue #19308: fix the gdb plugin on gdbs linked with Python 3 2013-11-23 17:40:36 +01:00
Martin v. Löwis baacf4d293 Update xz to 5.0.5. 2013-11-22 19:13:51 +01:00
Martin v. Löwis bc2f0ba6b8 Update SQLite to 3.8.1 on Windows. 2013-11-22 18:36:28 +01:00
Larry Hastings abc716b058 Issue #19474: Argument Clinic now always specifies a default value for
variables in option groups, to prevent "uninitialized value" warnings.
2013-11-20 09:13:52 -08:00
Martin v. Löwis dd7436c613 Issue #19550: Implement Windows installer changes of PEP 453 (ensurepip). 2013-11-19 17:02:36 +01:00
Larry Hastings ed4a1c5703 Argument Clinic: rename "self" to "module" for module-level functions. 2013-11-18 09:32:13 -08:00
Nick Coghlan d0cf0635b3 Close #19406: Initial implementation of ensurepip
Patch by Donald Stufft and Nick Coghlan
2013-11-11 22:11:55 +10:00
Andrew Kuchling 9d5c071060 #1097797: add the original mapping file 2013-11-10 21:46:02 -05:00
Andrew Kuchling 695f07b27b Fix some PEP8-formatting problems in the generated code 2013-11-10 21:45:24 -05:00
Larry Hastings dfcd46769b Issue #19390: Argument Clinic no longer accepts malformed Python and C ids. 2013-10-27 02:49:39 -07:00
Larry Hastings ef3b1fbb2b Two small, quick bugfixes for Argument Clinic. 2013-10-22 23:26:23 -07:00
Larry Hastings 3182680210 Issue #16612: Add "Argument Clinic", a compile-time preprocessor
for C files to generate argument parsing code.  (See PEP 436.)
2013-10-19 00:09:25 -07:00
Benjamin Peterson 94d08d908b upgrade unicode db to 6.3.0 (closes #19221) 2013-10-10 17:24:45 -04:00
Martin v. Löwis a27af80614 Merge 3.3 2013-09-30 16:10:05 +02:00
Martin v. Löwis bf52648ce1 Issue #19106: Touch generated files to be 1s newer than their youngest source. 2013-09-30 16:09:44 +02:00
Benjamin Peterson c3034b14ff merge 3.3 2013-09-27 09:11:31 -04:00
Benjamin Peterson 1f09c663ad let this work with system Python 2.5 2013-09-27 09:11:21 -04:00
Serhiy Storchaka 935349406a Issue #18873: The tokenize module, IDLE, 2to3, and the findnocoding.py script
now detect Python source code encoding only in comment lines.
2013-09-16 23:57:00 +03:00
Serhiy Storchaka dafea85190 Issue #18873: The tokenize module, IDLE, 2to3, and the findnocoding.py script
now detect Python source code encoding only in comment lines.
2013-09-16 23:51:56 +03:00
Serhiy Storchaka c56894d305 Issue #18922: Now The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write
their version strings to stdout, and not to sderr.
2013-09-05 17:44:53 +03:00
Serhiy Storchaka 48e6a8c88a Issue #18743: Fix references to non-existant "StringIO" module
in docstrings and comments.
2013-08-29 11:39:48 +03:00
Serhiy Storchaka 50254c57cd Issue #18743: Fix references to non-existant "StringIO" module
in docstrings and comments.
2013-08-29 11:35:43 +03: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 9d95254bb7 Issue #18772: fix the gdb plugin after the set implementation changes 2013-08-24 21:07:07 +02:00
Andrew Kuchling f3a2e9f937 #18445: update Tools/scripts/README.
- document abitype.py, analyze_dxp.py, get-remote-certificate.py,
  import_diagnostics.py, parse_html5_entities.py.
- remove redemo.py which was moved to Tools/Demo.
- sort list into alphabetical order

Patch by Seydou Dia.
2013-08-18 20:04:34 -04:00
Andrew Kuchling d36b515954 #18445: change permissions on some scripts to executable 2013-08-18 19:48:12 -04:00
Antoine Pitrou 9ed5f27266 Issue #18722: Remove uses of the "register" keyword in C code. 2013-08-13 20:18:52 +02:00
Martin v. Löwis d87c3d3ea4 Issue #16067: Merge with 3.3 2013-08-03 20:12:45 +02:00
Martin v. Löwis 78fa5e38a9 Issue #16067: Add description into MSI file to replace installer's temporary name. 2013-08-03 20:09:42 +02:00
Martin v. Löwis 5284f80268 Issue #18569: The installer now adds .py to the PATHEXT variable
when extensions are registered. Patch by Paul Moore.
2013-08-01 18:31:06 +02:00
Martin v. Löwis 85a4847f07 Add UUID for 3.4. 2013-08-01 17:34:42 +02:00
Terry Jan Reedy db53ad7cf1 Merge with 3.3 2013-07-21 20:58:15 -04:00
Terry Jan Reedy 6e2711b345 Issue #18439: Make patchcheck work on Windows for ACKS, NEWS. 2013-07-21 20:57:44 -04:00
Serhiy Storchaka 8361617fad Issue #18448: Fix a typo in Tools/demo/eiffel.py. 2013-07-16 22:14:03 +03:00
Serhiy Storchaka 6a98fe9edd Issue #18448: Fix a typo in Tools/demo/eiffel.py. 2013-07-16 22:12:03 +03:00
Serhiy Storchaka c9b3f6f5ef Issue #18457: Fixed saving of formulas and complex numbers in Tools/demo/ss1.py.
Useed context managers for file I/O.
Removed out-of-dated code and misleading comments.
2013-07-16 21:58:37 +03:00
Serhiy Storchaka ec7ddd9028 Issue #18457: Fixed saving of formulas and complex numbers in Tools/demo/ss1.py.
Useed context managers for file I/O.
Removed out-of-dated code and misleading comments.
2013-07-16 21:55:36 +03:00