Commit Graph

177 Commits

Author SHA1 Message Date
Zhiming Wang d87b105ca7 bpo-31638: Add compression support to zipapp (GH-3819)
Add optional argument `compressed` to `zipapp.create_archive`, and add
option `--compress` to the command line interface of `zipapp`.
2017-09-29 18:31:52 +01:00
Barry Warsaw 35425d638c bpo-31389 Add an optional `header` argument to pdb.set_trace() (#3438)
* Give pdb.set_trace() an optional `header` argument

* What's new.

* Give pdb.set_trace() an optional `header` argument

* What's new.
2017-09-22 12:29:42 -04:00
Paul Romano 992f613fe6 Fix description in Python 3.7 What's New (#3603) 2017-09-15 20:00:57 +03:00
Eric Snow 93c92f7d1d bpo-31404: Revert "remove modules from Py_InterpreterState (#1638)" (#3565)
PR #1638, for bpo-28411, causes problems in some (very) edge cases. Until that gets sorted out, we're reverting the merge. PR #3506, a fix on top of #1638, is also getting reverted.
2017-09-13 23:46:04 -07:00
Raymond Hettinger 8b57d73639 bpo-28638: Optimize namedtuple() creation time by minimizing use of exec() (#3454)
* Working draft without _source

* Re-use itemgetter() instances

* Speed-up calls to __new__() with a pre-bound tuple.__new__()

* Add note regarding string interning

* Remove unnecessary create function wrappers

* Minor sync-ups with PR-2736.  Mostly formatting and f-strings

* Bring-in qualname/__module fix-ups from PR-2736

* Formally remove the verbose flag and _source attribute

* Restore a test of potentially problematic field names

* Restore kwonly_args test but without the verbose option

* Adopt Inada's idea to reuse the docstrings for the itemgetters

* Neaten-up a bit

* Add news blurb

* Serhiy pointed-out the need for interning

* Jelle noticed as missing f on an f-string

* Add whatsnew entry for feature removal

* Accede to request for dict literals instead keyword arguments

* Leave the method.__module__ attribute pointing the actual location of the code

* Improve variable names and add a micro-optimization for an non-public helper function

* Simplify by in-lining reuse_itemgetter()

* Arrange steps in more logical order

* Save docstring in local cache instead of interning
2017-09-10 10:23:36 -07:00
Nick Coghlan 5a8516701f bpo-31344: Per-frame control of trace events (GH-3417)
f_trace_lines: enable/disable line trace events
f_trace_opcodes: enable/disable opcode trace events

These are intended primarily for testing of the interpreter
itself, as they make it much easier to emulate signals
arriving at unfortunate times.
2017-09-08 10:14:16 +10:00
Antoine Pitrou a6a4dc816d bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
R. David Murray 0f6b9d2306 bpo-14191 Add parse_intermixed_args. (#3319)
This adds support for parsing a command line where options and positionals are intermixed as is common in many unix commands. This is paul.j3's patch with a few tweaks.
2017-09-06 20:25:40 -04:00
Eric Snow 86b7afdfee bpo-28411: Remove "modules" field from Py_InterpreterState. (#1638)
sys.modules is the one true source.
2017-09-04 17:54:09 -06:00
Barry Warsaw 973b901212 What's New for bpo-1198569 (#3303) 2017-09-04 17:29:27 -04:00
Paul Moore 0780bf7578 bpo-31072: Rename the new filter argument for zipapp.create_archive. (#3049)
bpo-31072: Rename the new filter argument for zipapp.create_archive (GH-3049)

* Rename the new argument to "filter"
* Improve tests for the new functionality
* Add a "What's New" entry.
2017-08-26 18:04:12 +01:00
Daniel Himmelstein dadca480c5 Fix typo in 3.7 What's New (GH-3069)
Remove unneeded word `to`.
2017-08-10 18:45:12 -07:00
Utkarsh Upadhyay 8e45318b0d bpo-30302: Update WhatsNew and documentation. (#2929)
* Update 'Porting to .37' section.

* Fix a minor example in the doc.
2017-07-28 14:42:56 +02:00
Segev Finer 9f3bdcb643 bpo-23451: Fix socket deprecation warnings in socketmodule.c (#2318)
* bpo-23451: Fix WSASocket and WSADuplicateSocket deprecation warnings

* bpo-23451: Add backwards compatibility note about socket share/fromshare

* bpo-23451: Fixed `WSAAddressToString`/`WSAStringToAddress` deprecation warnings

* bpo-23451: Use `inet_pton`/`inet_ntop` instead of `WSAAddressToString`/`WSAStringToAddress`

* bpo-23451: Move `HAVE_INET_PTON` from _socket.vcxproj to pyconfig.h

* bpo-23451: Add SUPPRESS_DEPRECATED_CALL to socketmodule.c

* bpo-23451: Add a NEWS.d entry

* bpo-23451: Corrected NEWS.d entry
2017-06-28 13:51:00 -07:00
Steve (Gadget) Barnes 5b8f972e09 bpo-30362 : Add list options to launcher. (#1578)
* bpo-30362 Add list options to launcher.

* bpo-30362 Add list options to help message.

* To avoid possible later conflict with python replaced flags with --launcher-list and --launcher-list-paths

* bpo-30362 Changed flag to -0 as suggested on review.

* bpo-30362: Modified to default to not path for -0, -0p to dispaly path and append * to default

* bpo-30362: Modified to display list on required version not found.

* bpo-30362 add --list and --list-paths added back in following review by paul.moore

* bpo-30362 Cleaner handing of -0 & -0p by not calling exit directly per review by @zooba

* bpo-30362: Tidy up and add news & what's new

Removed commented out line of code in PC/launcher.c.
Added the results of using blurb to add details of bpo-30362 & bpo-30291.
Updated Doc/whatsnew/3.7.rst to add a Windows only section covering both tickets.

* bpo-30362 Resolve conflict in Doc/whatsnew/3.7.rst

* bpo-30362:Address Whitespace Issue in Doc\whatsnew\3.7.rst

* Shorten NEWS message for bpo-30362

* Shorten NEWS item for bpo-30291
2017-06-28 12:14:52 -07:00
Serhiy Storchaka e613e6add5 bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). (#2285)
Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters.
2017-06-27 16:03:14 +03:00
Walter Dörwald f5c58c781a bpo-30733: Fix typos in "What's New" entry (GH-2414) 2017-06-26 18:31:52 +02:00
Victor Stinner f87b85f808 bpo-21071: struct.Struct.format type is now str (#845) 2017-06-23 15:11:12 +02:00
Benjamin Peterson 279a96206f bpo-30736: upgrade to Unicode 10.0 (#2344)
Straightforward. While we're at it, though, strip trailing whitespace from generated tables.
2017-06-22 22:31:08 -07:00
Daniel Porteous 77f68e3618 Fix typo in 3.7 whatsnew (#2308) 2017-06-20 20:21:48 -04:00
Nick Coghlan eb81795d7d bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag (GH-2260)
- removes PY_WARN_ON_C_LOCALE build time flag
- locale coercion and compatibility warnings are now always compiled
  in, but are off by default
- adds PYTHONCOERCECLOCALE=warn runtime option to aid in
  debugging potentially locale related compatibility problems

Due to not-yet-resolved test failures on *BSD systems (including
Mac OS X), this also temporarily disables UTF-8 as a locale coercion
target, and skips testing the interpreter's behavior in the POSIX locale.
2017-06-18 12:29:42 +10:00
Zachary Ware cb8c0485ab bpo-30450: Add NEWS and whatsnew (GH-2236) 2017-06-15 22:34:59 -05:00
Sanyam Khurana b9c3da5c89 bpo-24744: Raises error in pkgutil.walk_packages if path is str (#1926)
bpo-24744: Raise error in pkgutil.walk_packages if path is str

Previously an empty result list was accidentallly returned, since the
code iterated over the string as if it were the expected list of paths,
and of course found nothing.
2017-06-13 13:11:14 -04:00
Serhiy Storchaka 1efbf92e90 bpo-11822: Improve disassembly to show embedded code objects. (#1844)
The depth argument limits recursion.
2017-06-11 14:09:39 +03:00
Nick Coghlan 6ea4186de3 bpo-28180: Implementation for PEP 538 (#659)
- new PYTHONCOERCECLOCALE config setting
- coerces legacy C locale to C.UTF-8, C.utf8 or UTF-8 by default
- always uses C.UTF-8 on Android
- uses `surrogateescape` on stdin and stdout in the coercion
  target locales
- configure option to disable locale coercion at build time
- configure option to disable C locale warning at build time
2017-06-11 13:16:15 +10:00
Giampaolo Rodola fbfaa6fd57 bpo-30014: make poll-like selector's modify() method faster (#1030)
* #30014: make selectors.DefaultSelector.modify() faster by relying on selector's modify() method instead of un/register()ing the fd

* #30014: add unit test

* speedup poll/epoll/devpoll modify() method by using internal modify() call

* update doc

* address PR comments

* update NEWS entries

* use != instead of 'is not'
2017-06-09 22:20:41 +02:00
Oz N Tiram 8b7a4cc40e bpo-30095: Make CSS classes used by calendar.HTMLCalendar customizable (GH-1439)
Several class attributes have been added to calendar.HTMLCalendar that allow customization of the CSS classes used in the resulting HTML. This can be done by subclasses HTMLCalendar and overwriting those class attributes (Patch by Oz Tiram).
2017-06-06 11:35:59 +02:00
Antoine Pitrou f7ecfac0c1 Doc nits for bpo-16500 (#1841)
* Doc nits for bpo-16500

* Fix more references
2017-05-28 11:35:14 +02:00
Stéphane Wirtel a17a2f52c4 bpo-28707: Add the directory parameter to http.server.SimpleHTTPRequestHandler and http.server module (#1776)
* bpo-28707: call the constructor of SimpleHTTPRequestHandler in the test with a mock object

* bpo-28707: Add the directory parameter to http.server.SimpleHTTPRequestHandler and http.server module
2017-05-24 00:29:06 -07:00
Serhiy Storchaka edef358ed6 bpo-29196: Removed old-deprecated classes Plist, Dict and _InternalDict (#488)
in the plistlib module.  Dict values in the result of functions
readPlist() and readPlistFromBytes() are now exact dicts.
2017-05-15 13:21:31 +03:00
Victor Stinner 89a1c93f04 bpo-9850: Deprecate the macpath module (#1540)
Co-Authored-By: Chi Hsuan Yen <yan12125@gmail.com>.
2017-05-15 11:01:21 +02:00
Serhiy Storchaka 7e19dbc92e bpo-28974: `object.__format__(x, '')` is now equivalent to `str(x)` (#506)
rather than `format(str(self), '')`.
2017-05-13 12:40:52 +03:00
Serhiy Storchaka 6d336a0279 bpo-30285: Optimize case-insensitive matching and searching (#1482)
of regular expressions.
2017-05-09 23:37:14 +03:00
Serhiy Storchaka f93234bb8a bpo-30024: Circular imports involving absolute imports with binding (#1264)
a submodule to a name are now supported.
2017-05-09 22:31:05 +03:00
Pierre Quentel cc3fa204d3 bpo-29979: Rewrite cgi.parse_multipart to make it consistent with FieldStorage (#991) 2017-05-08 05:08:34 -07:00
Xiang Zhang 13f1f423fa bpo-30103: Allow Uuencode in Python using backtick as zero instead of space (#1326) 2017-05-03 11:16:21 +08:00
Jelle Zijlstra 2e624690bd bpo-29679: Implement @contextlib.asynccontextmanager (#360) 2017-04-30 18:25:58 -07:00
Ryan Gonzalez f9f87f0934 bpo-11913: Add README.rst to the distutils standard READMEs list (#563) 2017-04-14 11:00:25 +02:00
Mark Dickinson a0ce375e10 bpo-29962: add math.remainder (#950)
* Implement math.remainder.

* Fix markup for arguments; use double spaces after period.

* Mark up function reference in what's new entry.

* Add comment explaining the calculation in the final branch.

* Fix out-of-order entry in whatsnew.

* Add comment explaining why it's good enough to compare m with c, in spite of possible rounding error.
2017-04-05 18:34:27 +01:00
Pierre Quentel 351adda54b bpo-29654 : Support If-Modified-Since HTTP header (browser cache) (#298)
Return 304 response if file was not modified.
2017-04-02 13:26:12 +03:00
Serhiy Storchaka ea720fe7e9 bpo-25996: Added support of file descriptors in os.scandir() on Unix. (#502)
os.fwalk() is sped up by 2 times by using os.scandir().
2017-03-30 09:12:31 +03:00
Serhiy Storchaka 0a58f72762 bpo-24821: Fixed the slowing down to 25 times in the searching of some (#505)
unlucky Unicode characters.
2017-03-30 09:11:10 +03:00
Garvit Khatri 1cf93a76c2 bpo-10379: add 'monetary' to format_string, deprecate format
Add the 'monetary' parameter to format_string so that all
uses of format can be converted to format_string.  Adjust
the documentation accordingly, and add a deprecation
warning when format is used.
2017-03-28 11:43:38 -04:00
Serhiy Storchaka e304e33c16 bpo-19930: The mode argument of os.makedirs() no longer affects the file (#799)
permission bits of newly-created intermediate-level directories.
2017-03-24 13:27:42 +02:00
Serhiy Storchaka aefa7ebf0f bpo-6532: Make the thread id an unsigned integer. (#781)
* bpo-6532: Make the thread id an unsigned integer.

From C API side the type of results of PyThread_start_new_thread() and
PyThread_get_thread_ident(), the id parameter of
PyThreadState_SetAsyncExc(), and the thread_id field of PyThreadState
changed from "long" to "unsigned long".

* Restore a check in thread_get_ident().
2017-03-23 14:48:39 +01:00
Serhiy Storchaka f6595983e0 bpo-28692: Deprecate using non-integer value for selecting a plural form in gettext. (#507) 2017-03-12 13:15:01 +02:00
Serhiy Storchaka 97553fdf9d bpo-26121: Use C library implementation for math functions: (#515)
* bpo-26121: Use C library implementation for math functions:
tgamma(), lgamma(), erf() and erfc().

* Don't use tgamma() and lgamma() from libc on OS X.
2017-03-11 21:37:16 +00:00
Serhiy Storchaka 8f6b344d36 bpo-28682: Added support for bytes paths in os.fwalk(). (#489) 2017-03-07 14:33:21 +02:00
Serhiy Storchaka 2e5642422f bpo-29695: Remove bad keyword parameters in int(), bool(), float(), list() and tuple(). (#518) 2017-03-06 17:01:06 +02:00
Serhiy Storchaka 58d23e6806 bpo-29695: Deprecated using bad named keyword arguments in builtings: (#486)
int(), bool(), float(), list() and tuple().  Specify the value as a
positional argument instead.
2017-03-06 00:53:39 +02:00
Xiang Zhang 267b9d2fa8 bpo-7769: enable xmlrpc.server.SimpleXMLRPCDispatcher.register_function used as decorator (GH-231) 2017-02-28 17:12:52 +08:00
Berker Peksag a862812565 Use "Contributed by ..." style in whatsnew/3.7.rst (#339) 2017-02-27 17:43:27 +03:00
Ratnadeep Debnath 21024f0662 bpo-16285: Update urllib quoting to RFC 3986 (#173)
* bpo-16285: Update urllib quoting to RFC 3986

urllib.parse.quote is now based on RFC 3986, and hence
includes `'~'` in the set of characters that is not escaped
by default.

Patch by Christian Theune and Ratnadeep Debnath.
2017-02-25 19:00:28 +10:00
INADA Naoki cb41b2766d bpo-29463: Add docstring field to some AST nodes. (#46)
* bpo-29463: Add docstring field to some AST nodes.

ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring
field for now.  It was first statement of there body.

* fix document.  thanks travis!

* doc fixes
2017-02-22 16:31:59 +01:00
Matthias Bussonnier 1bc156430b bpo-29546: Improve from-import error message with location (#103)
bpo-29546: Improve from-import error message with location
2017-02-22 10:06:50 -05:00
Matthias Bussonnier 1d4601c2c6 bpo-29576: add explicit deprecation for importlib.abc.find_loader() and find_module() (GH-32) 2017-02-15 18:00:32 -08:00
Serhiy Storchaka 6e08baf12d Issue #27867: Function PySlice_GetIndicesEx() is deprecated and replaced with
a macro if Py_LIMITED_API is not set or set to the value between 0x03050400
and 0x03060000 (not including) or 0x03060100 or higher.  Added functions
PySlice_Unpack() and PySlice_AdjustIndices().
2017-01-25 13:27:44 +02:00
Martin Panter 91a8866dc1 Fix grammar in doc string, RST markup 2017-01-24 00:30:06 +00:00
Serhiy Storchaka 2a404b63d4 Issue #28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8()
is now of type "const char *" rather of "char *".
2017-01-22 23:07:07 +02:00
Mark Dickinson 5e65cd39df Issue #29282: Backed out changeset b33012ef1417 2017-01-21 13:10:52 +00:00
Mark Dickinson d1b230e48b Issue #29282: add fused multiply-add function, math.fma. 2017-01-21 12:35:30 +00:00
INADA Naoki 015bce64b3 Issue #26110: Add document for LOAD_METHOD and CALL_METHOD opcode.
Changed stack layout bit for "easy to explain."
2017-01-16 17:23:30 +09:00
Serhiy Storchaka b2d6179d55 Document Python versions in which the removed features were deprecated. 2017-01-13 21:14:40 +02:00
Serhiy Storchaka 9ed707eb4c Issue #29197: Removed deprecated function ntpath.splitunc(). 2017-01-13 20:55:05 +02:00
Serhiy Storchaka 4f76fb16b7 Issue #29210: Removed support of deprecated argument "exclude" in
tarfile.TarFile.add().
2017-01-13 13:25:24 +02:00
Serhiy Storchaka cc283378d6 Issue #29192: Removed deprecated features in the http.cookies module. 2017-01-13 09:23:15 +02:00
Serhiy Storchaka 009b0a1fac Issue #29193: A format string argument for string.Formatter.format()
is now positional-only.
2017-01-13 09:10:51 +02:00
Serhiy Storchaka d9c956fb23 Issue #20804: The unittest.mock.sentinel attributes now preserve their
identity when they are copied or pickled.
2017-01-11 20:13:03 +02:00
Serhiy Storchaka dd1da7f74a Issue #28927: bytes.fromhex() and bytearray.fromhex() now ignore all ASCII
whitespace, not only spaces.  Patch by Robert Xiao.
2016-12-19 18:51:37 +02:00
Serhiy Storchaka 5bb8b9134b Issue #18896: Python function can now have more than 255 parameters.
collections.namedtuple() now supports tuples with more than 255 elements.
2016-12-16 19:19:02 +02:00
Yury Selivanov f2392133eb Issue #26110: Add LOAD_METHOD/CALL_METHOD opcodes.
Special thanks to INADA Naoki for pushing the patch through
the last mile, Serhiy Storchaka for reviewing the code, and to
Victor Stinner for suggesting the idea (originally implemented
in the PyPy project).
2016-12-13 19:03:51 -05:00
Serhiy Storchaka ff3dbe9141 Merge documentation for issue #27030 from 3.6. 2016-12-06 19:25:19 +02:00
Serhiy Storchaka 214678e44b Issue #12844: More than 255 arguments can now be passed to a function. 2016-11-28 10:52:05 +02:00
Serhiy Storchaka 007d7ff73f Issue #28761: The fields name and doc of structures PyMemberDef, PyGetSetDef,
PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase are now of
type "const char *" rather of "char *".
2016-11-22 07:58:08 +02:00
Steve Dower 3e7d93dc70 Issue #28251: Improvements to help manuals on Windows. 2016-09-22 17:11:53 -07:00
Zachary Ware f40d4ddff3 Closes #27979: Remove bundled copy of libffi
An installed copy of libffi is now required for building _ctypes on
any platform but OSX and Windows.
2016-09-17 01:25:24 -05:00
Ned Deily 4829bc6619 Bump to 3.7.0a0 2016-09-12 17:29:04 -04:00