Commit Graph

41567 Commits

Author SHA1 Message Date
Benjamin Peterson cb90f26122 fix subprocess on Windows (#391) 2017-03-02 00:03:41 -08:00
Benjamin Peterson afbb5d1cbd require uuid_generate_time_safe for all tests of it (#390)
The way mocking is written in these tests, we need to have the underlying function around.
2017-03-01 23:34:19 -08:00
Benjamin Peterson f52279257e allow path-like objects to be cwd on windows (#389)
#157 added the test, but it's currently (correctly) broken on windows.
2017-03-01 23:04:03 -08:00
Benjamin Peterson 0b8432538a correct check for _uuid_generate_time (#388)
If ctypes is not available, _uuid_generate_time will be None not its restype attribute.
2017-03-01 21:53:14 -08:00
Benjamin Peterson 1e68716fd5 Revert "make the locale_flag fallback code work again (#375)" (#387)
This reverts commit 43f5df5bfa.
2017-03-01 21:53:00 -08:00
Petr Motejlek 3c6314c08d bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (#260)
(or any other exception) to exception(s) raised in the dispatched methods.
Patch by Petr Motejlek.
2017-03-01 19:21:28 +02:00
Benjamin Peterson 43f5df5bfa make the locale_flag fallback code work again (#375) 2017-02-28 23:59:12 -08:00
Benjamin Peterson 371963daba use select instead of _opcode for import test (#372) 2017-02-28 23:14:09 -08:00
Benjamin Peterson bee93f2d04 weaken test_from_import_missing_attr_has_name_and_path regular expression (#371)
Windows uses backslashes for separators.
2017-02-28 22:35:00 -08:00
amosonn 680e20beee Clarify exception handler scope in contextlib
Moved explicit raise from inside try to try...else.
2017-03-01 16:18:27 +10: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
Xiang Zhang ecf39bbc97 bpo-29661: fix contradiction in timeit.Timer.autorange's docstring (GH-331) 2017-02-28 11:06:07 +08:00
Xiang Zhang f3a9faba4b bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-236) 2017-02-27 11:01:30 +08:00
Sayan Chowdhury d5c11f7ace bpo-28624: Add a test that checks that cwd parameter of Popen() accepts PathLike objects (#157) 2017-02-26 20:06:10 +03:00
Berker Peksag 4a926caf8e bpo-28518: Start a transaction implicitly before a DML statement (#245)
Patch by Aviv Palivoda.
2017-02-26 18:22:38 +03:00
INADA Naoki 5dc33eea53 bpo-29110: add test for Aifc_write. (GH-293)
follow up of GH-162
2017-02-26 21:11:58 +09:00
Berker Peksag 5aa3856b4f bpo-28961: Address my comments from earlier code review (#305) 2017-02-26 15:04:11 +03:00
Subhendu Ghosh ae160bba20 bpo-26128: Added __init__to subprocess.STARTUPINFO (#171)
The Windows-specific subprocess.STARTUPINFO class now accepts
keyword-only arguments to its constructor to set the various
data attributes.

Patch by Subhendu Ghosh.
2017-02-26 00:59:05 +10: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
Nick Coghlan 140792bd51 bpo-29644: suppress subprocess output from webbrowser (#289)
When checking for the default X web browser, xdg-settings
may emit messages on stderr if some components (such as
kreadconfig5) are unavailable. These messages aren't of
interest to Python, so we just ignore them.
2017-02-25 18:40:07 +10:00
Nick Coghlan 56a8eccc43 bpo-24241: Add dedicated webbrowser.register test case (#288) 2017-02-25 18:14:07 +10:00
David Steele e3ce69522f bpo-24241: Improve preferred webbrowser handling (#85)
- Add 'preferred' argument to webbrowser.register
- Use xdg-settings to specify preferred X browser

The first change replaces the existing undocumented tri-state
'try_order' parameter with the documented boolean keyword-only
'preferred' parameter. Setting it to True places the browser at the
front of the list, preferring it as the return to a subsequent get() call.

The second change adds a private `_os_preferred_browser` setting
and then uses that to make the default browser reported by
`xdg-settings` first in the try list when running under X (or
another environment that sets the `DISPLAY` variable).
This avoids the problem where the first entry in the tryorder
queue otherwise defaults to xdg-open, which doesn't support
the "new window" option.
2017-02-25 14:47:38 +10:00
Ivan Levkivskyi 365cb5bb90 bpo-28556: Fix regression that sneaked into recent typing updates (GH-270) 2017-02-24 09:28:26 -08:00
Matthias Bussonnier 6059ce45aa bpo-27788 : synchronise platform.py version number (#246)
Was bumped in the docstring by b9f4feab1b
but not in `__version__`
2017-02-24 11:47:34 +01:00
Matthias Bussonnier 41cea70aa3 bpo-29637: clean docstring only if not None (GH-267) 2017-02-24 15:44:19 +09:00
Ivan Levkivskyi abb3b8ad94 Update to typing: treat subscripted generics as proxies (#265) 2017-02-23 19:03:28 -08:00
INADA Naoki 4c78c527d2 bpo-29622: Make AST constructor to accept less than enough number of positional arguments (GH-249)
bpo-29463 added optional "docstring" field to 4 AST types.
While it is optional, it breaks backward compatibility because AST constructor
requires number of positional argument is same to number of fields.

AST types accepts empty arguments, and incomplete keyword arguments.
But it's not big problem because field can be filled after creation, and checked when compiling.
So stop requiring complete set of fields for positional arguments too.
2017-02-24 02:48:17 +09:00
Arne de Laat 324c5d8ca6 bpo-28911: Clarify the behaviour of assert_called_once_with. (#251) 2017-02-23 15:57:25 +01:00
Martijn Pieters d7e64337ef bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations (#51)
When you use `'%s' % SubClassOfStr()`, where `SubClassOfStr.__rmod__` exists, the reverse operation is ignored as normally such string formatting operations use the `PyUnicode_Format()` fast path. This patch tests for subclasses of `str` first and picks the slow path in that case.

Patch by Martijn Pieters.
2017-02-23 15:38:04 +02: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
Anthony Zhang 03f68b60e1 bpo-29110: Fix file object leak in `aifc.open` when given invalid AIFF file. (GH-162) 2017-02-22 16:23:30 +09:00
Matthias Bussonnier 8fb1f6e039 bpo-29554: Improve docs for pstat module and profile. (#88)
Clarify that methods take a string which is interpreted as a regex,
not a regex object.

Also clarify what the old `-1`, `0`, `1` and `2` options were.
2017-02-21 08:30:00 +03:00
Mark Dickinson 112ec38c15 bpo-29602: fix signed zero handling in complex constructor. (#203)
* Fix incorrect handling of signed zeros for complex-related classes.

* Add Misc/NEWS entry.
2017-02-20 20:28:15 +00:00
Serhiy Storchaka 9639e4ab6d bpo-29532: Altering a kwarg dictionary passed to functools.partial() (#190)
no longer affects a partial object after creation.
2017-02-20 14:04:30 +02:00
Vinay Sajip a86339b83f Fixed bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64. (#168)
* Fixed bpo-29565: Corrected ctypes passing of large structs by value.

Added code and test to check that when a structure passed by value
is large enough to need to be passed by reference, a copy of the
original structure is passed. The callee updates the passed-in value,
and the test verifies that the caller's copy is unchanged. A similar
change was also added to the test added for bpo-20160 (that test was
passing, but the changes should guard against regressions).

* Reverted unintended whitespace changes.
2017-02-20 00:16:33 +00:00
Barry Warsaw 8c130d7f81 bpo-22807: Expose platform UUID generation safety information. (#138)
bpo-22807: Expose platform UUID generation safety information.
2017-02-18 15:45:49 -05:00
Nick Coghlan ace5c0fdd9 bpo-29571: Use correct locale encoding in test_re (#149)
``local.getlocale(locale.LC_CTYPE)`` and
``locale.getpreferredencoding(False)`` may give different answers
in some cases (such as the ``en_IN`` locale).

``re.LOCALE`` uses the latter, so update the test case to match.
2017-02-18 15:01:22 +05:30
Senthil Kumaran b2ee40ed9c Change some mercurial/ hg.python.org references. (#8) 2017-02-16 07:18:42 -08:00
matejcik 9764c151c5 update test_socket AEAD test for kernel 4.9 and up (#133) 2017-02-16 14:41:31 +01: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
Matthias Bussonnier bc4bed4405 bpo-29546: Set 'path' on ImportError for ``from ... import ...`` (GH-91) 2017-02-14 16:05:25 -08:00
Andrew Nester 6d1dece06d Fixed #29534 - _decimal difference with _pydecimal (#65) 2017-02-14 18:22:55 +00:00
Ivan Levkivskyi b692dc8475 bpo-28556: Various updates to typing (#28)
various updates from upstream python/typing repo:

- Added typing.Counter and typing.ChainMap generics
- More flexible typing.NamedTuple
- Improved generic ABC caching
- More tests
- Bugfixes
- Other updates

* Add Misc/NEWS entry

* Add issue number
2017-02-13 13:50:14 -08:00
MRMillon baf7bb30a0 getpass: update docstrings (#49)
EasyDialogs was removed in 3.x. fallback_getpass will always be the answer here.
ff47a133e1
2017-02-12 23:10:48 +01:00
Nathaniel J. Smith af88e7eda4 bpo-27122: Fix comment to point to correct issue number (#47)
It took me quite a bit to figure out what this was referring to,
since the given issue number is wrong, and the original commit
message I found through git blame lists a different, also wrong
issue number... see https://bugs.python.org/issue27122#msg279449
2017-02-12 14:37:24 +03:00
Victor Stinner 109a9fe796 Merge 3.6 2017-02-10 12:38:02 +01:00
Victor Stinner 2a35c939cc Fix test_datetime on Windows
Issue #29100: On Windows, datetime.datetime.fromtimestamp(min_ts) fails with an
OSError in test_timestamp_limits().
2017-02-10 12:37:21 +01:00
Victor Stinner 07547cdad3 Merge 3.6 2017-02-10 11:45:28 +01:00
Victor Stinner 6f37e3645d Fix test_datetime on system with 32-bit time_t
Issue #29100: Catch OverflowError in the new test_timestamp_limits() test.
2017-02-10 11:45:14 +01:00