Commit Graph

100439 Commits

Author SHA1 Message Date
Terry Jan Reedy 27288de085 bpo-30928: Update idlelib/NEWS.txt to 2017 Oct 17. (#4025) 2017-10-17 19:02:49 -04:00
Terry Jan Reedy e2e42274ee bpo-13802: Use non-Latin characters in IDLE's Font settings sample. (#3960)
Even if one selects a font that defines a limited subset of the unicode
Basic Multilingual Plane, tcl/tk will use other fonts that define a
character. The expanded example give users of non-Latin characters
a better idea of what they might see in the IDLE shell and editors.

To make room for the expanded sample, frames on the Font tab are
re-arranged. The Font/Tabs help explains a bit about the additions.
2017-10-17 18:56:16 -04:00
Victor Stinner 884d13a55f time.clock() now emits a DeprecationWarning (GH-4020)
bpo-31803: time.clock() and time.get_clock_info('clock') now emit a
DeprecationWarning warning.

Replace time.clock() with time.perf_counter() in tests and demos.

Remove also hasattr(time, 'monotonic') in test_time since time.monotonic()
is now always available since Python 3.5.
2017-10-17 14:46:45 -07:00
Zane Bitter de86073a76 bpo-28603: Fix formatting tracebacks for unhashable exceptions (#4014) 2017-10-18 00:29:39 +03:00
Barry Warsaw 191e313820 bpo-31799: Make module.__spec__ more discoverable (#4010)
bpo-31799: Make module.__spec__ more discoverable
2017-10-17 15:52:38 -04:00
Riccardo Coccioli 6cfa927ceb bpo-31334: Fix timeout in select.poll.poll() (GH-3277)
Always pass -1, or INFTIM where defined, to the poll() system call when
a negative timeout is passed to the poll.poll([timeout]) method in the
select module. Various OSes throw an error with arbitrary negative
values.
2017-10-17 12:45:07 -07:00
Pablo Galindo 2c15b29aea bpo-31786: Make functions in the select module blocking when timeout is a small negative value. (#4003) 2017-10-17 17:14:41 +03:00
Mario Corchero 552be9d7e6 bpo-30541: Add new method to seal mocks (GH61923)
The new method allows the developer to control when to stop the
feature of mocks that automagically creates new mocks when accessing
an attribute that was not declared before

Signed-off-by: Mario Corchero <mariocj89@gmail.com>
2017-10-17 04:35:11 -07:00
Ned Deily 2bd37c227e post 3.7.0a2 development 2017-10-17 02:10:44 -04:00
Ned Deily f7ac4fe52a Bump to 3.7.0a2 2017-10-16 23:50:50 -04:00
Ned Deily c730223d18 Update NEWS and topics for 3.7.0a2 2017-10-16 23:41:55 -04:00
Łukasz Langa c30b55b96c bpo-31558: Update NEWS and ACKS (#4013) 2017-10-16 14:39:08 -07:00
brainfvck c75edabbb6 bpo-31558: Add gc.freeze() (#3705)
Freeze all the objects tracked by gc - move them to a permanent generation
and ignore all the future collections. This can be used before a POSIX
fork() call to make the gc copy-on-write friendly or to speed up collection.
2017-10-16 12:49:41 -07:00
Victor Stinner bdaeb7d237 bpo-31773: _PyTime_GetPerfCounter() uses _PyTime_t (GH-3983)
* Rewrite win_perf_counter() to only use integers internally.
* Add _PyTime_MulDiv() which compute "ticks * mul / div"
  in two parts (int part and remaining) to prevent integer overflow.
* Clock frequency is checked at initialization for integer overflow.
* Enhance also pymonotonic() to reduce the precision loss on macOS
  (mach_absolute_time() clock).
2017-10-16 08:44:31 -07:00
Pablo Galindo 0df19055c9 bpo-31776: Missing "raise from None" in Lib/xml/etree/ElementPath.py (#3978) 2017-10-16 11:24:22 +03:00
Serhiy Storchaka 676db4bbf2 bpo-31792: Restore os.environ in test_buffer when import numpy. (#4007) 2017-10-16 10:38:14 +03:00
Semen Zhydenko 1295e11d39 completly -> completely (#3999) (closes bpo-31788) 2017-10-15 12:28:31 -07:00
vyas45 1b9e76ed3a bpo-31754: Fix type of 'itemsize' in PyBuffer_FillContiguousStrides (GH-3993) 2017-10-15 10:31:36 +03:00
Dargor 28773ca7a7 bpo-31780: Fix incorrect error message for ',x', ',b', ',o' specs (#4002)
Patch by Pablo.
2017-10-14 23:41:13 -04:00
Terry Jan Reedy 620f70eed6 bpo-25588: Document autotest in idle_test/README.txt. (#4000)
Follow-up to Victor's patch that enabled autotest to run in IDLE's Shell.
2017-10-14 21:31:14 -04:00
Raymond Hettinger 8c26a34f93 bpo-31757: Make Fibonacci examples consistent (#3991) 2017-10-14 07:36:08 -07:00
INADA Naoki 073150db39 bpo-31672: doc: Remove one sentence from library/string.rst (GH-3990)
This sentence is removed while backporting to 3.6 branch.
See https://github.com/python/cpython/pull/3982#discussion_r144555768
2017-10-14 21:22:41 +09:00
Serhiy Storchaka cd195e2a7a bpo-31714: Improved regular expression documentation. (#3907) 2017-10-14 11:14:26 +03:00
Victor Stinner ef611c96ea bpo-30807: signal.setitimer() now uses _PyTime API (GH-3865)
The _PyTime API handles detects overflow and is well tested.

Document that the signal will only be sent once if internal is equal
to zero.
2017-10-13 13:49:43 -07:00
Victor Stinner a505ecdc50 bpo-31676: Fix test_imp.test_load_source() side effect (#3871)
test_load_source() now replaces the current __name__ module with a
temporary module to prevent side effects.
2017-10-13 13:47:49 -07:00
Victor Stinner a99121526a os.startfile(): add a C comment on security (#3877)
LoadLibrary("SHELL32") is not vulnerable to DLL hijacking.
2017-10-13 13:46:57 -07:00
Victor Stinner ccef823939 bpo-25588: Fix regrtest when run inside IDLE (#3962)
When regrtest in run inside IDLE, sys.stdout and sys.stderr are not
TextIOWrapper objects and have no file descriptor associated:
sys.stderr.fileno() raises io.UnsupportedOperation.

Disable faulthandler and don't replace sys.stdout in that case.
2017-10-13 12:59:12 -07:00
Berker Peksag 7f58097083 bpo-28647: Update -u documentation after bpo-30404 (GH-3961) 2017-10-13 15:16:31 +03:00
INADA Naoki b22273ec5d bpo-31672: Fix string.Template accidentally matched non-ASCII identifiers (GH-3872)
Pattern `[a-z]` with `IGNORECASE` flag can match to some non-ASCII characters.

Straightforward solution for this is using `IGNORECASE | ASCII` flag.
But users may subclass `Template` and override only `idpattern`. So we want to
avoid changing `Template.flags`.

So this commit uses local flag `-i` for `idpattern` and change `[a-z]` to `[a-zA-Z]`.
2017-10-13 16:02:23 +09:00
Berker Peksag 9255104499 Improve test suite customization example (GH-3967)
Reported by John Gamboa on docs@p.o at
https://mail.python.org/pipermail/docs/2017-June/031942.html
2017-10-13 06:41:57 +03:00
Ned Deily 6129250b74 Exclude non-default VENVDIR in Doc builds (#3974) 2017-10-12 16:04:57 -04:00
Serhiy Storchaka de07210077 bpo-30058: Fixed buffer overflow in select.kqueue.control(). (#1095) 2017-10-12 22:17:46 +03:00
Ned Deily b7cbfe49e3 bpo-31766: restore 3.5 to docs version switchers (#3969) 2017-10-12 14:08:43 -04:00
Éric Araujo 03b9537dc5 bpo-31567: more decorator markup fixes in docs (GH-3959) (#3966) 2017-10-12 12:28:55 -04:00
Victor Stinner cba9a0c6de bpo-31773: time.perf_counter() uses again double (GH-3964)
time.clock() and time.perf_counter() now use again C double
internally.

Remove also _PyTime_GetWinPerfCounterWithInfo(): use
_PyTime_GetPerfCounterDoubleWithInfo() instead on Windows.
2017-10-12 08:51:56 -07:00
Daisuke Miyakawa 0e61e67a57 bpo-31567: add or fix decorator markup in docs (#3959) 2017-10-12 10:39:43 -04:00
Victor Stinner 277c84067f Cleanup pytime.c (#3955)
* Move _PyTime_overflow() at the top
* Move assertion on numerator into _PyTime_ObjectToDenominator()
* PEP 7: add { ... } to if blocks
2017-10-11 08:11:38 -07:00
Cheryl Sabella 703ff381ff bpo-28157: Improvements for the time module documentation (GH-928)
* Separated functions and constants descriptions in sections.
* Added a note about the limitations of timezone constants.
* Removed redundant lists from the module docstring.
2017-10-11 16:29:14 +03:00
Brad Smith eeb5ffd54e bpo-31537: Update readline documentation example. (GH-3925)
Change the code example from using `get_history_length` to `get_current_history_length`.
2017-10-10 14:52:58 -07:00
Oren Milman 39ecb9c71b bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element.text and Element.tail (#3924) 2017-10-10 23:26:24 +03:00
Oren Milman 93c5a5df8e bpo-31740: Prevent refleaks when sqlite3.Connection.__init__() is called more than once (GH-3944) 2017-10-10 12:27:46 -07:00
Victor Stinner a997c7b434 bpo-31415: Add _PyTime_GetPerfCounter() and use it for -X importtime (#3936)
* Add _PyTime_GetPerfCounter()
* Use _PyTime_GetPerfCounter() for -X importtime
2017-10-10 02:51:50 -07:00
Ned Deily 14aa00b519 Allow configure to handle PATH elements with spaces (#3935) 2017-10-09 13:53:27 -04:00
Victor Stinner 6e3d6b5dc2 bpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929)
bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM
exceptions.
2017-10-09 09:52:32 -07:00
Oren Milman c0cabc23bb bpo-31723: Fix refleaks when zipimporter.__init__() is called more than once (GH-3919) 2017-10-09 08:06:19 -07:00
Serhiy Storchaka 4d3f084c03 bpo-27867: Add a porting guide for PySlice_GetIndicesEx(). (#1973) 2017-10-08 12:53:34 +03:00
Oren Milman 0ccc0f6c74 bpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() always return a list (#3840) 2017-10-08 11:17:46 +03:00
Serhiy Storchaka f07e2b64df bpo-31642: Restore blocking "from" import by setting None in sys.modules. (#3834) 2017-10-08 10:44:10 +03:00
Zachary Ware 73ffd3f203 bpo-31724: Skip test_xmlrpc_net (GH-3921)
With the upgrade of buildbot.python.org from Buildbot 0.8.x to 0.9.x,
the xmlrpc interface has been removed.  This test is now skipped until
it can be rewritten to query a suitable substitute.
2017-10-08 01:31:23 -05:00
Serhiy Storchaka 79ba471488 bpo-31655: Validate keyword names in SimpleNamespace constructor. (#3909) 2017-10-07 22:59:35 +03:00