Commit Graph

7234 Commits

Author SHA1 Message Date
Martin Panter 7f02d6d0d9 Issue #23406: Clarify documentation on multiplying a sequence
Patch from Matheus Vieira Portela.
2015-09-07 02:08:55 +00:00
Alexander Belopolsky 7827a5b7c2 Closes Issue#22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'. 2015-09-06 13:07:21 -04:00
R David Murray d3639dc21a Merge: #24998: fix cut and paste error in subprocess example. 2015-09-04 10:03:03 -04:00
R David Murray d529ebb438 Merge: #24998: fix cut and paste error in subprocess example. 2015-09-04 10:02:27 -04:00
R David Murray 17227a7334 #24998: fix cut and paste error in subprocess example. 2015-09-04 10:01:19 -04:00
Victor Stinner 1101c58737 Merge 3.5 (asyncio doc) 2015-09-02 15:41:08 +02:00
Victor Stinner 44a25faf7c Merge 3.4 (asyncio doc) 2015-09-02 15:40:56 +02:00
Victor Stinner 5492d358e4 asyncio doc: fix subprocess sections 2015-09-02 15:39:01 +02:00
Yury Selivanov c994cd21de Merge 3.5 2015-08-31 11:45:11 -04:00
Yury Selivanov c52e41d6b9 Make asyncio provisional 2015-08-31 11:42:31 -04:00
Martin Panter 81174d749a Issue #24952: Merge 3.5 into 3.6 2015-08-31 03:26:46 +00:00
Martin Panter e721b7cb8b Issue #24952: Merge 3.4 into 3.5 2015-08-31 03:25:34 +00:00
Martin Panter 31e7f50d4c Issue #24952: Clarify default argument of stack_size() in threading, _thread
Patch from Mattip.
2015-08-31 03:15:52 +00:00
Benjamin Peterson 902adbb393 merge 3.5 (#24963) 2015-08-30 14:42:59 -07:00
Benjamin Peterson 1498461a7a merge 3.4 (#24963) 2015-08-30 14:42:49 -07:00
Benjamin Peterson 0612ffe8c8 fix spelling that was a bit confused (closes #24963) 2015-08-30 14:42:38 -07:00
Raymond Hettinger 7f9f27d767 merge 2015-08-30 09:17:02 -07:00
Raymond Hettinger 9157545c11 merge 2015-08-30 09:15:36 -07:00
Raymond Hettinger 7a3602e7cf Issue #24931: Resolve __dict__ conflict in namedtuple subclasses. 2015-08-30 09:13:48 -07:00
Zachary Ware 46c9c0d61c Issue #24272: Merge with 3.5 2015-08-29 22:40:37 -05:00
Zachary Ware ce50802679 Issue #24272: Remove usage of default reST role from typing docs 2015-08-29 22:39:47 -05:00
Alexander Belopolsky 357cb986b2 Fixed typos in TZ format description 2015-08-28 16:56:45 -04:00
Zachary Ware a51ffd3099 Closes #24947: Merge with 3.5 2015-08-27 15:55:48 -05:00
Zachary Ware dcc47c6064 Issue #24947: Merge 3.4 2015-08-27 15:55:24 -05:00
Zachary Ware 5e580da0b6 Issue #24947: Fix grammar in asyncio doc
Patch by tagatac
2015-08-27 15:54:39 -05:00
R David Murray 4c4cfad2df Merge: #24926: Fix typo in example. 2015-08-24 12:56:24 -04:00
R David Murray 7d9376f2d8 Merge: #24926: Fix typo in example. 2015-08-24 12:55:47 -04:00
R David Murray 87cbfb20fb #24926: Fix typo in example. 2015-08-24 12:55:03 -04:00
Robert Collins d949e5b057 Issue #22812: Fix unittest discovery examples.
Patch from Pam McA'Nulty.
2015-08-24 12:15:49 +12:00
Robert Collins 478eadc5f3 Issue #22812: Fix unittest discovery examples.
Patch from Pam McA'Nulty.
2015-08-24 12:15:05 +12:00
Robert Collins a2b0055396 Issue #22812: Fix unittest discovery examples.
Patch from Pam McA'Nulty.
2015-08-24 12:14:28 +12:00
Yury Selivanov df6f8bf47b Merge 3.5 2015-08-19 09:53:41 -04:00
Yury Selivanov de11561862 Further improve os.path.commonprefix() docs.
Patch by Serhiy Storchaka.
2015-08-19 09:53:28 -04:00
Yury Selivanov 02aa3426d3 Merge 3.5 2015-08-17 23:43:54 -04:00
Yury Selivanov 80ac11f95f docs: Improve docs for os.path.commonprefix 2015-08-17 23:43:43 -04:00
Ned Deily 84086acb47 Issue #24079: merge from 3.5 2015-08-17 22:15:54 -04:00
Ned Deily d61714d236 Issue #24079: merge from 3.4 2015-08-17 22:11:57 -04:00
Ned Deily eca0445733 Issue #24079: Improve description of the text and tail attributes for
ElementTree Element objects.  Initial patch by Martin Panter.
2015-08-17 22:11:17 -04:00
Yury Selivanov d11223e0d6 Merge 3.5 2015-08-17 13:04:49 -04:00
Yury Selivanov 5fbad3c9f2 docs: Clarify that gi_yieldfrom was first added in 3.5 2015-08-17 13:04:41 -04:00
Yury Selivanov 9e35cac3a1 Merge 3.5 2015-08-17 13:02:53 -04:00
Yury Selivanov c135f0a850 docs: Fix inspect docs re gi_yieldfrom 2015-08-17 13:02:42 -04:00
Raymond Hettinger 47d159f522 Issue #24379: Add operator.subscript() as a convenience for building slices. 2015-08-16 19:43:34 -07:00
Raymond Hettinger 2a75e8f958 Issue #24842: Cross-reference types.SimpleNamespace from the namedtuple docs 2015-08-16 08:32:01 -07:00
Antoine Pitrou aa525d0cae Issue #16554: fix description for MAKE_CLOSURE. Initial patch by Daniel Urban. 2015-08-13 20:37:40 +02:00
Antoine Pitrou 5e8d47f6ab Issue #16554: fix description for MAKE_CLOSURE. Initial patch by Daniel Urban. 2015-08-13 20:37:28 +02:00
Antoine Pitrou 4ce4f974da Issue #16554: fix description for MAKE_CLOSURE. Initial patch by Daniel Urban. 2015-08-13 20:37:08 +02:00
Robert Collins 3286718708 Issue #23725: Overhaul tempfile docs.
Patch from Zbigniew Jędrzejewski-Szmek.
2015-08-13 11:38:44 +12:00
Robert Collins 2ebdc13d11 Issue #23725: Overhaul tempfile docs.
Patch from Zbigniew Jędrzejewski-Szmek.
2015-08-13 11:38:02 +12:00
Robert Collins dfa95c9a8f Issue #20059: urllib.parse raises ValueError on all invalid ports.
Patch by Martin Panter.
2015-08-10 09:53:30 +12:00
Stefan Krah 67c3c5c90f Merge #23756. 2015-08-08 14:34:17 +02:00
Stefan Krah 70e543b266 Issue #23756: Clarify the terms "contiguous" and "bytes-like object".
Patch by Martin Panter.
2015-08-08 14:33:28 +02:00
Stefan Krah 5f35725fb8 Merge #15944. 2015-08-08 13:38:59 +02:00
Stefan Krah 0c51595a78 Issue #15944: memoryview: Allow arbitrary formats when casting to bytes.
Original patch by Martin Panter.
2015-08-08 13:38:10 +02:00
Zachary Ware 070bd62cfa Closes #21279: Merge with 3.5 2015-08-06 00:05:13 -05:00
Zachary Ware d987a81d29 Issue #21279: Merge with 3.4 2015-08-06 00:04:23 -05:00
Zachary Ware 79b98df023 Issue #21279: Flesh out str.translate docs
Initial patch by Kinga Farkas, Martin Panter, and John Posner.
2015-08-05 23:54:15 -05:00
Guido van Rossum a8e870c720 Fix trailing ws (merge from 3.5). 2015-08-05 12:26:28 +02:00
Guido van Rossum 9db397c5c1 Fix trailing ws. 2015-08-05 12:26:07 +02:00
Guido van Rossum a910cff84e Merge docs for typing.py from 3.5 into default branch. 2015-08-05 12:24:21 +02:00
Guido van Rossum cd2ac97dfd Merge docs for typing.py from accidental branch. 2015-08-05 12:21:40 +02:00
Robert Collins 8c81711d6c Issue #20769: Improve reload() docs. Patch by Dorian Pula. 2015-08-05 08:32:11 +12:00
Robert Collins b3ca31f5f1 Issue #20769: Improve reload() docs. Patch by Dorian Pula. 2015-08-05 08:28:53 +12:00
Robert Collins 1ae28d2ff3 Issue #20769: Improve reload() docs. Patch by Dorian Pula. 2015-08-05 08:20:53 +12:00
Guido van Rossum 69afdda3a5 Issue #24272: Initial docs for typing.py (PEP 484). (Merge from 3.5.)
By Daniel Andrade Groppe and Ivan Levkivskyi.
2015-08-03 22:39:12 +02:00
Guido van Rossum eb184e0106 Issue #24272: Initial docs for typing.py (PEP 484).
By Daniel Andrade Groppe and Ivan Levkivskyi.
2015-08-03 22:35:46 +02:00
Guido van Rossum 96860ee8d0 Remove warning about asyncio being provisional (it's not in 3.5 and up; merge from 3.5). 2015-08-02 15:51:46 +02:00
Guido van Rossum 75ead2b578 Remove warning about asyncio being provisional (it's not in 3.5 and up). 2015-08-02 15:50:27 +02:00
Berker Peksag fa3922cfd0 Issue #13248: Delete remaining references of inspect.getargspec().
Noticed by Yaroslav Halchenko.
2015-07-31 04:11:29 +03:00
Terry Jan Reedy cd111d5af8 Merge with 3.5 2015-07-30 16:44:55 -04:00
Terry Jan Reedy 659fcb0a8d Merge with 3.4 2015-07-30 16:44:41 -04:00
Terry Jan Reedy 30f1f67248 Issue #13884: Idle: Remove tearoff lines from menus. Patch by Roger Serwy. 2015-07-30 16:44:22 -04:00
Berker Peksag 4de1c1a9df Issue #12160: Fix incorrect StreamCodec references in Codec.encode() and Codec.decode() docs.
It should StreamWriter for Codecs.encode() and StreamReader for Codec.decode().

Patch by Nick Weinhold.
2015-07-30 18:27:04 +03:00
Berker Peksag 7e94e8ea4b Issue #12160: Fix incorrect StreamCodec references in Codec.encode() and Codec.decode() docs.
It should StreamWriter for Codecs.encode() and StreamReader for Codec.decode().

Patch by Nick Weinhold.
2015-07-30 18:26:35 +03:00
Berker Peksag 41ca828580 Issue #12160: Fix incorrect StreamCodec references in Codec.encode() and Codec.decode() docs.
It should StreamWriter for Codecs.encode() and StreamReader for Codec.decode().

Patch by Nick Weinhold.
2015-07-30 18:26:10 +03:00
Berker Peksag 317ccf3cd4 Issue #15582: Add a whatsnew entry for inspect.getdoc() changes in 3.5.
Patch by Martin Panter.
2015-07-30 18:06:30 +03:00
Berker Peksag 4333d8bad7 Issue #15582: Add a whatsnew entry for inspect.getdoc() changes in 3.5.
Patch by Martin Panter.
2015-07-30 18:06:09 +03:00
Berker Peksag eb2bdfe72c Issue #24109: Include Tools/scripts/diff.py instead of duplicating it in difflib documentation.
Patch by Keith Gray.
2015-07-30 00:04:11 +03:00
Berker Peksag 707deb9df4 Issue #24109: Include Tools/scripts/diff.py instead of duplicating it in difflib documentation.
Patch by Keith Gray.
2015-07-30 00:03:48 +03:00
Robert Collins d32a944037 Issue #23254: Document how to close the TCPServer listening socket.
Patch from Martin Panter.
2015-07-29 12:55:33 +12:00
Robert Collins f7e3b5e153 Issue #23254: Document how to close the TCPServer listening socket.
Patch from Martin Panter.
2015-07-29 12:53:30 +12:00
Robert Collins 1ee9283254 Issue #23254: Document how to close the TCPServer listening socket.
Patch from Martin Panter.
2015-07-29 12:52:40 +12:00
Victor Stinner 9f0b5e7097 Merge 3.5 (doc) 2015-07-29 02:29:54 +02:00
Victor Stinner ace8848df6 What's New in Python 3.5: document os.urandom() changes 2015-07-29 02:28:32 +02:00
Berker Peksag 384d6e5d55 Issue #24420: Fix documentation regression introduced by f0a00ee094ff.
These functions accept same arguments as subprocess.Popen().

Patch by Martin Panter.
2015-07-25 14:27:32 +03:00
Berker Peksag bf1d4b6d7d Issue #24420: Fix documentation regression introduced by f0a00ee094ff.
These functions accept same arguments as subprocess.Popen().

Patch by Martin Panter.
2015-07-25 14:27:07 +03:00
Robert Collins c6fde85c68 Add versionchanged information for mock_open. 2015-07-24 04:10:49 +12:00
Robert Collins 7039839895 Add versionchanged information for mock_open. 2015-07-24 04:10:27 +12:00
Robert Collins f79dfe3f25 Add versionchanged information for mock_open. 2015-07-24 04:09:59 +12:00
Robert Collins 5869185381 Issue #21750: Further fixup to be styled like other mock APIs. 2015-07-24 03:49:01 +12:00
Robert Collins 88ba360c88 Issue #21750: Further fixup to be styled like other mock APIs. 2015-07-24 03:48:45 +12:00
Robert Collins ca647ef60a Issue #21750: Further fixup to be styled like other mock APIs. 2015-07-24 03:48:20 +12:00
Yury Selivanov 6dfbc5d98e Issue #13248: Remove inspect.getmoduleinfo() from 3.6 (deprecated in 3.3) 2015-07-23 17:49:00 +03:00
Yury Selivanov f1b5ccb993 Issue #13248: Remove inspect.getargspec from 3.6 (deprecated from 3.0) 2015-07-23 17:36:02 +03:00
Robert Collins 8b73e6197e Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero. 2015-07-23 06:40:13 +12:00
Robert Collins 38de40db00 Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero. 2015-07-23 06:39:06 +12:00
Robert Collins e02f6c20ff Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero. 2015-07-23 06:37:26 +12:00
Charles-François Natali dc87e4b885 Issue #23530: Improve os.cpu_count() description.
Patch by Julian Taylor.
2015-07-13 21:01:39 +01:00
Barry Warsaw c5ea754e48 - Issue #15014: SMTP.auth() and SMTP.login() now support RFC 4954's optional
initial-response argument to the SMTP AUTH command.
2015-07-09 10:39:55 -04:00
Zachary Ware 3d3aedc8ba Fix usage of the default role. 2015-07-07 00:07:25 -05:00
Zachary Ware e36402a830 Fix usage of the default role.
The changes to Doc/library/unittest.mock.rst are almost entirely a
selective backport of the 3.5 page.
2015-07-06 23:58:12 -05:00
Zachary Ware 5c676f67d1 Fix suspicious markup 2015-07-06 23:27:15 -05:00
Benjamin Peterson 2dd6e477df merge 3.4 2015-07-06 11:28:40 -05:00
Benjamin Peterson 7dcbf900ac 'not' is very important here 2015-07-06 11:28:07 -05:00
Benjamin Peterson c0a446a7d9 merge 3.4 2015-07-06 09:41:07 -05:00
Benjamin Peterson b8fd26256e tighten warning 2015-07-06 09:40:43 -05:00
Ned Deily 2e770ce9a0 Issue #24330: merge from 3.4 2015-07-04 15:06:21 -07:00
Ned Deily f1ce6deb41 Issue #24330: Update IDLE doc and help to note "Configure IDLE" difference
on OS X.  Original patch by André Freitas.
2015-07-04 15:05:07 -07:00
R David Murray ac4f550bfc Merge: #24584: replace dead link with pointer to archive.org. 2015-07-04 15:45:41 -04:00
R David Murray a1005ed1aa #24584: replace dead link with pointer to archive.org. 2015-07-04 15:44:14 -04:00
Yury Selivanov fdbeb2b4b6 Issue #24400: Resurrect inspect.isawaitable()
collections.abc.Awaitable and collections.abc.Coroutine no longer
use __instancecheck__ hook to detect generator-based coroutines.

inspect.isawaitable() can be used to detect generator-based coroutines
and to distinguish them from regular generator objects.
2015-07-03 13:11:35 -04:00
Yury Selivanov f488fb422a Issue #19235: Add new RecursionError exception. Patch by Georg Brandl. 2015-07-03 01:04:23 -04:00
Yury Selivanov e13f8f3cab Issue #24450: Add gi_yieldfrom to generators; cr_await to coroutines.
Patch by Benno Leslie and Yury Selivanov.
2015-07-03 00:23:30 -04:00
Yury Selivanov cc1d0287b5 Issue #24400: Mention that __instancecheck__ is used in abc.Awaitable and Coroutine 2015-07-01 12:49:00 -04:00
Yury Selivanov 04356e1f6f Issue #24487: Rename async() -> ensure_future() in asyncio docs.
Patch by Martin Panter.
2015-06-30 22:13:22 -04:00
Yury Selivanov 59a3b6764c Issue #24541: Drop test_inspect.test_eightteen unittest; update docs
Suggested by Martin Panter.
2015-06-30 22:06:42 -04:00
Yury Selivanov a74b5e59af Issue #24400: Remove inspect.isawaitable().
isawaitable() was added before collections.abc.Awaitable; now,
with Awaitable, it is no longer needed (we don't have ishashable()
or isiterable() methods in the inspect module either).
2015-06-30 18:19:01 -04:00
Benjamin Peterson 4801383c29 upgrade to Unicode 8.0.0 2015-06-27 15:45:56 -05:00
Berker Peksag a7c781724f Issue #23684: Clarify the return value of the scheme attribute of ParseResult and SplitResult objects.
Patch by Martin Panter.
2015-06-25 23:39:26 +03:00
Berker Peksag 89584c97e4 Issue #23684: Clarify the return value of the scheme attribute of ParseResult and SplitResult objects.
Patch by Martin Panter.
2015-06-25 23:38:48 +03:00
Yury Selivanov e79f3557cc Merge 3.4 (issue #24509) 2015-06-25 13:50:21 -04:00
Yury Selivanov 1096f761b6 Issue #24509: Clarify Handle.cancel() and loop.call_* methods. 2015-06-25 13:49:52 -04:00
Yury Selivanov f76628fa5d Merge 3.4 2015-06-25 11:54:49 -04:00
Yury Selivanov bb96134368 asyncio.docs: Use less confusing title 2015-06-25 11:54:34 -04:00
Yury Selivanov edb09c5c0b Issue #24439: Update tulip_coro.dia 2015-06-25 11:48:32 -04:00
Yury Selivanov 66f8828bfc Issue #24439: Improve PEP 492 related docs.
Patch by Martin Panter.
2015-06-24 11:04:15 -04:00
Yury Selivanov 5376ba9630 Issue #24400: Introduce a distinct type for 'async def' coroutines.
Summary of changes:

1. Coroutines now have a distinct, separate from generators
   type at the C level: PyGen_Type, and a new typedef PyCoroObject.
   PyCoroObject shares the initial segment of struct layout with
   PyGenObject, making it possible to reuse existing generators
   machinery.  The new type is exposed as 'types.CoroutineType'.

   As a consequence of having a new type, CO_GENERATOR flag is
   no longer applied to coroutines.

2. Having a separate type for coroutines made it possible to add
   an __await__ method to the type.  Although it is not used by the
   interpreter (see details on that below), it makes coroutines
   naturally (without using __instancecheck__) conform to
   collections.abc.Coroutine and collections.abc.Awaitable ABCs.

   [The __instancecheck__ is still used for generator-based
   coroutines, as we don't want to add __await__ for generators.]

3. Add new opcode: GET_YIELD_FROM_ITER.  The opcode is needed to
   allow passing native coroutines to the YIELD_FROM opcode.

   Before this change, 'yield from o' expression was compiled to:

      (o)
      GET_ITER
      LOAD_CONST
      YIELD_FROM

   Now, we use GET_YIELD_FROM_ITER instead of GET_ITER.

   The reason for adding a new opcode is that GET_ITER is used
   in some contexts (such as 'for .. in' loops) where passing
   a coroutine object is invalid.

4. Add two new introspection functions to the inspec module:
   getcoroutinestate(c) and getcoroutinelocals(c).

5. inspect.iscoroutine(o) is updated to test if 'o' is a native
   coroutine object.  Before this commit it used abc.Coroutine,
   and it was requested to update inspect.isgenerator(o) to use
   abc.Generator; it was decided, however, that inspect functions
   should really be tailored for checking for native types.

6. sys.set_coroutine_wrapper(w) API is updated to work with only
   native coroutines.  Since types.coroutine decorator supports
   any type of callables now, it would be confusing that it does
   not work for all types of coroutines.

7. Exceptions logic in generators C implementation was updated
   to raise clearer messages for coroutines:

   Before: TypeError("generator raised StopIteration")
   After: TypeError("coroutine raised StopIteration")
2015-06-22 12:19:30 -04:00
Senthil Kumaran b4760efbad Back porting changeset db302b88fdb6 to 3.4 branch, which fixed multiple documentation typos.
Related Issues:

#issue21528
#issue24453
2015-06-14 17:35:37 -07:00
Raymond Hettinger 1c90670bc2 Issue #24453: Fix doubled word. 2015-06-14 16:08:06 -07:00
Terry Jan Reedy 8322b06945 Merge with 3.4 2015-06-12 16:47:58 -04:00
Terry Jan Reedy 6ac5cc15ce whitespace 2015-06-12 16:47:44 -04:00
Terry Jan Reedy 815f1a9128 Merge 3.4 2015-06-12 16:44:59 -04:00
Terry Jan Reedy fe63c9a298 Issue #24406: Add sentences on dict comparisons, similar to those for Sequence
and set comparisions.  Patch by Gareth Rees.
2015-06-12 16:38:57 -04:00
Barry Warsaw 9380acbbf7 - Issue #24351: Clarify what is meant by "identifier" in the context of
string.Template instances.
2015-06-09 14:22:44 -04:00
Barry Warsaw 17d5f47423 - Issue #24351: Clarify what is meant by "identifier" in the context of
string.Template instances.
2015-06-09 14:20:31 -04:00
Benjamin Peterson 277b975260 merge 3.4 2015-06-05 21:03:46 -05:00
Benjamin Peterson d9ede872cd that this is "for Python" is obvious 2015-06-05 21:03:08 -05:00
Berker Peksag ab2f966f79 Issue #23659: Document **fmtparams in csv.register_dialect docstring.
Initial patch by Brandon Milam.
2015-06-05 15:18:17 +03:00
Berker Peksag 12b50ce4cb Issue #23659: Document **fmtparams in csv.register_dialect docstring.
Initial patch by Brandon Milam.
2015-06-05 15:17:51 +03:00
Berker Peksag a5f62edbe3 Issue #24148: Fix incorrect Stats.sort_stats() example.
"cum" is not a valid argument.

Patch by Brandon Milam.
2015-06-05 14:48:55 +03:00
Berker Peksag 25587742f6 Issue #24148: Fix incorrect Stats.sort_stats() example.
"cum" is not a valid argument.

Patch by Brandon Milam.
2015-06-05 14:48:29 +03:00
Yury Selivanov 4180e43c12 Docs: Fix typo 2015-06-04 11:10:24 -04:00
Yury Selivanov aab3c4a211 Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully 2015-06-02 18:43:51 -04:00
Ned Deily fa1b47cc5a Issue #24357: merge from 3.4 2015-06-01 21:20:46 -07:00
Ned Deily 11cf4f6498 Issue #24357: use example.org instead 2015-06-01 21:19:30 -07:00
Ned Deily 03c28facd2 Issue #24357: merge from 3.4 2015-06-01 19:38:25 -07:00
Ned Deily 834f029c74 Issue #24357: fix real typo 2015-06-01 19:37:40 -07:00
Ned Deily 36a6a6bb3c Issue #24357: merge from 3.4 2015-06-01 19:20:31 -07:00
Ned Deily 9e2dc3f0b1 Issue #24357: fix typo 2015-06-01 19:17:44 -07:00
Ned Deily 3e4f976965 Issue #24357: merge from 3.4 2015-06-01 18:55:45 -07:00
Ned Deily 1b79e2d7ee Issue #24357: Change host in socket.getaddrinfo example to one that
does support IPv6 and IPv4; www.python.org currently does not.
2015-06-01 18:52:48 -07:00
Yury Selivanov d4cbbebe2d Issue 24180: Document sys.(set|get)_coroutine_wrapper 2015-05-31 17:13:08 -04:00
Tal Einat d5519ed7f4 Issue #19543: Implementation of isclose as per PEP 485
For details, see:
PEP 0485 -- A Function for testing approximate equality

Functions added: math.isclose() and cmath.isclose().

Original code by Chris Barker. Patch by Tal Einat.
2015-05-31 22:05:00 +03:00
Yury Selivanov 582b8c7629 Issue 22357: Merge from 3.4 2015-05-30 13:54:36 -04:00
Yury Selivanov 0339568753 Issue 22357: Document __qualname__ in inspect.rst 2015-05-30 13:53:49 -04:00
Yury Selivanov 56fc614025 Issue 24315: Make collections.abc.Coroutine derived from Awaitable 2015-05-29 09:01:29 -04:00
Benjamin Peterson 264be6f48f remove STORE_MAP, since it's unused 2015-05-28 14:40:08 -05:00
Berker Peksag 1a90b17bce Fix Sphinx warnings. 2015-05-24 00:26:05 +03:00
Terry Jan Reedy c7792160dd Merge with 3.4 2015-05-23 16:16:46 -04:00
Terry Jan Reedy 43cba219d5 Make expression legal python by adding '1'. 2015-05-23 16:16:28 -04:00
Raymond Hettinger 19cfb57f5f Issue #24204: Elaborate of the str.strip() documentation. 2015-05-23 09:11:55 -07:00
Raymond Hettinger 855482e74c Issue #24269: Minor doc fixups. 2015-05-23 08:57:58 -07:00
Nick Coghlan d5cacbb1d9 PEP 489: Multi-phase extension module initialization
Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.
2015-05-23 22:24:10 +10:00
Raymond Hettinger ec219ba1c0 Issue #23086: Add start and stop arguments to the Sequence.index() mixin method. 2015-05-22 19:29:22 -07:00
Gregory P. Smith ad577b938b Issue 24230: The tempfile module now accepts bytes for prefix, suffix and dir
parameters and returns bytes in such situations (matching the os module APIs).
2015-05-22 16:18:14 -07:00
Yury Selivanov 945fff44c4 Issue 20438: Add a note about deprecating old inspect APIs to whatsnew.
Also, deprecate formatargspec, formatargvalues, and getargvalues
functions.  Since we are deprecating 'getfullargspec' function in
3.5 (documentation only, no DeprecationWarning), it makes sense
to also deprecate functions designed to be directly used with it.

In 3.6 we will remove 'getargsspec' function (was deprecated since
Python 3.0), and start raising DeprecationWarnings in other
'getarg*' family of functions.  We can remove them in 3.7 or later.

Also, it is worth noting, that Signature API does not provide 100%
of functionality that deprecated APIs have.  It is important to do
a soft deprecation of outdated APIs in 3.5 to gather users feedback,
and improve Signature object.
2015-05-22 16:28:05 -04:00
Guido van Rossum 46dbb7d103 Preliminary typing.py, anticipating provisional acceptance of PEP 484.
There area bunch of TODOs here, but the biggest (not mentioned in the
file) is that I'm going to take out __instancecheck__ and
__subclasscheck__.  However my personal schedule is such that I
probably won't have time for these before Larry tags beta 1.  But I
will try -- this commit is mostly to make sure that typing.py doesn't
completely miss the train.

PS. I'm tracking issues at https://github.com/ambv/typehinting/issues.
2015-05-22 10:14:11 -07:00
Yury Selivanov 3cfec2e2fc Issue 20438: Deprecate inspect.getargspec() and friends. 2015-05-22 11:38:38 -04:00
Yury Selivanov a18cad543f Issue 24180: Fixes by Berker Peksag. 2015-05-21 17:02:31 -04:00
Yury Selivanov f3e40fac10 Issue 24180: Documentation for PEP 492 changes. 2015-05-21 11:50:30 -04:00
Yury Selivanov bcd4fc161a Issue 20691: Add follow_wrapped arg to inspect.signature/from_callable. 2015-05-20 14:30:08 -04:00
R David Murray e09b42c914 #19662: fix typo 2015-05-19 07:18:39 -04:00
Berker Peksag fee05daef8 Issue #24232: Fix typos. Patch by Ville Skyttä. 2015-05-19 01:38:05 +03:00
Berker Peksag 315e104d11 Issue #24232: Fix typos. Patch by Ville Skyttä. 2015-05-19 01:36:55 +03:00
Berker Peksag 5f120fcecb Issue #24233: Add a proper link to socket.getfqdn() documentation.
Patch by Ville Skyttä.
2015-05-19 01:31:24 +03:00
Berker Peksag 2a8baed833 Issue #24233: Add a proper link to socket.getfqdn() documentation.
Patch by Ville Skyttä.
2015-05-19 01:31:00 +03:00
R David Murray c17686f071 Issue #13866: add *quote_via* argument to urlencode.
Patch by samwyse, completed by Arnon Yaari, and reviewed by
Martin Panter.
2015-05-17 20:44:50 -04:00
R David Murray 1dbee9460e #24211: Add missing docs for SMTPUTF8 policy instance. 2015-05-17 19:36:16 -04:00
R David Murray 8308444eef #24218: Add SMTPUTF8 support to send_message.
Reviewed by Maciej Szulik.
2015-05-17 19:27:22 -04:00
Terry Jan Reedy 6883faf49b Merge with 3.4 2015-05-17 14:50:06 -04:00
Terry Jan Reedy d986563a06 Issue #22155: Add File Handlers subsection with createfilehandler to tkinter
doc.  Remove obsolete example from FAQ.  Patch by Martin Panter.
2015-05-17 14:49:26 -04:00
R David Murray fdb23c2fe5 #20098: add mangle_from_ policy option.
This defaults to True in the compat32 policy for backward compatibility,
but to False for all new policies.

Patch by Milan Oberkirch, with a few tweaks.
2015-05-17 14:24:33 -04:00
R David Murray 224ef3ec3b #24211: Add RFC6532 support to the email library.
This could use more edge case tests, but the basic functionality is tested.
(Note that this changeset does not add tailored support for the RFC 6532
message/global MIME type, but the email package generic facilities will handle
it.)

Reviewed by Maciej Szulik.
2015-05-17 11:29:21 -04:00
R David Murray c1ecef78a3 Merge: #24216: fix typo 2015-05-17 10:17:35 -04:00
R David Murray 0e8168c9e5 #24216: fix typo 2015-05-17 10:16:37 -04:00
Berker Peksag 5b3df5b600 Add versionadded directive for BoundArguments.apply_defaults(). 2015-05-16 23:29:31 +03:00
R David Murray b744f3a45e #21083: add get_content_disposition method to email.message.
Patch by Abhilash Raj.
2015-05-16 15:41:07 -04:00
R David Murray b8cd3e4e30 #21804: Add RFC 6856 (UTF8) support to poplib.
Patch by Milan Oberkirch.
2015-05-16 15:05:53 -04:00
R David Murray 3113765883 #19662: Make requirement to support arbitrary keywords explicit.
When not using decode_data=True, smtpd may provide keyword arguments to the
process_message user-implemented method.  This doc update is intended to make
it clear that arbitrary keywords must be supported, so that we can add
additional features in the future by just adding keywords to the
process_message call.
2015-05-16 14:16:33 -04:00
R David Murray cee7cf6026 #22027: Add RFC6531 support to smtplib.
Initial patch by Milan Oberkirch.
2015-05-16 13:58:14 -04:00
Yury Selivanov b907a513c8 Issue 24190: Add inspect.BoundArguments.apply_defaults() method. 2015-05-16 13:45:09 -04:00
Tal Einat c7027b7904 Issue #20182: converted the signal module to use Argument Clinic 2015-05-16 14:14:49 +03:00
Raymond Hettinger 29655df11d Issue #24064: Docuement that oroperty docstrings are now writeable. 2015-05-15 16:17:05 -07:00
Victor Stinner 51b58325f9 Closes #24013: Improve os.scandir() and DirEntry documentation
Patch written by Ben Hoyt.
2015-05-15 09:12:58 +02:00
Victor Stinner 56f6526085 os module doc: remove availability when useless
Remove "Availability: Unix, Windows." from os module documentation for
functions available on all platforms.
2015-05-15 09:11:59 +02:00
Yury Selivanov dee32bd256 Issue 24191: Document BoundArguments.signature 2015-05-14 14:14:18 -04:00
Yury Selivanov 82796193f9 Issue 24191: Document BoundArguments.signature 2015-05-14 14:14:02 -04:00
R David Murray 7d0d6ee525 Merge: Make sentence correct English. 2015-05-14 08:51:09 -04:00
R David Murray 2249d9f7d6 Make sentence correct English. 2015-05-14 08:50:38 -04:00
Raymond Hettinger b01a1fdb94 merge 2015-05-13 14:39:35 -07:00
Raymond Hettinger 3afdb2870f Fix mangled wording 2015-05-13 14:39:04 -07:00
Raymond Hettinger 46cf02d25a merge 2015-05-13 02:48:21 -07:00
Raymond Hettinger a3780259e4 Issue #19934: Document *None* as an acceptable input to Counter.most_common([n]) 2015-05-13 02:47:57 -07:00
Raymond Hettinger 0907a45eb1 Issue #23695: Explain the zip() example for clustering a data series into n-length groups. 2015-05-13 02:34:38 -07:00
Berker Peksag 2f3742b0d8 Issue #1322: platform.dist() and platform.linux_distribution() functions are now deprecated.
Initial patch by Vajrasky Kok.
2015-05-13 12:32:20 +03:00
Berker Peksag de7cafaa63 Issue #24064: Add __doc__ to the example in collections.rst. 2015-05-13 12:16:27 +03:00
Raymond Hettinger eac503aeac Issue #24064: Property() docstrings are now writeable.
(Patch by Berker Peksag.)
2015-05-13 01:09:59 -07:00
Benjamin Peterson 276e9c841d merge 3.4 2015-05-12 19:16:20 -04:00
Benjamin Peterson 19a3f17cb3 use imperative 2015-05-12 19:15:53 -04:00
Benjamin Peterson e960d18bb2 versionadded 2015-05-12 17:24:17 -04:00
Serhiy Storchaka 48e47aaa28 Issue #22486: Added the math.gcd() function. The fractions.gcd() function now is
deprecated.  Based on patch by Mark Dickinson.
2015-05-13 00:19:51 +03:00
Serhiy Storchaka f0eeedf0d8 Issue #22681: Added support for the koi8_t encoding. 2015-05-12 23:24:19 +03:00
Serhiy Storchaka ad8a1c3fb2 Issue #22682: Added support for the kz1048 encoding. 2015-05-12 23:16:55 +03:00
Berker Peksag 688cd4e6cb Issue #23983: Update the pty module example.
Changes:

* Fixed a ResourceWarning warning
* Used argparse instead of getopt
2015-05-12 17:25:41 +03:00
Berker Peksag c2dd680115 Issue #23983: Update the pty module example.
Changes:

* Fixed a ResourceWarning warning
* Used argparse instead of getopt
2015-05-12 17:25:06 +03:00
Yury Selivanov 7544508f02 PEP 0492 -- Coroutines with async and await syntax. Issue #24017. 2015-05-11 22:57:16 -04:00
Yury Selivanov 21ee10bf04 Merge 3.4 (asyncio docs) 2015-05-11 16:34:13 -04:00
Yury Selivanov d7e19bb566 docs/asyncio: Document new ensure_future() and deprecated async() 2015-05-11 16:33:41 -04:00
Yury Selivanov 7185461897 docs/asyncio: Document set_task_factory/get_task_factory 2015-05-11 16:28:27 -04:00
R David Murray a33df31629 #21795: advertise 8BITMIME if decode_data is False.
Patch by Milan Oberkirch, with a few updates.  This changeset also
tweaks the smtpd and whatsnew docs for smtpd into what should be
the final form for the 3.5 release.
2015-05-11 12:11:40 -04:00
R David Murray a6429db4b8 #21800: Add RFC 6855 support to imaplib.
Original patch by Milan Oberkirch, updated by myself and
Maciej Szulik.
2015-05-10 19:17:23 -04:00
Yury Selivanov 8170e8c0d1 PEP 479: Change StopIteration handling inside generators.
Closes issue #22906.
2015-05-09 11:44:30 -04:00
Raymond Hettinger bd60e8dece Issue #24018: Add a collections.Generator abstract base class. 2015-05-09 01:07:23 -04:00
Andrew Svetlov 0048835e49 Merge 3.4 2015-05-08 14:15:11 +03:00
Andrew Svetlov b79e01248d Fix doc: asyncio.Semaphore.release() actually is a regular function, not coroutine 2015-05-08 14:13:41 +03:00
Benjamin Peterson ec9b7728fe merge 3.4 2015-05-06 21:31:07 -04:00
Benjamin Peterson ad643b59ce remove word we don't need 2015-05-06 21:29:14 -04:00
Zachary Ware 828946e561 Fix copy/paste errors.
Basically, s/thread/coroutine/.
2015-05-06 20:19:06 -05:00
Benjamin Peterson b174b85c1a merge 3.4 (#24118) 2015-05-03 13:00:37 -04:00
Benjamin Peterson ac87ed7e9f update example, since python.org is HTTPS-only now (closes #24118) 2015-05-03 12:59:09 -04:00
Serhiy Storchaka 24559e4834 Issue #22619: Added negative limit support in the traceback module.
Based on patch by Dmitry Kazakov.
2015-05-03 13:19:46 +03:00
R David Murray 3b85377ab5 Merge: #24108: Update fnmatch.translate example to show correct output. 2015-05-02 15:08:50 -04:00
R David Murray 4590c3d944 #24108: Update fnmatch.translate example to show correct output.
Patch by Merlijn van Deen.
2015-05-02 15:08:22 -04:00
R David Murray deed215313 Merge: #24081: Remove obsolete caveat from import docs. 2015-05-02 14:58:32 -04:00
R David Murray 6d877ef026 #24081: Remove obsolete caveat from import docs.
Per Eric Snow's research, this changed in Python 2.4 in changeset 331e60d8ce,
but these docs were not updated.

Patch by Peter Viktorin.
2015-05-02 14:57:54 -04:00
Vinay Sajip 3b4d30a27b Closes #24060: Merged documentation update from 3.4. 2015-05-02 09:47:28 +01:00
Vinay Sajip bbd95a9361 Issue #24060: Made logging.Formatter documentation a little clearer. 2015-05-02 09:46:05 +01:00
Benjamin Peterson a567e564ec remove deleted method 2015-04-28 00:04:53 -04:00
Berker Peksag 0f51d04b47 Issue #24062: Fix os.stat links. Patch by July Tikhonov. 2015-04-27 13:53:54 +03:00
Berker Peksag 2034caa0c4 Issue #24062: Fix os.stat links. Patch by July Tikhonov. 2015-04-27 13:53:28 +03:00
Berker Peksag a7edf1e57c Issue #23356: Simplify convert_arg_line_to_args example.
Patch by py.user.
2015-04-26 12:10:27 +03:00
Berker Peksag 8c99a6d604 Issue #23356: Simplify convert_arg_line_to_args example.
Patch by py.user.
2015-04-26 12:09:54 +03:00
Gregory P. Smith 8cb6569fe1 Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview.
Also updates a few internal implementations of the same thing to use the
new built-in code.

Contributed by Arnon Yaari.
2015-04-25 23:22:26 +00:00
Benjamin Peterson 644adc6ada merge 3.4 (#24057) 2015-04-25 14:16:25 -04:00
Benjamin Peterson d87dd434c0 fix relative link (closes #24057) 2015-04-25 14:15:16 -04:00
Berker Peksag d86ef05a02 Issue #23917: Fall back to sequential compilation when ProcessPoolExecutor doesn't exist.
Patch by Claudiu Popa.
2015-04-22 09:39:19 +03:00
Andrew Kuchling c3a7f18100 Merge from 3.4 2015-04-21 19:44:54 -04:00
Andrew Kuchling 333518e01d #15183: clarify timeit documentation to say that setup statement isn't timed 2015-04-21 19:43:33 -04:00
Greg Ward 4d9d2563f5 #17445: difflib: add diff_bytes(), to compare bytes rather than str
Some applications (e.g. traditional Unix diff, version control
systems) neither know nor care about the encodings of the files they
are comparing. They are textual, but to the diff utility they are just
bytes. This worked fine under Python 2, because all of the hardcoded
strings in difflib.py are ASCII, so could safely be combined with
old-style u'' strings. But it stopped working in 3.x.

The solution is to use surrogate escapes for a lossless
bytes->str->bytes roundtrip. That means {unified,context}_diff() can
continue to just handle strings without worrying about bytes. Callers
who have to deal with bytes will need to change to using diff_bytes().

Use case: Mercurial's test runner uses difflib to compare current hg
output with known good output. But Mercurial's output is just bytes,
since it can contain:
  * file contents (arbitrary unknown encoding)
  * filenames (arbitrary unknown encoding)
  * usernames and commit messages (usually UTF-8, but not guaranteed
    because old versions of Mercurial did not enforce it)
  * user messages (locale encoding)

Since the output of any given hg command can include text in multiple
encodings, it is hopeless to try to treat it as decodable Unicode
text. It's just bytes, all the way down.

This is an elaboration of a patch by Terry Reedy.
2015-04-20 20:21:21 -04:00
Benjamin Peterson d19458ac51 merge 3.4 (#23989) 2015-04-20 18:22:21 -04:00