Commit Graph

92976 Commits

Author SHA1 Message Date
Brett Cannon 3bf1d87bbd Fix a typo in a code example 2016-01-22 14:03:27 -08:00
Victor Stinner bf980797af Merge 3.5 (i18n doc, issue #25907) 2016-01-22 18:00:31 +01:00
Victor Stinner 875f29aa69 doc: i18n HTML templates
Issue #25907: Use {% trans %} tags in HTML templates to ease the translation of
the documentation. The tag comes from Jinja templating system, used by Sphinx.

Patch written by Julien Palard.
2016-01-22 18:00:05 +01:00
Victor Stinner fd9ccaea03 Null merge 3.5 (change already applied to default) 2016-01-22 15:59:02 +01:00
Victor Stinner 5a701f0304 Issue #25876: Fix also test_set() of test_gdb when -E command line is used 2016-01-22 15:04:27 +01:00
Victor Stinner 22756f18bc Issue #25876: test_gdb: use subprocess._args_from_interpreter_flags() to test
Python with more options.
2016-01-22 14:16:47 +01:00
Victor Stinner b02ef715a3 Use Py_uintptr_t for atomic pointers
Issue #26161: Use Py_uintptr_t instead of void* for atomic pointers in
pyatomic.h. Use atomic_uintptr_t when <stdatomic.h> is used.

Using void* causes compilation warnings depending on which implementation of
atomic types is used.
2016-01-22 14:09:55 +01:00
Victor Stinner 3cdd5fb970 code_richcompare() now uses the constants types
Issue #25843: When compiling code, don't merge constants if they are equal but
have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now
correctly compiled to two different functions: f1() returns 1 (int) and f2()
returns 1.0 (int), even if 1 and 1.0 are equal.

Add a new _PyCode_ConstantKey() private function.
2016-01-22 12:33:12 +01:00
Victor Stinner efb2413ce8 code_richcompare() now uses the constants types
Issue #25843: When compiling code, don't merge constants if they are equal but
have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now
correctly compiled to two different functions: f1() returns 1 (int) and f2()
returns 1.0 (int), even if 1 and 1.0 are equal.

Add a new _PyCode_ConstantKey() private function.
2016-01-22 12:33:12 +01:00
Victor Stinner e3560a7dc9 site: error on sitecustomize import error
Issue #26099: The site module now writes an error into stderr if sitecustomize
module can be imported but executing the module raise an ImportError. Same
change for usercustomize.
2016-01-22 12:22:07 +01:00
Benjamin Peterson ae8c078dbb merge 3.5 2016-01-21 22:04:04 -08:00
Benjamin Peterson d52513cb22 merge 3.4 2016-01-21 22:03:55 -08:00
Benjamin Peterson b1db758061 reject negative data_size 2016-01-21 22:02:46 -08:00
Senthil Kumaran cbde4a6924 merge from 3.5
minor clarification on Zipfile 'x' mode - exclusive creation of a file.

(Based on the feedback from docs@python.org list)
2016-01-21 21:08:25 -08:00
Senthil Kumaran e5c05cc8c0 minor clarification on Zipfile 'x' mode - exclusive creation of a file. 2016-01-21 21:06:47 -08:00
Donald Stufft a7baa106cd Merge update to pip 2016-01-21 21:56:28 -05:00
Donald Stufft 38150e0d85 Merge update to pip 2016-01-21 21:56:06 -05:00
Donald Stufft 5d0124623c Upgrade pip to 8.0.2 2016-01-21 21:55:32 -05:00
Berker Peksag 2e15d60b83 Issue #18620: Improve Pool examples in multiprocessing documentation
A single call to Pool.apply_async() will create only one process. To use all
of the pool's processes, it should be invoked multiple times:

    with Pool(processes=4) as pool:
        results = [pool.apply_async(func, ()) for i in range(4)]

Patch by Davin Potts.
2016-01-22 00:00:06 +02:00
Berker Peksag 7405c16533 Issue #18620: Improve Pool examples in multiprocessing documentation
A single call to Pool.apply_async() will create only one process. To use all
of the pool's processes, it should be invoked multiple times:

    with Pool(processes=4) as pool:
        results = [pool.apply_async(func, ()) for i in range(4)]

Patch by Davin Potts.
2016-01-21 23:59:49 +02:00
Senthil Kumaran dce4ae8ffe merge from 3.5
issue25909 - Correct the documentation of PyMapping_Items, PyMapping_Keys and
PyMapping_Values in Include/abstract.h and Doc/c-api/mapping.rst.

Patch contributed by Sonali Gupta.
2016-01-21 09:38:02 -08:00
Senthil Kumaran 1538b3d3df issue25909 - Correct the documentation of PyMapping_Items, PyMapping_Keys and
PyMapping_Values in Include/abstract.h and Doc/c-api/mapping.rst.

Patch contributed by Sonali Gupta.
2016-01-21 09:37:28 -08:00
Victor Stinner 9f78939552 Issue #26107: Fix typo in Objects/lnotab_notes.txt
Double parenthesis
2016-01-21 18:12:29 +01:00
Victor Stinner 875dde4387 Merge 3.5 (doc) 2016-01-21 08:58:44 +01:00
Victor Stinner d99cd333fe Issue #26106: doc: Move text of licenses to parsed literal block
This change helps to ignore text of PSF, BEOPEN.com and CNRI licenses when
translating the documentation. Patch written by Julien Palard who is
translating Python 3.5 doc to french. Text of other licenses already used
preformatted format.
2016-01-21 08:56:00 +01:00
Benjamin Peterson 2b0b5ac5a0 merge 3.5 (#26171) 2016-01-20 22:25:40 -08:00
Benjamin Peterson 47b8ba22e3 merge 3.4 (#26171) 2016-01-20 22:25:06 -08:00
Benjamin Peterson c4032da201 prevent buffer overflow in get_data (closes #26171) 2016-01-20 22:23:44 -08:00
Benjamin Peterson ba77788bba merge 3.5 2016-01-20 22:07:50 -08:00
Benjamin Peterson d4d7737c3f merge 3.4 2016-01-20 22:07:43 -08:00
Benjamin Peterson ef9cf08352 fix refleak in error condition 2016-01-20 22:06:43 -08:00
Benjamin Peterson e45abae08f merge 3.5 (#26172) 2016-01-20 22:03:00 -08:00
Benjamin Peterson b57eaeadff merge 3.4 (#26172) 2016-01-20 22:02:47 -08:00
Benjamin Peterson c836f717cd remove script from epub (closes #26172) 2016-01-20 22:02:30 -08:00
Victor Stinner c3ea8d2268 Merge 3.5 (issue #24520) 2016-01-20 22:28:10 +01:00
Victor Stinner 7172f507e1 Replace fpgetmask() with fedisableexcept()
Issue #24520: On FreeBSD, fpgetmask() was deprecated long time ago.
fedisableexcept() is now preferred.
2016-01-20 22:27:34 +01:00
Victor Stinner f3914eb16d co_lnotab supports negative line number delta
Issue #26107: The format of the co_lnotab attribute of code objects changes to
support negative line number delta.

Changes:

* assemble_lnotab(): if line number delta is less than -128 or greater than
  127, emit multiple (offset_delta, lineno_delta) in co_lnotab
* update functions decoding co_lnotab to use signed 8-bit integers

  - dis.findlinestarts()
  - PyCode_Addr2Line()
  - _PyCode_CheckLineNumber()
  - frame_setlineno()

* update lnotab_notes.txt
* increase importlib MAGIC_NUMBER to 3361
* document the change in What's New in Python 3.6
* cleanup also PyCode_Optimize() to use better variable names
2016-01-20 12:16:21 +01:00
Senthil Kumaran 316fcc867b merge from 3.5
issue25982 - Add a class definition for managers.Namespace in the multiprocessing docs.
2016-01-20 03:11:52 -08:00
Senthil Kumaran 6a0514ea20 issue25982 - Add a class definition for managers.Namespace in the multiprocessing docs. 2016-01-20 03:10:13 -08:00
Victor Stinner b56837a033 Merge 3.5
Issue #26154: Add a new private _PyThreadState_UncheckedGet() function.
2016-01-20 11:19:46 +01:00
Victor Stinner bfd316e750 Add _PyThreadState_UncheckedGet()
Issue #26154: Add a new private _PyThreadState_UncheckedGet() function which
gets the current thread state, but don't call Py_FatalError() if it is NULL.

Python 3.5.1 removed the _PyThreadState_Current symbol from the Python C API to
no more expose complex and private atomic types. Atomic types depends on the
compiler or can even depend on compiler options. The new function
_PyThreadState_UncheckedGet() allows to get the variable value without having
to care of the exact implementation of atomic types.

Changes:

* Replace direct usage of the _PyThreadState_Current variable with a call to
  _PyThreadState_UncheckedGet().
* In pystate.c, replace direct usage of the _PyThreadState_Current variable
  with the PyThreadState_GET() macro for readability.
* Document also PyThreadState_Get() in pystate.h
2016-01-20 11:12:38 +01:00
Serhiy Storchaka 5ccbf79eae Issue #26147: xmlrpc now works with strings not encodable with used
non-UTF-8 encoding.
2016-01-20 10:41:33 +02:00
Serhiy Storchaka aebb6d3682 Issue #26147: xmlrpc now works with strings not encodable with used
non-UTF-8 encoding.
2016-01-20 10:34:27 +02:00
Berker Peksag 5d69e6871a Issue #5626: Remove misleading comment from socket.gethostname() documentation
A machine can have more than one IP addresses so
socket.gethostbyname(socket.gethostname()) probably won't return the correct
one.
2016-01-20 08:45:54 +02:00
Berker Peksag 744fdfbf9a Issue #5626: Remove misleading comment from socket.gethostname() documentation
A machine can have more than one IP addresses so
socket.gethostbyname(socket.gethostname()) probably won't return the correct
one.
2016-01-20 08:45:37 +02:00
Berker Peksag 4f49c1c38a Issue #26157: Fix typos in asyncio-eventloop.rst
Initial patch by Carlo Beccarini.
2016-01-20 07:14:43 +02:00
Berker Peksag 49c9edf3d9 Issue #26157: Fix typos in asyncio-eventloop.rst
Initial patch by Carlo Beccarini.
2016-01-20 07:14:22 +02:00
Donald Stufft 33abe9a210 Merge update to pip/setuptools 2016-01-19 20:15:33 -05:00
Donald Stufft 1dce2c72ed Merge update to pip/setuptools 2016-01-19 20:14:39 -05:00
Donald Stufft 33a827678e Update pip to 8.0.0 and setuptools to 19.4 2016-01-19 20:13:51 -05:00