Commit Graph

20490 Commits

Author SHA1 Message Date
Victor Stinner b92c159efa
[3.6] bpo-32555: Fix locale encodings (#5193)
On FreeBSD and Solaris, os.strerror() now always decode the byte
string from the current locale encoding, rather than using
ASCII/surrogateescape in some cases.

Changes:

* Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() which has an
  additional current_locale parameter.
* PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() and
* PyUnicode_EncodeLocale() now always use the current locale
* encoding, instead of using Py_DecodeLocale()/Py_EncodeLocale().
* Document encoding in Py_DecodeLocale() and Py_EncodeLocale()
  documentations.
* Add USE_FORCE_ASCII define to not define
  decode_ascii_surrogateescape() on Android.
2018-01-15 23:43:24 +01:00
Victor Stinner 5f959c4f9e
[3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) (#5192)
* Add _Py_GetLocaleconvNumeric() function: decode decimal_point and
  thousands_sep fields of localeconv() from the LC_NUMERIC encoding,
  rather than decoding from the LC_CTYPE encoding.
* Modify locale.localeconv() and "n" formatter of str.format() (for
  int, float and complex to use _Py_GetLocaleconvNumeric()
  internally.

(cherry picked from commit cb064fc232)
2018-01-15 23:23:47 +01:00
Miss Islington (bot) fb8569e36f bpo-26330: Update shutil.disk_usage() documentation (GH-5184) (GH-5188)
Clarify that on Windows, path must be a directory.
On Unix, path can be a file or a directory.
(cherry picked from commit ee3b83547c)
2018-01-15 06:32:11 -08:00
Miss Islington (bot) bb80645d06 bpo-15221: Update os.path.is*() documentation (GH-5185) (GH-5186)
`os.path.is*()` can return False if the file can't be accessed.
The behaviour is documented in details in `os.path.exists()`.
Link to `os.path.exists()` from `os.path.is*()`.
(cherry picked from commit b3dd18d403)
2018-01-14 21:44:49 -08:00
Miss Islington (bot) cf4cd4bccb Add itertools recipe for directly finding the n-th combination (GH-5161) (#5174)
(cherry picked from commit d37258dd2e)
2018-01-13 11:21:15 -08:00
Miss Islington (bot) 29b1aff718 Improve enum.Flag code example (GH-5167) (GH-5171)
The code example that demonstrate how to use enum.Flag was missing
the import of enum.auto.
(cherry picked from commit 0f31c74fcf)
2018-01-12 20:23:21 -08:00
Miss Islington (bot) 22b1050672 Lexical Analysis ref doc: Fix a typo in the string concatenation internal link (GH-5157) (GH-5160)
In lexical analysis reference documentation, the internal link to
the string literal concatenation section was written as`.. _string-catenation:`.
Changed that to `.. _string-concatenation:`.
(cherry picked from commit 3764bb075a)
2018-01-11 22:50:45 -08:00
Miss Islington (bot) e29573910c advance copyright years to 2018 (GH-5094) (#5104)
(cherry picked from commit 65f2a6dcc2)
2018-01-05 23:12:14 -08:00
Serhiy Storchaka 1e6d8525f9
bpo-32211: Document the existing bug in re.findall() and re.finditer(). (#4695) 2018-01-04 11:08:24 +02:00
Miss Islington (bot) f24c1857a8 bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5081)
Updates documentation for generator expressions in classes tutorial: Clarify usage of ambiguous term "brackets" by replacing with "square brackets". Updated subsequent lines to respect line breaks. (GH-5079)
(cherry picked from commit f190eb59e6)
2018-01-02 08:36:06 -05:00
Miss Islington (bot) 45588c6dd1 Fix trivial typo in pickle.rst (GH-4955) (#4958)
(cherry picked from commit a8d25a1645)
2017-12-21 11:11:06 +02:00
Miss Islington (bot) 4aa84e7285 bpo-32306: Clarify c.f.Executor.map() documentation (GH-4947) (#4948)
The built-in map() function collects function arguments lazily, but concurrent.futures.Executor.map() does so eagerly.
(cherry picked from commit a7a751dd7b)
2017-12-20 19:19:18 +01:00
Miss Islington (bot) 75d1ca26b0 Improve the F-strings and format specifier documentation (GH-4931) (GH-4933)
Mention that the format-specifier mini language in f-strings
is the same one used by str.format.
(cherry picked from commit f4e21a2a72)
2017-12-19 13:09:19 -08:00
Miss Islington (bot) dc5770b161 bpo-32377: improve __del__ docs and fix mention about resurrection (GH-4927) (#4929)
* Fix GH-32377: improve __del__ docs and fix mention about resurrection

* Mention that CPython only calls __del__ once.
(cherry picked from commit 4b965930e8)
2017-12-19 20:00:13 +01:00
Miss Islington (bot) dab4cf210c Minor wording tweak for itertools documentation (GH-4893) (#4894)
(cherry picked from commit 6693d7af66)
2017-12-15 13:28:50 -08:00
Miss Islington (bot) 5a9f379435 F-strings docs: link to Format Specifiers (GH-4888) (GH-4889)
Link to the Format Specification Mini Language section from f-strings' documentation.
(cherry picked from commit d924fa523d)
2017-12-15 10:11:17 -08:00
Miss Islington (bot) 77bf6da725 bpo-28393: Update encoding lookup docs wrt bpo-27938 (GH-4871) (#4881)
(cherry picked from commit 297fd876aa)
2017-12-15 15:23:24 +01:00
Andrew Svetlov 28453feaa8
[3.6] bpo-32297: Fix misspellings in Python source code comments (GH-4803) (#4864)
* [3.6] bpo-32297: Few misspellings found in Python source code comments. (GH-4803)

* Fix multiple typos in code comments

* Add spacing in comments (test_logging.py, test_math.py)

* Fix spaces at the beginning of comments in test_logging.py.

(cherry picked from commit 53f7a7c281)
2017-12-14 16:19:51 +02:00
Miss Islington (bot) 4a97809a38 trivial: link updates in documentation (GH-2765) (#4835)
(cherry picked from commit 4f29f3c84b)
2017-12-13 14:45:19 +02:00
Miss Islington (bot) b0358e8784 bpo-32284: Fix documentation of BinaryIO and TextIO (GH-4832) (#4833)
(cherry picked from commit c3e070f849)
2017-12-13 10:59:01 +02:00
Miss Islington (bot) 78cd00b799 bpo-31942: Document optional support of start and stop attributes in Sequence.index method (GH-4277) (#4811)
(cherry picked from commit 5ce0a2a100)
2017-12-12 11:58:26 +01:00
Miss Islington (bot) 0aa2a1d003 bpo-22671: Clarify and test default read method implementations (GH-4568) (#4796)
Original patch written by Martin Panter, enhanced by Sanyam Khurana.
(cherry picked from commit 1b74f9b77a)
2017-12-11 15:27:25 +01:00
Vinay Sajip 63868181a9
bpo-32212: Updated logging documentation to make parameter names more consistent with source. (GH-4765) (GH-4767)
(cherry picked from commit a9f8df646a)
2017-12-09 12:28:16 +00:00
Miss Islington (bot) a04ca12e12 bpo-32208: update threading.Semaphore docs and add unit test (GH-4709) (#4750)
* fix issue32208: update threading.Semaphore docs and add unit test to validate correct behavior

* add test for blocking

* Update threading.rst

* semaphore: remove documentation validation tests and move 'return value' test to BaseSemaphore
(cherry picked from commit a0374dd34a)
2017-12-07 20:48:35 +02:00
Miss Islington (bot) 3b55416700 Add a missing space in tkinter documentation. (GH-4692) (GH-4722)
(cherry picked from commit ae342cf7de)
2017-12-04 21:16:20 -08:00
Miss Islington (bot) 2ad350a713 [3.6] bpo-31589 : Build PDF using xelatex for better UTF8 support. (GH-3940) (#4683)
Also addresses doc build failures documented in bpo-32200.
(cherry picked from commit 7324b5ce8e)
2017-12-02 17:35:08 -05:00
Miss Islington (bot) 5f6d2bb8cf Use raw strings in the re module examples. (GH-4616) (#4617)
(cherry picked from commit c615be5166)
2017-11-28 23:21:09 +02:00
Miss Islington (bot) 8a957534f5 bpo-32051: Fix name shadowing in multiprocessing docs (GH-4469)
(cherry picked from commit c172fc5031)
2017-11-27 04:22:50 +03:00
Miss Islington (bot) cceb0f8d7b bpo-29879: Update typing documentation. (GH-4573) (GH-4574)
- Add "version added: 3.5.2" note where it was missing.
- Remove the mention that Reversible is new in 3.5.2
(cherry picked from commit 0cd2e81bea)
2017-11-26 14:27:44 -08:00
Miss Islington (bot) 6bce8ace76 [Doc] Update opcode for var-positional arguments (GH-4446) (#4457)
`BUILD_MAP_UNPACK_WITH_CALL` was duplicated as the opcode for both var-positional and var-keyword arguments. The opcode for the former was updated as `BUILD_TUPLE_UNPACK_WITH_CALL`.
(cherry picked from commit 0c71653cb8)
2017-11-25 17:57:41 +02:00
Miss Islington (bot) db897b1961 Improve Scheduler Objects documentation. (GH-4556) (GH-4557)
Mention that the lower the priority number, the higher priority it represents.
(cherry picked from commit 9d5ec808de)
2017-11-24 21:48:26 -08:00
Miss Islington (bot) 3e60747025 bpo-30004: Fix the code example of using group in Regex Howto Docs (GH-4443) (GH-4554)
The provided code example was supposed to find repeated words, however it returned false results.
(cherry picked from commit 610e5afdcb)
2017-11-24 21:03:04 -08:00
Miss Islington (bot) 05ee12153f Asyncion-Dev docs: Fix the reference to sys.excepthook (GH-4414) (GH-4549)
(cherry picked from commit f8802d80b3)
2017-11-24 16:07:37 -08:00
Miss Islington (bot) 7b909a93bf Improve the String tutorial docs (GH-4541) (GH-4545)
The paragraph that contains example of string literal concatenation was placed
after the section about concatenation using the '+' sign.
Moved the paragraph to the appropriate section.
(cherry picked from commit 78a5722ae9)
2017-11-24 09:35:08 -08:00
Miss Islington (bot) 90abbee7aa Extending Python Doc minor updates (GH-4518) (GH-4535)
Move footnote markers to be closer to the related terminology:
before the end of the sentence, instead of after.
(cherry picked from commit cdfe910e74)
2017-11-24 00:55:23 -08:00
Miss Islington (bot) ff847d1ac7 bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (GH-4529) (#4533)
(cherry picked from commit 3df02dbc8e)
2017-11-23 15:57:58 -08:00
Berker Peksag a645b23ffc
bpo-30456: Clarify example for duplicates in second argument of isinstance (GH-1699)
(cherry picked from commit 26248ef58d)
2017-11-23 23:27:25 +03:00
Miss Islington (bot) d7ed48c2b8 bpo-32105: add asyncio.BaseEventLoop.connect_accepted_socket versionadded to documentation. (GH-4491) (#4493)
(cherry picked from commit 431665bf19)
2017-11-21 11:16:40 -05:00
Miss Islington (bot) 32b003aca3 Add comment and improve variable name in roundrobin() (GH-4486) (#4487)
(cherry picked from commit 337cbbace0)
2017-11-21 00:29:34 -08:00
Miss Islington (bot) 60a376cf00 bpo-32050: Fix -x option documentation (GH-4475) (#4477)
The line number in correct when using the -x option: Py_Main() uses
ungetc() to not skip the first newline character.
(cherry picked from commit c5a2071586)
2017-11-20 08:16:08 -08:00
Miss Islington (bot) 80baec58f5 Remove outdated .pyo reference from msilib docs (GH-4461)
Since f299abdafa
the remove_pyc() method no longer tries to
remove .pyo files.
(cherry picked from commit b56becb373)
2017-11-19 13:11:48 +03:00
Miss Islington (bot) 2f1ccf5e9c Document parameters of BaseServer.finish_request() (GH-4445)
(cherry picked from commit 7750bded92)
2017-11-19 10:41:19 +03:00
Miss Islington (bot) 6cc476ace1 Fix typo in atexit documentation. (GH-4419) (GH-4425)
`kargs` -> `kwargs`
(cherry picked from commit d505a29a15)
2017-11-16 09:11:41 -08:00
Jesse-Bakker 42336def77 bpo-31948: Fix broken links in msilib docs (GH-4397). (GH-4398)
(cherry picked from commit 3bda02222a)
2017-11-14 16:23:35 -08:00
Miss Islington (bot) 14c1fe682f bpo-15606: Improve the re.VERBOSE documentation. (GH-4366) (#4394)
(cherry picked from commit b0b44b4b33)
2017-11-14 17:38:50 +02:00
xdegaye ea5b545e38
[3.6] bpo-30696: Fix the REPL looping endlessly when no memory (GH-4160). (#4379)
(cherry picked from commit e0582a37c8)
2017-11-12 17:33:16 +01:00
Miss Islington (bot) 4e09deb127 The termios man page is in section 3 (GH-2450)
(cherry picked from commit e197a8538b)
2017-11-11 19:57:17 +03:00
Miss Islington (bot) 98ad985afe Remove redundant 'exc = True' line (GH-4357)
It can be removed after c28890fb42
(cherry picked from commit 7c9da3e5ba)
2017-11-11 18:11:34 +03:00
Miss Islington (bot) 7abbddd88d bpo-31824: Document default value of 'errors' parameters (GH-4328)
(cherry picked from commit e184cfd7bf)
2017-11-11 02:14:00 +03:00
Miss Islington (bot) 64f10492dc bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)
(cherry picked from commit 5a66c8a64d)
2017-11-08 01:55:08 +09:00