From report at bugs.python.org Mon Jul 1 03:00:32 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Jul 2019 07:00:32 +0000 Subject: [docs] [issue37454] Clarify docs for math.log1p() In-Reply-To: <1561933178.32.0.315765765879.issue37454@roundup.psfhosted.org> Message-ID: <1561964432.03.0.849235126567.issue37454@roundup.psfhosted.org> Mark Dickinson added the comment: > however, for x < 0.0 it is always worse That's quite surprising. Which platform? And can you give some example inputs and outputs? With a good math library, I'd expect `log1p(x)` to almost always be at least as accurate as `log(1 + x)`, and substantially _more_ accurate for small x (say abs(x) < 1e-5). If that's not happening, we may want to substitute our own implementation for the system implementation on some platforms (in the same was as we did for lgamma, erf, and friends). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 03:18:55 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Jul 2019 07:18:55 +0000 Subject: [docs] [issue37454] Clarify docs for math.log1p() In-Reply-To: <1561933178.32.0.315765765879.issue37454@roundup.psfhosted.org> Message-ID: <1561965535.33.0.4802873053.issue37454@roundup.psfhosted.org> Mark Dickinson added the comment: Ah, now I've looked at the script. There's an issue with using `random.random()` to create "small" values for testing, since its result is always an integer multiple of 2**-53. That means in particular that if x = random.random(), then 1 - x is always *exactly* representable (and 1 + x is also exactly representable approximately half of the time), so there's no loss of accuracy in the intermediate step of computing log(1 + x) if x = -random.random(). Here's what I get if I run your script exactly as it stands (Python 3.7.3, macOS 10.14.5) mirzakhani:Desktop mdickinson$ python test.py Counter({'equal': 51839, 'offset_log': 41988, 'regular_log': 6173}) Counter({'equal': 93727, 'regular_log': 6273}) But if I replace each `random.random()` call with `1e-3 * random.random()`, in order to test small values of `x`, here's what I get: mirzakhani:Desktop mdickinson$ python test.py Counter({'offset_log': 99945, 'equal': 55}) Counter({'offset_log': 99893, 'equal': 107}) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:19:39 2019 From: report at bugs.python.org (Chandan Kumar) Date: Mon, 01 Jul 2019 08:19:39 +0000 Subject: [docs] [issue37464] multiple comparison Message-ID: <1561969179.72.0.936663483495.issue37464@roundup.psfhosted.org> New submission from Chandan Kumar : a=1.0 b=0.0 c=0.0 if (a> d and b): print('hi') else: print("bye") its going to else part a=1.0 b=0.1 c=0.2 then its going to if part a==1.0 b=0 c=0.1 then again its going to else part ---------- assignee: docs at python components: Documentation messages: 346972 nosy: Chandan, docs at python priority: normal severity: normal status: open title: multiple comparison type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:20:20 2019 From: report at bugs.python.org (Enrico Zini) Date: Mon, 01 Jul 2019 08:20:20 +0000 Subject: [docs] [issue37465] Incorrect documentation for `s#` arguments in C API argument parsing Message-ID: <1561969220.64.0.698927964651.issue37465@roundup.psfhosted.org> New submission from Enrico Zini : In https://docs.python.org/3.9/c-api/arg.html, in the documentation for parsing argument, there is: s# (str, read-only bytes-like object) [const char *, int or Py_ssize_t] In my amd64 system, `Py_ssize_t` is a different type than `int`, and passing a `Py_ssize_t` causes undefine behaviour. I assume this has been switched to an `int` in the API, and that thisinstance of the documentation has not been updated accordingly. At the bottom of the page in the documentation of `Py_BuildValue`, `s#` is correctly documented as using an `int` and no `Py_ssize_t`, for example. ---------- assignee: docs at python components: Documentation messages: 346974 nosy: docs at python, enrico priority: normal severity: normal status: open title: Incorrect documentation for `s#` arguments in C API argument parsing versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:21:01 2019 From: report at bugs.python.org (Chandan Kumar) Date: Mon, 01 Jul 2019 08:21:01 +0000 Subject: [docs] [issue37464] multiple comparison In-Reply-To: <1561969179.72.0.936663483495.issue37464@roundup.psfhosted.org> Message-ID: <1561969261.75.0.92402768857.issue37464@roundup.psfhosted.org> Change by Chandan Kumar : ---------- type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:31:06 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 01 Jul 2019 08:31:06 +0000 Subject: [docs] [issue37465] Incorrect documentation for `s#` arguments in C API argument parsing In-Reply-To: <1561969220.64.0.698927964651.issue37465@roundup.psfhosted.org> Message-ID: <1561969865.98.0.201616467407.issue37465@roundup.psfhosted.org> Inada Naoki added the comment: See note in https://docs.python.org/3.9/c-api/arg.html#strings-and-buffers """ Note: For all # variants of formats (s#, y#, etc.), the type of the length argument (int or Py_ssize_t) is controlled by defining the macro PY_SSIZE_T_CLEAN before including Python.h. If the macro was defined, length is a Py_ssize_t rather than an int. This behavior will change in a future Python version to only support Py_ssize_t and drop int support. It is best to always define PY_SSIZE_T_CLEAN. """ ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 04:40:20 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Jul 2019 08:40:20 +0000 Subject: [docs] [issue37464] multiple comparison In-Reply-To: <1561969179.72.0.936663483495.issue37464@roundup.psfhosted.org> Message-ID: <1561970420.48.0.368736308189.issue37464@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: a=1.0 b=0.0 c=0.0 if (a> d and b): print('hi') else: print("bye") d is not defined here and it throws a NameError for me. Can you please attach the full scripts that can be used to reproduce the behavior in the report. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:07:11 2019 From: report at bugs.python.org (Enrico Zini) Date: Mon, 01 Jul 2019 09:07:11 +0000 Subject: [docs] [issue37465] Incorrect documentation for `s#` arguments in C API argument parsing In-Reply-To: <1561969220.64.0.698927964651.issue37465@roundup.psfhosted.org> Message-ID: <1561972031.86.0.144069442788.issue37465@roundup.psfhosted.org> Enrico Zini added the comment: Oh! Fair enough, I had missed it. Does the note also involve `Py_BuildValue`? If so, the documentation of `Py_BuildValue` should probably be updated; if not, I think it would be clearer if the note mentioned that it only applies to parsing, not building, values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 05:56:15 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 01 Jul 2019 09:56:15 +0000 Subject: [docs] [issue37209] Add what's new entries for pickle enhancements In-Reply-To: <1560083927.43.0.0939739725641.issue37209@roundup.psfhosted.org> Message-ID: <1561974975.63.0.0195616156352.issue37209@roundup.psfhosted.org> Change by Pierre Glaser : ---------- keywords: +patch pull_requests: +14319 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:41:45 2019 From: report at bugs.python.org (Martijn Pieters) Date: Mon, 01 Jul 2019 13:41:45 +0000 Subject: [docs] [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. Message-ID: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> New submission from Martijn Pieters : The implementation of the logging.handler.QueueHandler and logging.handler.QueueListener does not make use of the task tracking API of queues (queue.task_done(), queue.join()) nor does it care if the queue is unbounded (queue.full(), catching the Full exception). As such, it can work just as well with the new queue.SimpleQueue implementation (new in 3.7, see https://docs.python.org/3/library/queue.html#queue.SimpleQueue), which is fast and lightweight, implemented in C. Can the documentation be updated to make this option explicit? ---------- assignee: docs at python components: Documentation messages: 347017 nosy: docs at python, mjpieters priority: normal severity: normal status: open title: Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:42:59 2019 From: report at bugs.python.org (Martijn Pieters) Date: Mon, 01 Jul 2019 13:42:59 +0000 Subject: [docs] [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler Message-ID: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> New submission from Martijn Pieters : The documentation doesn't make it explicit what happens if you use a bounded queue together with logging.handlers.QueueHandler. If the queue is bounded in size and attempts are made to add logrecords faster than a queue listener removes them, then the resulting `queue.Full` exception is passed to `handler.handleError()` and that usually means the record is simply dropped (see https://docs.python.org/3/library/logging.html#logging.Handler.handleError). That may be the desired behaviour, but making it explicit is always better. ---------- assignee: docs at python components: Documentation messages: 347018 nosy: docs at python, mjpieters priority: normal severity: normal status: open title: Make it explicit what happens when using a bounded queue with QueueHandler versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:45:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Jul 2019 13:45:44 +0000 Subject: [docs] [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1561988744.41.0.393248350177.issue37470@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:48:21 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Jul 2019 13:48:21 +0000 Subject: [docs] [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1561988901.99.0.921313274075.issue37469@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:52:00 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Jul 2019 13:52:00 +0000 Subject: [docs] [issue37209] Add what's new entries for pickle enhancements In-Reply-To: <1560083927.43.0.0939739725641.issue37209@roundup.psfhosted.org> Message-ID: <1561989120.65.0.657642789579.issue37209@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset ec6c1bd0491590f3c0e2908a7b2dfb91b6acdae9 by Antoine Pitrou (Pierre Glaser) in branch 'master': bpo-37209: Add pickle entry for 3.8 whatsnew (GH-14503) https://github.com/python/cpython/commit/ec6c1bd0491590f3c0e2908a7b2dfb91b6acdae9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 09:52:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 13:52:12 +0000 Subject: [docs] [issue37209] Add what's new entries for pickle enhancements In-Reply-To: <1560083927.43.0.0939739725641.issue37209@roundup.psfhosted.org> Message-ID: <1561989132.22.0.10053993552.issue37209@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14328 pull_request: https://github.com/python/cpython/pull/14512 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:05:09 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Jul 2019 14:05:09 +0000 Subject: [docs] [issue37209] Add what's new entries for pickle enhancements In-Reply-To: <1560083927.43.0.0939739725641.issue37209@roundup.psfhosted.org> Message-ID: <1561989909.77.0.933943322506.issue37209@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset e224d2865aa0f021b25d68de9a6c2be617341f4c by Antoine Pitrou (Miss Islington (bot)) in branch '3.8': bpo-37209: Add pickle entry for 3.8 whatsnew (GH-14503) (GH-14512) https://github.com/python/cpython/commit/e224d2865aa0f021b25d68de9a6c2be617341f4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 10:36:19 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 01 Jul 2019 14:36:19 +0000 Subject: [docs] [issue37454] Clarify docs for math.log1p() In-Reply-To: <1561933178.32.0.315765765879.issue37454@roundup.psfhosted.org> Message-ID: <1561991779.87.0.831144941966.issue37454@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 11:38:47 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 01 Jul 2019 15:38:47 +0000 Subject: [docs] [issue37454] Clarify docs for math.log1p() In-Reply-To: <1561933178.32.0.315765765879.issue37454@roundup.psfhosted.org> Message-ID: <1561995527.45.0.767248177045.issue37454@roundup.psfhosted.org> Tim Peters added the comment: Mark's analysis is spot-on - good eye :-) Here under 3.7.3 [MSC v.1916 64 bit (AMD64)] on win32, in the original script it makes no difference at all for negative "small x" (where, as Mark said, `1 - random.random()` is exactly representable): Counter({'equal': 50058, 'offset_log': 41936, 'regular_log': 8006}) Counter({'equal': 100000}) Changing to Mark's 1e-3 * random.random(): Counter({'offset_log': 99958, 'equal': 42}) Counter({'offset_log': 99884, 'equal': 116}) And going on to use 1e-6 instead: Counter({'offset_log': 100000}) Counter({'offset_log': 100000}) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:52:17 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 16:52:17 +0000 Subject: [docs] [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1561999937.65.0.287156361712.issue37469@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +14335 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14521 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 12:55:11 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 01 Jul 2019 16:55:11 +0000 Subject: [docs] [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562000110.99.0.913626077501.issue37459@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:45:10 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 17:45:10 +0000 Subject: [docs] [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562003110.34.0.146003564027.issue37469@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset e6b64b756f940147728ea7808fb686ffcae89176 by Vinay Sajip in branch 'master': bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521) https://github.com/python/cpython/commit/e6b64b756f940147728ea7808fb686ffcae89176 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:45:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 17:45:32 +0000 Subject: [docs] [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562003132.87.0.30502661938.issue37469@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14338 pull_request: https://github.com/python/cpython/pull/14525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 13:45:39 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 17:45:39 +0000 Subject: [docs] [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562003139.16.0.243832490826.issue37469@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14339 pull_request: https://github.com/python/cpython/pull/14526 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:37:15 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 01 Jul 2019 18:37:15 +0000 Subject: [docs] [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562006235.14.0.952822043746.issue37456@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hi, Would you like to do a PR updating it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:53:01 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 18:53:01 +0000 Subject: [docs] [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562007181.51.0.241406589034.issue37469@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset b0ab95bbe792b38e952688f8fa1657a78b35410e by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521) (GH-14526) https://github.com/python/cpython/commit/b0ab95bbe792b38e952688f8fa1657a78b35410e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:53:31 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 18:53:31 +0000 Subject: [docs] [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562007211.42.0.831051691152.issue37469@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 6cde61369e8174c493ca240cb52ebc9c2a2fe667 by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521) (GH-14525) https://github.com/python/cpython/commit/6cde61369e8174c493ca240cb52ebc9c2a2fe667 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 14:54:32 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 18:54:32 +0000 Subject: [docs] [issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue. In-Reply-To: <1561988505.1.0.589194187819.issue37469@roundup.psfhosted.org> Message-ID: <1562007272.82.0.33683165954.issue37469@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:04:34 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 19:04:34 +0000 Subject: [docs] [issue37390] Generate table of audit events for docs In-Reply-To: <1561391164.88.0.923938823513.issue37390@roundup.psfhosted.org> Message-ID: <1562007874.89.0.297995212247.issue37390@roundup.psfhosted.org> Steve Dower added the comment: The page is not generating correctly at https://docs.python.org/dev/library/audit_events.html Adding the documentation team, where hopefully someone will know what needs poking. ---------- nosy: +eric.araujo, ezio.melotti, mdk, willingc resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:14:27 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 19:14:27 +0000 Subject: [docs] [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562008467.36.0.262974807385.issue37470@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +14345 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:42:47 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 01 Jul 2019 19:42:47 +0000 Subject: [docs] [issue37390] Generate table of audit events for docs In-Reply-To: <1561391164.88.0.923938823513.issue37390@roundup.psfhosted.org> Message-ID: <1562010167.0.0.486111556675.issue37390@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Strange, I bet that I have seen this rendered table while the issue was closed. The docs table renders fine locally on latest master. Given that Audit event, Arguments and References table header are rendered with the table being replaced I guess somehow env.all_audit_events is empty. Is there something related to storing it with env? I hope docs CI to generate html daily is also done in a clean state like locally. Is it possible to get archives of docs releases to see from when this was missing as in https://docs.python.org/3.9/download.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:45:08 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 19:45:08 +0000 Subject: [docs] [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010308.44.0.949811946789.issue37470@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 0f4e8132820947d93eccf31b9e526b81c6ffa53d by Vinay Sajip in branch 'master': bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) https://github.com/python/cpython/commit/0f4e8132820947d93eccf31b9e526b81c6ffa53d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:45:35 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 19:45:35 +0000 Subject: [docs] [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010335.81.0.152284856228.issue37470@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14346 pull_request: https://github.com/python/cpython/pull/14533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:45:42 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Jul 2019 19:45:42 +0000 Subject: [docs] [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010342.27.0.600495662904.issue37470@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14347 pull_request: https://github.com/python/cpython/pull/14534 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:51:24 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 19:51:24 +0000 Subject: [docs] [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010684.41.0.971873153446.issue37470@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 844a9d64a4f640d1b20dc6ea54ab375680332d93 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) (GH-14534) https://github.com/python/cpython/commit/844a9d64a4f640d1b20dc6ea54ab375680332d93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:53:42 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 19:53:42 +0000 Subject: [docs] [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010822.9.0.51644292863.issue37470@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 91f9f098fcdb023dbb89d06c8833e89a11cbae4c by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) (GH-14533) https://github.com/python/cpython/commit/91f9f098fcdb023dbb89d06c8833e89a11cbae4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 15:54:29 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 01 Jul 2019 19:54:29 +0000 Subject: [docs] [issue37470] Make it explicit what happens when using a bounded queue with QueueHandler In-Reply-To: <1561988579.69.0.0525548005438.issue37470@roundup.psfhosted.org> Message-ID: <1562010869.14.0.260217495444.issue37470@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:37:22 2019 From: report at bugs.python.org (SoniEx2) Date: Mon, 01 Jul 2019 22:37:22 +0000 Subject: [docs] [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562020642.16.0.152383639057.issue37456@roundup.psfhosted.org> SoniEx2 added the comment: no thanks, I don't like signing CLAs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 18:40:23 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 01 Jul 2019 22:40:23 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised Message-ID: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> New submission from Kyle Stanley : In the section describing the functionality of os.chdir(), there is no mention of possible errors that can be raised. This differentiates significantly from the sections of other methods, such as os.is_dir(): "This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but :exc:`FileNotFoundError` is caught and not raised." For the purpose of consistency and providing additional useful information, I would suggest doing the same for os.chdir(). os.chdir() differs from os.is_dir() by directly raising the OSErrors FileNotFoundError and NotADirectoryError rather than handling them. I would suggest the addition of the following in os.chdir()'s section: "This method can raise :exc:`OSError`, such as exc:`FileNotFoundError` if the *path* does not lead to a valid file or exc:`NotADirectoryError` if the file specified is not a valid directory." or a less verbose alternative: "This method can raise :exc:`OSError`, such as exc:`FileNotFoundError` and exc:`NotADirectoryError`." If a user is reading the documentation, they might naturally assume that os.chdir() catches the FileNotFoundError, similar to the behavior in os.is_dir(). Also, the NotADirectoryError is not explicitly mentioned anywhere else on the "os.rst" page. If it were to be mentioned anywhere, os.chdir() would probably be the most relevant location to do so. Also, as a general question, what exactly is the standard for mentioning errors in the method sections for the Python documentation? For the purposes of clarity, I think it would be quite useful to explicitly mention errors, and a brief description of situations which raise them. If the behavior of the errors is consistent across of a group of methods, it can instead be mentioned in the header section. However, if the behavior not consistent, such as in this case, I think it is useful to briefly mention how the method deviates. It also seems useful to mention the error at least once if it is not explicitly mentioned elsewhere on the page, even if the parent is mentioned, such as with NotADirectoryError and OSError. This seems to be particularly important to do for the docs in a language such as Python, as it does not require the raise-able/throw-able errors to be mentioned in the code. I have already created a branch in my local fork of the cpython repository which implements this change, but I'll await feedback before submitting the PR. ---------- assignee: docs at python components: Documentation messages: 347080 nosy: aeros167, docs at python priority: normal severity: normal status: open title: Docs: Method os.chdir() does not mention errors that can be raised type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:04:53 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 01 Jul 2019 23:04:53 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562022293.6.0.110977389847.issue37478@roundup.psfhosted.org> Kyle Stanley added the comment: Minor clarifications: This change is referring to the "Files and Directories" section of the "os.rst" page in "cpython/Doc/library/os.rst". Also, I realized that I forgot to add the colon before "exc" in a couple locations. This was just a typo when writing the comment, it is correctly formatted in my local branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 19:41:57 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Jul 2019 23:41:57 +0000 Subject: [docs] [issue37390] Generate table of audit events for docs In-Reply-To: <1561391164.88.0.923938823513.issue37390@roundup.psfhosted.org> Message-ID: <1562024517.8.0.887937611084.issue37390@roundup.psfhosted.org> Steve Dower added the comment: I can't repro this. It looks like Doc/makefile#L196 passes -Ea which ought to deal with any old files (and it certainly does on my Ubuntu machine), so it's likely not that. The table contents is simply not in the file on docs.p.o, so I guess there's something in the build process that's failing? Or the environment is not making it to the output stage for some reason? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:03:56 2019 From: report at bugs.python.org (Zach Valenta) Date: Tue, 02 Jul 2019 03:03:56 +0000 Subject: [docs] [issue37480] add ptpython to list of alternate interpreters Message-ID: <1562036636.74.0.198372246702.issue37480@roundup.psfhosted.org> New submission from Zach Valenta : Referring to the last paragraph of chapter 14 of the tutorial on interactive interpreters: https://docs.python.org/3/tutorial/interactive.html#alternatives-to-the-interactive-interpreter Despite personally using bpython, ptpython seems both mature and popular enough to merit inclusion in the docs. Plus, bpython recommends them :) ---------- assignee: docs at python components: Documentation messages: 347099 nosy: docs at python, zjayv priority: normal severity: normal status: open title: add ptpython to list of alternate interpreters type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 1 23:06:25 2019 From: report at bugs.python.org (Zach Valenta) Date: Tue, 02 Jul 2019 03:06:25 +0000 Subject: [docs] [issue37480] add ptpython to list of alternate interpreters In-Reply-To: <1562036636.74.0.198372246702.issue37480@roundup.psfhosted.org> Message-ID: <1562036785.73.0.184107046823.issue37480@roundup.psfhosted.org> Change by Zach Valenta : ---------- keywords: +patch pull_requests: +14351 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 00:22:36 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 02 Jul 2019 04:22:36 +0000 Subject: [docs] [issue37465] Incorrect documentation for `s#` arguments in C API argument parsing In-Reply-To: <1561972031.86.0.144069442788.issue37465@roundup.psfhosted.org> Message-ID: Inada Naoki added the comment: > Oh! Fair enough, I had missed it. Does the note also involve `Py_BuildValue`? If so, the documentation of `Py_BuildValue` should probably be updated; if not, I think it would be clearer if the note mentioned that it only applies to parsing, not building, values. Yes, this is same to Py_BuildValue. The document of Py_BuildValue should be `int or Py_ssize_t` too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 06:04:03 2019 From: report at bugs.python.org (Atul Bagga) Date: Tue, 02 Jul 2019 10:04:03 +0000 Subject: [docs] [issue37426] getpass.getpass not working with on windows when ctrl+v is used to enter the string In-Reply-To: <1561628977.4.0.232389584594.issue37426@roundup.psfhosted.org> Message-ID: <1562061843.13.0.731809458597.issue37426@roundup.psfhosted.org> Atul Bagga added the comment: Suprisingly this works fine on ConEMU which I commonly use on windows though internally I still use powershell on conemu. https://conemu.github.io/ It does not work on CMD and Powershell consoles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 10:49:41 2019 From: report at bugs.python.org (=?utf-8?b?5p2o5piG5LuR?=) Date: Tue, 02 Jul 2019 14:49:41 +0000 Subject: [docs] [issue37487] PyList_GetItem() document regarding index Message-ID: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> New submission from ??? : The document of this function (PyList_GetItem()) says: "Return the object at position index in the list pointed to by list. The position must be **positive**,". However test shows the correct position index should be from 0 to len(list)-1. The claim of index **must be positive** is inaccurate and confusing. ---------- assignee: docs at python components: Documentation messages: 347144 nosy: docs at python, ??? priority: normal severity: normal status: open title: PyList_GetItem() document regarding index type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 12:01:38 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 02 Jul 2019 16:01:38 +0000 Subject: [docs] [issue37488] Document the "gotcha" behaviors in utcnow() and utcfromtimestamp() Message-ID: <1562083298.89.0.799843667155.issue37488@roundup.psfhosted.org> New submission from Paul Ganssle : Between Python 2 and Python 3, the meaning of a naive datetime underwent a subtle change. Previously a naive datetime was mostly treated as an abstract datetime in the same way a unitless number is treated as an abstract quantity (this is reflected in the current datetime documentation). In Python 3, though, it became more concrete in the sense that rather than just throwing an error whenever you try to do an operation that requires knowing the absolute datetime (e.g. convert between time zones, convert to timestamp, etc), certain operations will succeed with the assumption that naive times represent system local times. This makes `utcnow()` and `utcfromtimestamp()` dangerous, because they create a naive datetime as if the naive datetime represents UTC, but this context is then lost and if you ever use one of these "aware-only" operations (.astimezone, .timestamp, etc), you'll get an unexpected answer. For example, see this script, executed this with `TZ=America/New_York` on a machine with IANA data installed: >>> from datetime import datetime >>> dt = datetime.utcfromtimestamp(0) >>> dt datetime.datetime(1970, 1, 1, 0, 0) >>> dt.timestamp() 18000 This happens because EST is 18000s behind UTC, and `.timestamp()` gives a number of seconds after UTC (a concrete, not an abstract time). You get the same gotchas with `utcnow()`. I'm not sure if actually deprecating `utcnow` and `utcfromtimestamp` is worth it at the moment, but we can definitely start by adding a warning box to `utcnow()` and `utcfromtimestamp()` suggesting that you use the timezone-aware versions of these instead. We may also want to adjust the opening phrasing for the "naive objects" portion of the datetime documentation as well (https://docs.python.org/3.7/library/datetime.html), to reflect the fact that naive datetimes are no longer purely abstract quantities. ---------- assignee: docs at python components: Documentation messages: 347148 nosy: belopolsky, docs at python, p-ganssle priority: normal severity: normal stage: needs patch status: open title: Document the "gotcha" behaviors in utcnow() and utcfromtimestamp() type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 19:09:06 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Jul 2019 23:09:06 +0000 Subject: [docs] [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562108946.6.0.666234231587.issue37459@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 19:43:09 2019 From: report at bugs.python.org (Rune Tynan) Date: Tue, 02 Jul 2019 23:43:09 +0000 Subject: [docs] [issue18697] Unify arguments names in Unicode object C API documentation In-Reply-To: <1376074126.58.0.40251146149.issue18697@psf.upfronthosting.co.za> Message-ID: <1562110989.66.0.54122965132.issue18697@roundup.psfhosted.org> Rune Tynan added the comment: It has been over a month and I'm still waiting for an updated PR review. I understand if people are busy, but don't want this to just fall through the cracks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 21:56:20 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 01:56:20 +0000 Subject: [docs] [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562118980.7.0.590132934668.issue37441@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14384 pull_request: https://github.com/python/cpython/pull/14565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 21:56:23 2019 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 Jul 2019 01:56:23 +0000 Subject: [docs] [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562118983.79.0.0115484327524.issue37441@roundup.psfhosted.org> Xiang Zhang added the comment: New changeset aeecf380660ea459d85bb5f59d76bb54f757b5be by Xiang Zhang (Hai Shi) in branch 'master': bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453) https://github.com/python/cpython/commit/aeecf380660ea459d85bb5f59d76bb54f757b5be ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 21:56:28 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 01:56:28 +0000 Subject: [docs] [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562118988.98.0.358268709311.issue37441@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14385 pull_request: https://github.com/python/cpython/pull/14566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 22:03:02 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 02:03:02 +0000 Subject: [docs] [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562119382.1.0.13785337102.issue37441@roundup.psfhosted.org> miss-islington added the comment: New changeset 6323ac1dd49ddbd935ac3354cc5d792c743e7018 by Miss Islington (bot) in branch '3.7': bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453) https://github.com/python/cpython/commit/6323ac1dd49ddbd935ac3354cc5d792c743e7018 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 22:04:03 2019 From: report at bugs.python.org (Gregory Szorc) Date: Wed, 03 Jul 2019 02:04:03 +0000 Subject: [docs] [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562119443.19.0.67223953112.issue37459@roundup.psfhosted.org> Gregory Szorc added the comment: I'm a bit busy with other things this week to submit a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 22:04:33 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Jul 2019 02:04:33 +0000 Subject: [docs] [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562119473.22.0.66115574188.issue37441@roundup.psfhosted.org> miss-islington added the comment: New changeset b8e198a5d09ca876b87baaf6efd2b2e7c9e3a0b3 by Miss Islington (bot) in branch '3.8': bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453) https://github.com/python/cpython/commit/b8e198a5d09ca876b87baaf6efd2b2e7c9e3a0b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 22:23:02 2019 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 03 Jul 2019 02:23:02 +0000 Subject: [docs] [issue37441] Fix a param error in exceptions.rst In-Reply-To: <1561741206.31.0.47580103034.issue37441@roundup.psfhosted.org> Message-ID: <1562120582.23.0.492172963699.issue37441@roundup.psfhosted.org> Change by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 2 23:23:29 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Wed, 03 Jul 2019 03:23:29 +0000 Subject: [docs] [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562124208.99.0.0268384438568.issue37459@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- keywords: +patch pull_requests: +14386 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14568 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 03:41:11 2019 From: report at bugs.python.org (Oleksandr Pavliuk) Date: Wed, 03 Jul 2019 07:41:11 +0000 Subject: [docs] [issue34788] ipaddress module fails on rfc4007 scoped IPv6 addresses In-Reply-To: <1537799403.03.0.956365154283.issue34788@psf.upfronthosting.co.za> Message-ID: <1562139671.73.0.0158507506181.issue34788@roundup.psfhosted.org> Oleksandr Pavliuk added the comment: Pull request needs a review. ---------- nosy: +opavlyuk _______________________________________ Python tracker _______________________________________ From dominique.winkel at free.fr Wed Jul 3 13:32:42 2019 From: dominique.winkel at free.fr (Dominique.winkel) Date: Wed, 3 Jul 2019 19:32:42 +0200 Subject: [docs] Python documentation Message-ID: <004e01d531c5$53014c50$f903e4f0$@free.fr> Hi, Thank you for all the data available on your website, but all the links given here are broken : https://docs.python.org/fr/3.5/download.html Thank you. Dominique -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Jul 3 17:41:56 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Jul 2019 21:41:56 +0000 Subject: [docs] [issue31517] MainThread association logic is fragile In-Reply-To: <1505826011.26.0.999867844657.issue31517@psf.upfronthosting.co.za> Message-ID: <1562190116.76.0.818471481147.issue31517@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- nosy: +aldwinaldwin, fabioz, int19h, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:42:03 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Jul 2019 21:42:03 +0000 Subject: [docs] [issue31517] MainThread association logic is fragile In-Reply-To: <1505826011.26.0.999867844657.issue31517@psf.upfronthosting.co.za> Message-ID: <1562190123.19.0.458940621506.issue31517@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- versions: +Python 3.8, Python 3.9 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 17:52:30 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 03 Jul 2019 21:52:30 +0000 Subject: [docs] [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562190750.6.0.229658408269.issue35605@roundup.psfhosted.org> Anthony Sottile added the comment: This has regressed again -- I'll make another patch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:00:37 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 03 Jul 2019 22:00:37 +0000 Subject: [docs] [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562191237.24.0.960832764561.issue35605@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +14395 pull_request: https://github.com/python/cpython/pull/14576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:14:57 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Jul 2019 22:14:57 +0000 Subject: [docs] [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562192097.03.0.441414226993.issue35605@roundup.psfhosted.org> Steve Dower added the comment: Your PR is against 3.6 - is that intentional? ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:25:44 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 03 Jul 2019 22:25:44 +0000 Subject: [docs] [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562192744.58.0.308926374387.issue35605@roundup.psfhosted.org> Anthony Sottile added the comment: yes, as was the original PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:40:37 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Jul 2019 22:40:37 +0000 Subject: [docs] [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562193637.82.0.811339097681.issue35605@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 18:43:34 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Jul 2019 22:43:34 +0000 Subject: [docs] [issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped In-Reply-To: <1546016436.32.0.942702382011.issue35605@roundup.psfhosted.org> Message-ID: <1562193814.66.0.301086411251.issue35605@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the additional PR. Accepted for post-3.6.9 (PR 14576, commit a6d97e200863e7e5fc60bbc8f121b86a2098ef2d - message AWOL?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:58:57 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 04 Jul 2019 00:58:57 +0000 Subject: [docs] [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562201937.24.0.487877271877.issue37459@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset b607d992e76e485f20be3bfd6b311525123f936b by Barry Warsaw (aldwinaldwin) in branch 'master': bpo-37459: importlib docs improperly reference get_resource_loader() (#14568) https://github.com/python/cpython/commit/b607d992e76e485f20be3bfd6b311525123f936b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:59:02 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jul 2019 00:59:02 +0000 Subject: [docs] [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562201942.84.0.354059643012.issue37459@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14399 pull_request: https://github.com/python/cpython/pull/14580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 20:59:12 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Jul 2019 00:59:12 +0000 Subject: [docs] [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562201952.68.0.0846074845612.issue37459@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14400 pull_request: https://github.com/python/cpython/pull/14581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 21:27:43 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 04 Jul 2019 01:27:43 +0000 Subject: [docs] [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562203663.22.0.576617734043.issue37459@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset 070d3d928d20ccb4790dd077f3794af3c2932e5c by Barry Warsaw (Miss Islington (bot)) in branch '3.8': bpo-37459: importlib docs improperly reference get_resource_loader() (GH-14568) (GH-14580) https://github.com/python/cpython/commit/070d3d928d20ccb4790dd077f3794af3c2932e5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 21:28:02 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 04 Jul 2019 01:28:02 +0000 Subject: [docs] [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562203682.48.0.541183998987.issue37459@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset d7d9c9f7c22113a405f1a340d050edfa2d024dff by Barry Warsaw (Miss Islington (bot)) in branch '3.7': bpo-37459: importlib docs improperly reference get_resource_loader() (GH-14568) (GH-14581) https://github.com/python/cpython/commit/d7d9c9f7c22113a405f1a340d050edfa2d024dff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 3 21:28:28 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 04 Jul 2019 01:28:28 +0000 Subject: [docs] [issue37459] importlib docs improperly reference get_resource_loader() In-Reply-To: <1561948086.26.0.674606380672.issue37459@roundup.psfhosted.org> Message-ID: <1562203708.16.0.184452818994.issue37459@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- resolution: -> fixed stage: patch review -> backport needed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:19:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 10:19:47 +0000 Subject: [docs] [issue31517] MainThread association logic is fragile In-Reply-To: <1505826011.26.0.999867844657.issue31517@psf.upfronthosting.co.za> Message-ID: <1562235586.95.0.720729008203.issue31517@roundup.psfhosted.org> STINNER Victor added the comment: Python internals already know who is the "main" thread: _PyRuntime.main_thread. It's maintained up to date, even after a fork, PyOS_AfterFork_Child() calls _PyRuntimeState_ReInitThreads() which does: // This was initially set in _PyRuntimeState_Init(). runtime->main_thread = PyThread_get_thread_ident(); I already added _thread._is_main_interpreter() to deny spawning daemon threads in subinterpreters: bpo-37266. We can add _thread._is_main_thread() which can reuse Modules/signalmodule.c code: static int is_main(_PyRuntimeState *runtime) { unsigned long thread = PyThread_get_thread_ident(); PyInterpreterState *interp = _PyRuntimeState_GetThreadState(runtime)->interp; return (thread == runtime->main_thread && interp == runtime->interpreters.main); } For example, this function is used by signal.signal: if (!is_main(runtime)) { PyErr_SetString(PyExc_ValueError, "signal only works in main thread"); return NULL; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 06:31:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Jul 2019 10:31:10 +0000 Subject: [docs] [issue31517] MainThread association logic is fragile In-Reply-To: <1505826011.26.0.999867844657.issue31517@psf.upfronthosting.co.za> Message-ID: <1562236270.77.0.414002925159.issue31517@roundup.psfhosted.org> STINNER Victor added the comment: bpo-37416 has been marked as a duplicate of this issue. It contains snippet.py to reproduce a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 4 23:44:14 2019 From: report at bugs.python.org (karl) Date: Fri, 05 Jul 2019 03:44:14 +0000 Subject: [docs] [issue24772] Smaller viewport shifts the "expand left menu" character into the text In-Reply-To: <1438422511.74.0.548589592521.issue24772@psf.upfronthosting.co.za> Message-ID: <1562298254.88.0.637066589929.issue24772@roundup.psfhosted.org> karl added the comment: So I had time to look at it today. And it would probably be better to solve https://bugs.python.org/issue23312 which would make this one here useless and would actually provide a solution for many people. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:09:54 2019 From: report at bugs.python.org (karl) Date: Fri, 05 Jul 2019 04:09:54 +0000 Subject: [docs] [issue23312] google thinks the docs are mobile unfriendly In-Reply-To: <1422121325.13.0.140473067698.issue23312@psf.upfronthosting.co.za> Message-ID: <1562299794.88.0.932727037143.issue23312@roundup.psfhosted.org> karl added the comment: This issue should probably be addressed now on https://github.com/python/python-docs-theme ---------- nosy: +karlcow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 00:16:26 2019 From: report at bugs.python.org (karl) Date: Fri, 05 Jul 2019 04:16:26 +0000 Subject: [docs] [issue23312] google thinks the docs are mobile unfriendly In-Reply-To: <1422121325.13.0.140473067698.issue23312@psf.upfronthosting.co.za> Message-ID: <1562300186.53.0.261962637869.issue23312@roundup.psfhosted.org> karl added the comment: I created https://github.com/python/python-docs-theme/issues/30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:20:39 2019 From: report at bugs.python.org (Marco Dickert) Date: Fri, 05 Jul 2019 08:20:39 +0000 Subject: [docs] [issue37503] Queue.join(): Broken example in documentation Message-ID: <1562314839.12.0.185461077472.issue37503@roundup.psfhosted.org> New submission from Marco Dickert : I guess I found a bug in the documented Queue.join() example [1]. The problem is the break condition for the while loop of the worker. If the item is None, the loop breaks, but the worker never calls item.task_done(). Thus the q.join() statement never returns, because the last task (None) remains unfinished. This should solve the issue: ``` if item is None: item.task_done() break ``` [1] https://docs.python.org/3/library/queue.html#queue.Queue.join ---------- assignee: docs at python components: Documentation messages: 347310 nosy: docs at python, misterunknown priority: normal severity: normal status: open title: Queue.join(): Broken example in documentation versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:31:49 2019 From: report at bugs.python.org (Marco Dickert) Date: Fri, 05 Jul 2019 08:31:49 +0000 Subject: [docs] [issue37503] Queue.join(): Broken example in documentation In-Reply-To: <1562314839.12.0.185461077472.issue37503@roundup.psfhosted.org> Message-ID: <1562315509.37.0.79063132625.issue37503@roundup.psfhosted.org> Marco Dickert added the comment: Sorry, I missed that q.join() is executed *before* the "None" item is added to the queue. In my real-world case I called q.join() *after* I added the "None" item. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:44:18 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jul 2019 08:44:18 +0000 Subject: [docs] [issue37346] Documentation of os not using OSError subclasses In-Reply-To: <1561021736.27.0.454231232898.issue37346@roundup.psfhosted.org> Message-ID: <1562316258.13.0.431487133582.issue37346@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14411 pull_request: https://github.com/python/cpython/pull/14596 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:45:06 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Jul 2019 08:45:06 +0000 Subject: [docs] [issue37346] Documentation of os not using OSError subclasses In-Reply-To: <1561021736.27.0.454231232898.issue37346@roundup.psfhosted.org> Message-ID: <1562316306.39.0.168979269062.issue37346@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14413 pull_request: https://github.com/python/cpython/pull/14597 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 04:52:21 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 05 Jul 2019 08:52:21 +0000 Subject: [docs] [issue37346] Documentation of os not using OSError subclasses In-Reply-To: <1561021736.27.0.454231232898.issue37346@roundup.psfhosted.org> Message-ID: <1562316741.11.0.811928325861.issue37346@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks! ---------- nosy: +asvetlov resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:49:15 2019 From: report at bugs.python.org (Matthias Klose) Date: Fri, 05 Jul 2019 09:49:15 +0000 Subject: [docs] [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 Message-ID: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> New submission from Matthias Klose : 3.8 b2 now requires sphinx2 (according to SilentGhost on IRC), but only has documented 1.8. I'm aware of issue #36007, the last time that the requirements were bumped. So again, the dependencies were bumped without documenting, and why do we require the latest sphinx again? It's difficult to provide the documentation as a Linux distro when you always have to provide the latest build tools. Please compare that to other projects that are usually fine to build with any doxygen, texinfo, or whatever doc tool. Any hint where the new dependency was introduced, and probably can be backed out? The actuall error is: writing... Exception occurred: File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 567, in __getitem__ return self.attributes[key] KeyError: 'cols' # Sphinx version: 1.8.4 # Python version: 3.7.3 (CPython) # Docutils version: 0.14 # Jinja2 version: 2.10 # Last messages: # distutils/sourcedist # distutils/builtdist # distutils/examples # distutils/extending # distutils/commandref # distutils/apiref # install/index # # resolving references... # writing... # Loaded extensions: # sphinx.ext.mathjax (1.8.4) from /usr/lib/python3/dist-packages/sphinx/ext/mathjax.py # alabaster (0.7.8) from /usr/lib/python3/dist-packages/alabaster/__init__.py # sphinx.ext.coverage (1.8.4) from /usr/lib/python3/dist-packages/sphinx/ext/coverage.py # sphinx.ext.doctest (1.8.4) from /usr/lib/python3/dist-packages/sphinx/ext/doctest.py # pyspecific (1.0) from /home/packages/python/3.8/python3.8-3.8.0~b2/Doc/tools/extensions/pyspecific.py # c_annotations (1.0) from /home/packages/python/3.8/python3.8-3.8.0~b2/Doc/tools/extensions/c_annotations.py # escape4chm (1.0) from /home/packages/python/3.8/python3.8-3.8.0~b2/Doc/tools/extensions/escape4chm.py Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sphinx/cmd/build.py", line 304, in build_main app.build(args.force_all, filenames) File "/usr/lib/python3/dist-packages/sphinx/application.py", line 341, in build self.builder.build_update() File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 342, in build_update self.build(['__all__'], to_build) File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 412, in build self.write(docnames, list(updated_docnames), method) File "/usr/lib/python3/dist-packages/sphinx/builders/texinfo.py", line 187, in write docwriter.write(doctree, destination) File "/usr/lib/python3/dist-packages/docutils/writers/__init__.py", line 80, in write self.translate() File "/usr/lib/python3/dist-packages/sphinx/writers/texinfo.py", line 139, in translate self.document.walkabout(visitor) File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 174, in walkabout if child.walkabout(visitor): File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 174, in walkabout if child.walkabout(visitor): File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 174, in walkabout if child.walkabout(visitor): [Previous line repeated 9 more times] File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 166, in walkabout visitor.dispatch_visit(self) File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 1882, in dispatch_visit return method(node) File "/usr/lib/python3/dist-packages/sphinx/writers/texinfo.py", line 1126, in visit_tgroup self.n_cols = node['cols'] File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 567, in __getitem__ return self.attributes[key] KeyError: 'cols' ---------- assignee: docs at python components: Documentation messages: 347322 nosy: docs at python, doko priority: normal severity: normal status: open title: 3.8 b2 now requires sphinx2, but only has documented 1.8 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 05:51:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Jul 2019 09:51:08 +0000 Subject: [docs] [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562320268.91.0.137225853736.issue37504@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:07:35 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 05 Jul 2019 10:07:35 +0000 Subject: [docs] [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562321255.27.0.750746323914.issue37504@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 06:12:48 2019 From: report at bugs.python.org (Matthias Klose) Date: Fri, 05 Jul 2019 10:12:48 +0000 Subject: [docs] [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562321568.14.0.547461829118.issue37504@roundup.psfhosted.org> Matthias Klose added the comment: so this might not be a sphinx 2.x issue, the docs build fine for the html output, but the reported error is for building the texinfo files: make -C Doc texinfo That worked for 3.8 b1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 09:25:26 2019 From: report at bugs.python.org (Guilloux) Date: Fri, 05 Jul 2019 13:25:26 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562333126.32.0.937696422697.issue37149@roundup.psfhosted.org> Change by Guilloux : ---------- versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 10:29:02 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Jul 2019 14:29:02 +0000 Subject: [docs] [issue23312] google thinks the docs are mobile unfriendly In-Reply-To: <1422121325.13.0.140473067698.issue23312@psf.upfronthosting.co.za> Message-ID: <1562336942.12.0.478034124386.issue23312@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +mdk versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 11:14:10 2019 From: report at bugs.python.org (hai shi) Date: Fri, 05 Jul 2019 15:14:10 +0000 Subject: [docs] [issue37508] A wrong return type in memory.rst Message-ID: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> New submission from hai shi : the result should be a bytes object in #L70 in https://github.com/python/cpython/blob/master/Doc/c-api/memory.rst ---------- assignee: docs at python components: Documentation messages: 347356 nosy: docs at python, shihai1991 priority: normal severity: normal status: open title: A wrong return type in memory.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 11:16:45 2019 From: report at bugs.python.org (hai shi) Date: Fri, 05 Jul 2019 15:16:45 +0000 Subject: [docs] [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562339805.22.0.910963462733.issue37508@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14419 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 13:16:50 2019 From: report at bugs.python.org (Dmitry Shachnev) Date: Fri, 05 Jul 2019 17:16:50 +0000 Subject: [docs] [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562347010.81.0.354700430354.issue37504@roundup.psfhosted.org> Change by Dmitry Shachnev : ---------- nosy: +mitya57 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:33:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2019 19:33:51 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562355231.29.0.956725254733.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: > what exactly is the standard for mentioning errors My impression is that there is none, or that it is inconsistent, but that the trend is to say more. If you want to followup, check the documentation chapters of the devguide, and if there is nothing clear now, post to the pydev list. https://docs.python.org/3/library/os.html#os-file-dir has os.chdir(path) Change the current working directory to path. This function can support specifying a file descriptor. The descriptor must refer to an opened directory, not an open file. Most of the other entries in do not mention errors, but is_dir has the line mentioned. I think the condensed line is enough to add, as the sub-exception names are self-explanatory; and when they occur, the full message certainly is. (I verified both possibilities mentioned.) Most users should just catch OSError, if anything. Make a PR with the short message and request me as a reviewer. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:37:17 2019 From: report at bugs.python.org (Dmitry Shachnev) Date: Fri, 05 Jul 2019 19:37:17 +0000 Subject: [docs] [issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8 In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562355437.59.0.87375573462.issue37504@roundup.psfhosted.org> Change by Dmitry Shachnev : ---------- keywords: +patch pull_requests: +14421 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 15:39:39 2019 From: report at bugs.python.org (Dmitry Shachnev) Date: Fri, 05 Jul 2019 19:39:39 +0000 Subject: [docs] [issue37504] Documentation fails to build when using Sphinx' texinfo builder In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1562355579.92.0.0963921326129.issue37504@roundup.psfhosted.org> Change by Dmitry Shachnev : ---------- title: 3.8 b2 now requires sphinx2, but only has documented 1.8 -> Documentation fails to build when using Sphinx' texinfo builder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 16:10:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Jul 2019 20:10:22 +0000 Subject: [docs] [issue37487] PyList_GetItem() document regarding index In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562357422.5.0.983055141547.issue37487@roundup.psfhosted.org> Terry J. Reedy added the comment: Good catch. (In the future, try to include the url, as below.) The full sentence in question, at https://docs.python.org/3/c-api/list.html#c.PyList_GetItem, is "The position must be positive, indexing from the end of the list is not supported." 'positive' should be 'non-negative'. The next sentence deal with out-of-bounds positions, and these could be specified as '(< 0, > len(list))' ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:33:18 2019 From: report at bugs.python.org (Dmitriy) Date: Fri, 05 Jul 2019 21:33:18 +0000 Subject: [docs] [issue37512] Error in the documentation about string concatenation Message-ID: <1562362398.93.0.443192979272.issue37512@roundup.psfhosted.org> New submission from Dmitriy : There is an error in documentation about string concatenation: https://docs.python.org/3/library/stdtypes.html --- Common Sequence Operations [...] 6. Concatenating immutable sequences always results in a new object. This means that building up a sequence by repeated concatenation will have a quadratic runtime cost in the total sequence length. To get a linear runtime cost, you must switch to one of the alternatives below: - if concatenating str objects, you can build a list and use str.join() at the end or else write to an io.StringIO instance and retrieve its value when complete --- It is not true for str objects anymore. Example using timeit module shows that time grows linearly: >>> timeit('a+="a"', setup='a=""', number=10000) 0.0005754000012530014 >>> timeit('a+="a"', setup='a=""', number=100000) 0.005819800004246645 But for bytes it is still right: >>> timeit('a+=b"a"', setup='a=b""', number=10000) 0.0017669000080786645 >>> timeit('a+=b"a"', setup='a=b""', number=100000) 0.20758410000416916 ---------- assignee: docs at python components: Documentation messages: 347390 nosy: dmitriym, docs at python priority: normal severity: normal status: open title: Error in the documentation about string concatenation type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 17:55:34 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 05 Jul 2019 21:55:34 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562363734.83.0.736035842311.issue37478@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for the feedback terry. Do you think it would be helpful to work through some of the other commonly used functions in OS, adding condensed explanations of exceptions which can be raised? In general, it seems quite useful for users to be able to figure out the exceptions in which they may need to account for when using each of the functions. Also, should the naming convention be "method" or "function"? The two roughly refer to the same thing, but as far as I'm aware, the convention in Python is to refer to them as "functions". I'm used to calling them "methods" from my prior experience with OOP, so that's why I did so in my initial condensed description. On the docs for OS, there seems to be a few instances where the term "method" is used. Personally, I don't mind the usage of either term, at the end of the day it's just semantics. But for the purposes of documentation, consistency seems preferable. Should I create a PR for replacing the mentions of "method" with "function"? Since it's quite minor and in the same OS.rst file, should I link it to this issue instead of creating a new one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:08:19 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 05 Jul 2019 22:08:19 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562364499.87.0.669806253612.issue37478@roundup.psfhosted.org> Change by Kyle Stanley : ---------- keywords: +patch pull_requests: +14425 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:14:48 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 05 Jul 2019 22:14:48 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562364888.07.0.30258463593.issue37478@roundup.psfhosted.org> Kyle Stanley added the comment: Actually, I don't believe that I have the appropriate permissions to manually specify reviewers for PRs in the cpython repository. Do I have to be added a member of the Python organization on GitHub for this? I'm registered as a PSF contributing member, but I don't think that alone translates to any repository permissions. Could I be added as a member with low level permissions such as editing issue labels without being granted commit? This would also be helpful for adding "skip news" labels on any other issues, I've been doing a decent amount of PR reviews recently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 18:32:02 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 05 Jul 2019 22:32:02 +0000 Subject: [docs] [issue37512] Error in the documentation about string concatenation In-Reply-To: <1562362398.93.0.443192979272.issue37512@roundup.psfhosted.org> Message-ID: <1562365922.71.0.959996768848.issue37512@roundup.psfhosted.org> Eric V. Smith added the comment: It's my understanding that this is a quality of implementation issue, and that in other (non-CPython) implementations, the run time for repeated concatenation may indeed be quadratic. The optimization in CPython relies on knowing the reference count is 1. If CPython were to switch away from reference counting, I would expect the behavior of repeated concatenation to be quadratic again. I'm not sure if the deserves a documentation note or not. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 5 21:14:12 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 06 Jul 2019 01:14:12 +0000 Subject: [docs] [issue37512] Error in the documentation about string concatenation In-Reply-To: <1562362398.93.0.443192979272.issue37512@roundup.psfhosted.org> Message-ID: <1562375652.92.0.434565471498.issue37512@roundup.psfhosted.org> Steven D'Aprano added the comment: Eric is correct that this is a CPython optimization, it is not a language feature. Furthermore, it is an optimization that can be affected by rather subtle factors such as the operating system memory management. Here is a thread demonstrating that code that relied on this optimization ran fast on Linux and slow on Windows, literally hundreds of times slower than other tools: https://mail.python.org/archives/list/python-dev at python.org/thread/EQO6HDZXHFCP4DBEE5Q7MYLHPJMGJ7DQ/ If you prefer the old mailman archives, here are a few relevant posts: https://mail.python.org/pipermail/python-dev/2009-August/091125.html https://mail.python.org/pipermail/python-dev/2009-September/091582.html https://mail.python.org/pipermail/python-dev/2009-September/091592.html Best practice is to *not* rely on this optimization, but to use str.join. That ensures that: - your code remains fast if run on alternate implementations; - your code remains fast if the OS memory management changes; - your code remains fast if you change your code slightly. For example, I expect both of the following to show the documented quadratic behaviour: - Prepending instead of appending - keeping two or more references to the string being appended to partials = [] current = '' for s in list_of_strings: partials.append(current) current += s There may be others. Perhaps we ought to document this optimization specifically so we can suggest that it is intended for improving performance of casual scripts, and that *best practice* for professional quality code remains str.join. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:03:16 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 06 Jul 2019 04:03:16 +0000 Subject: [docs] [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562385796.45.0.802415089943.issue37508@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 39a5d17a7f1387582eb484422df450bc09a5543e by Benjamin Peterson (Hai Shi) in branch 'master': closes bpo-37508: Fix name of type in memory.rst. (GH-14604) https://github.com/python/cpython/commit/39a5d17a7f1387582eb484422df450bc09a5543e ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:03:31 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 04:03:31 +0000 Subject: [docs] [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562385811.09.0.514750822498.issue37508@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14427 pull_request: https://github.com/python/cpython/pull/14613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:03:37 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 04:03:37 +0000 Subject: [docs] [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562385817.86.0.649783285262.issue37508@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14428 pull_request: https://github.com/python/cpython/pull/14614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:08:43 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 04:08:43 +0000 Subject: [docs] [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562386123.88.0.632142448742.issue37508@roundup.psfhosted.org> miss-islington added the comment: New changeset af5e62e9e2b56017d3716fce40d959adfb753554 by Miss Islington (bot) in branch '3.7': closes bpo-37508: Fix name of type in memory.rst. (GH-14604) https://github.com/python/cpython/commit/af5e62e9e2b56017d3716fce40d959adfb753554 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:10:00 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 04:10:00 +0000 Subject: [docs] [issue37508] A wrong return type in memory.rst In-Reply-To: <1562339650.89.0.898406342739.issue37508@roundup.psfhosted.org> Message-ID: <1562386200.47.0.878682508401.issue37508@roundup.psfhosted.org> miss-islington added the comment: New changeset cf294c48e4f97117f708c116362208d28ebfe08f by Miss Islington (bot) in branch '3.8': closes bpo-37508: Fix name of type in memory.rst. (GH-14604) https://github.com/python/cpython/commit/cf294c48e4f97117f708c116362208d28ebfe08f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:28:06 2019 From: report at bugs.python.org (hai shi) Date: Sat, 06 Jul 2019 04:28:06 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst Message-ID: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> New submission from hai shi : Python 3.9.0a0 (heads/master-dirty:80097e0, Jul 6 2019, 02:14:54) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> class POINT(Structure): ... _fields_ = [("x", c_int), ... ("y", c_int)] ... >>> POINT(1, 2, 3) Traceback (most recent call last): File "", line 1, in TypeError: too many initializers and the init function in: https://github.com/python/cpython/blob/master/Modules/_ctypes/_ctypes.c#L4335 ---------- assignee: docs at python components: Documentation messages: 347419 nosy: docs at python, shihai1991 priority: normal severity: normal status: open title: Fix a type error in ctypes.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:29:45 2019 From: report at bugs.python.org (hai shi) Date: Sat, 06 Jul 2019 04:29:45 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562387385.82.0.302358224397.issue37513@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14429 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 00:34:29 2019 From: report at bugs.python.org (hai shi) Date: Sat, 06 Jul 2019 04:34:29 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562387669.02.0.647577134979.issue37513@roundup.psfhosted.org> hai shi added the comment: or the value error replace type error in struct_init(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:22:31 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 06:22:31 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562394151.88.0.128390274351.issue37149@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14430 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:32:00 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 06:32:00 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562394720.2.0.761936101933.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 45bc61b97178b27ae05bd3eb95481bf0325795bb by Terry Jan Reedy in branch 'master': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/45bc61b97178b27ae05bd3eb95481bf0325795bb ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:32:05 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 06:32:05 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562394725.45.0.470038230986.issue37149@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14431 pull_request: https://github.com/python/cpython/pull/14617 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:32:13 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 06:32:13 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562394733.81.0.220647475622.issue37149@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14432 pull_request: https://github.com/python/cpython/pull/14618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:35:41 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 06:35:41 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562394941.23.0.809169274588.issue37149@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14433 pull_request: https://github.com/python/cpython/pull/14619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:37:42 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 06:37:42 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562395062.21.0.598018955754.issue37149@roundup.psfhosted.org> miss-islington added the comment: New changeset d2c5677a4f3be7de572def0a914b96385d7982b0 by Miss Islington (bot) in branch '3.7': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/d2c5677a4f3be7de572def0a914b96385d7982b0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:38:33 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 06:38:33 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562395113.73.0.0857633670515.issue37149@roundup.psfhosted.org> miss-islington added the comment: New changeset ea9c8caa13977561787bf2de430f18c2031dde0d by Miss Islington (bot) in branch '3.8': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/ea9c8caa13977561787bf2de430f18c2031dde0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:45:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 06:45:40 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562395540.06.0.888282240579.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: Ned, PR-14616 replaces a dead link to the most important online Tkinter reference. Please consider cherry-picking the 3.7 backport (already merged) into the upcoming 3.7.4. Many people are lost without the reference, as they find reading the tcl/tk reference much harder. (The question has come up on Stackoverflow also.) I checked that the new link in the rebuilt revised page works. The longer term solution is a complete in-house doc. I have some ideas, which I will share later, for something more compact than the Shipman work (168 pages for the pdf). Ned, a separate question is whether the link fix or a local replacement can be backported to 3.6. It is like having half the tkinter doc, the part covering tk widgets, removed. ---------- nosy: +benjamin.peterson, larry, lukasz.langa, ned.deily -gpolo, miss-islington priority: normal -> release blocker stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 02:52:13 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 06:52:13 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562395932.99.0.334994984371.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: The 2.7 backport shows a clean 2.7 diff, Travis merged and passed it, but required Appveyor just says 'non-mergeable' with no details, and no way to discover why or to cleanly retry. I will try close and open once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 03:00:46 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 07:00:46 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562396446.53.0.516497099224.issue37149@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14434 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 03:04:56 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 07:04:56 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562396696.39.0.484536571994.issue37149@roundup.psfhosted.org> miss-islington added the comment: New changeset 55270d09c212654c4f1bc9ebf9a0081c169a6d12 by Miss Islington (bot) in branch '2.7': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/55270d09c212654c4f1bc9ebf9a0081c169a6d12 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 07:32:57 2019 From: report at bugs.python.org (Dmitriy) Date: Sat, 06 Jul 2019 11:32:57 +0000 Subject: [docs] [issue37512] Error in the documentation about string concatenation In-Reply-To: <1562362398.93.0.443192979272.issue37512@roundup.psfhosted.org> Message-ID: <1562412777.68.0.0703333098978.issue37512@roundup.psfhosted.org> Dmitriy added the comment: Yes, optimization is really not working in case of prepending. In case of multiple references I couldn't get quadratic time grow. Concerning the Windows, yes, the optimization may be not always efficient: >>> timeit('a+="a"', setup='a=""', number=10000) 0.0011690999999984797 >>> timeit('a+="a"', setup='a=""', number=100000) 0.01114439999999206 >>> timeit('a+="a"', setup='a=""', number=1000000) 0.10783829999999739 >>> timeit('a+="a"', setup='a=""', number=10000000) 5.636337499999996 As I understand this is the case related to OS memory management. But on Linux I got fairly predictable results: >>> timeit('a+="a"', setup='a=""', number=10000) 0.0006532900151796639 >>> timeit('a+="a"', setup='a=""', number=100000) 0.006340583000564948 >>> timeit('a+="a"', setup='a=""', number=1000000) 0.06438201799755916 >>> timeit('a+="a"', setup='a=""', number=10000000) 0.6354853530065157 >>> timeit('a+="a"', setup='a=""', number=100000000) 6.365498173021479 Also I have found the mention about optimization in PEP8 https://www.python.org/dev/peps/pep-0008/#programming-recommendations So maybe it would be nice to add some notes or reference to the part of upper PEP in docs about optimizations in CPython to make it more clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 09:23:10 2019 From: report at bugs.python.org (=?utf-8?q?Lanteri_J=C3=A9r=C3=B4me?=) Date: Sat, 06 Jul 2019 13:23:10 +0000 Subject: [docs] [issue37514] french translation Spelling mistake on datetime python's library documentation online Message-ID: <1562419390.4.0.81704201562.issue37514@roundup.psfhosted.org> New submission from Lanteri J?r?me : "Un objet avis? est utilis? pour repr?sent? un moment" corrected should be: "Un objet avis? est utilis? pour repr?senter un moment" Comment for help French translator: Vous pouvez tester en rempla?ant le verbe suspect? par un verbe du troisi?me groupe, tel que "faire": "Un objet avis? est utilis? pour faire..." (?a fonctionne, il n'est pas conjugu?, par ce que on ne pourrait pas dire: "Un objet avis? est utilis? pour fait..."). C'est une astuce facile ? retenir. ---------- assignee: docs at python components: Documentation messages: 347432 nosy: docs at python, jerome_l priority: normal severity: normal status: open title: french translation Spelling mistake on datetime python's library documentation online versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 09:33:48 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 06 Jul 2019 13:33:48 +0000 Subject: [docs] [issue37514] french translation Spelling mistake on datetime python's library documentation online In-Reply-To: <1562419390.4.0.81704201562.issue37514@roundup.psfhosted.org> Message-ID: <1562420028.78.0.431057005751.issue37514@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 09:46:53 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 06 Jul 2019 13:46:53 +0000 Subject: [docs] [issue37514] french translation Spelling mistake on datetime python's library documentation online In-Reply-To: <1562419390.4.0.81704201562.issue37514@roundup.psfhosted.org> Message-ID: <1562420813.81.0.627304817979.issue37514@roundup.psfhosted.org> Paul Ganssle added the comment: @Lanteri If you'd like you can make a pull request against the French documentation here: https://github.com/python/python-docs-fr The relevant file is library/datetime.po It also seems like the French documentation has its own issue tracker, here: https://github.com/python/python-docs-fr/issues I will leave it to @mdk as to whether this issue should be migrated over there or not. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From chinapython at yeah.net Sat Jul 6 08:08:33 2019 From: chinapython at yeah.net (chinapython at yeah.net) Date: Sat, 6 Jul 2019 20:08:33 +0800 Subject: [docs] have a question about "strip" Message-ID: <2019070620083141859511@yeah.net> hi.all I'm robin.come from china,I have a question about "strip": version?Python 3.7.0 >>> a='ea' >>> print([a.strip()]) ['ea'] >>> print([a.strip('page')]) [''] >>> print([a.strip('ge')]) ['a'] is this a bug? chinapython at yeah.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien at palard.fr Sat Jul 6 10:58:32 2019 From: julien at palard.fr (Julien Palard) Date: Sat, 06 Jul 2019 14:58:32 +0000 Subject: [docs] have a question about "strip" In-Reply-To: <2019070620083141859511@yeah.net> References: <2019070620083141859511@yeah.net> Message-ID: Hi Robin, It's not a question about the documentation, so I think you posted to the wrong mailing list, maybe tutor would be a better choice. I don't know where you see a bug, the documentation for strip [1] contains: > The chars argument is a string specifying the set of characters to be removed. in "ea".strip("ge") you're asking: "From the string 'ea', remove leading and trailing 'g's and 'e's", which results in "a", it looks correct to me. The hard point to get may be the fact that strips takes a *set* of letters to strip, not a word to strip. If you want to strip words you can use re like this: >>> re.sub("^hello|hello$", "", "hello world is hello") ' world is ' ^hello meaning "hello at the beginning" | means or hello$ means "hello at the end" So it reads like this: "hello at the beginning or hello at the end are replaced by the empty string". Note that the space are kept, we did *not* asked for them to be dropped (they can easily be drop by using strip agian. Please not my "re" example is not perfect, it strips only once. A more robust one could be: >>> def wstrip(word, string): ... return re.sub(f"^({re.escape(word)}\s?)*|(\s?{re.escape(word)})*$", "", string) ... >>> wstrip("hello", "hello hello hello youpi hello hello") 'youpi' >>> wstrip("hello", "hello hello hello hello hello") '' But it's probably not foolproof, not well tested, and not that readable. [1]: https://docs.python.org/3/library/stdtypes.html#str.strip -- Julien Palard https://mdk.fr ??????? Original Message ??????? On Saturday 6 July 2019 14:08, chinapython at yeah.net wrote: > hi.all > I'm robin.come from china,I have a question about "strip": > version?Python 3.7.0 > >>> a='ea' > >>> print([a.strip()]) > ['ea'] > >>> print([a.strip('page')]) > [''] > >>> print([a.strip('ge')]) > ['a'] > is this a bug? > > --------------------------------------------------------------- > > chinapython at yeah.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Jul 6 17:22:35 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:22:35 +0000 Subject: [docs] [issue37487] PyList_GetItem() document regarding index In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562448155.3.0.110809447337.issue37487@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14437 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:28:06 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:28:06 +0000 Subject: [docs] [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562448486.37.0.777629892457.issue37487@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- assignee: docs at python -> terry.reedy stage: patch review -> commit review title: PyList_GetItem() document regarding index -> PyList_GetItem() document: index can be 0 versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:40:31 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:40:31 +0000 Subject: [docs] [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562449230.99.0.005083716708.issue37487@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset f8709e804d16ec5d44b1d2f00d59a0f78df7b792 by Terry Jan Reedy in branch 'master': bpo-37487: Fix PyList_GetItem index description. (GH-14623) https://github.com/python/cpython/commit/f8709e804d16ec5d44b1d2f00d59a0f78df7b792 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:40:44 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 21:40:44 +0000 Subject: [docs] [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562449244.56.0.415118502168.issue37487@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14438 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/14624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:40:51 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 21:40:51 +0000 Subject: [docs] [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562449251.28.0.655039450945.issue37487@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14439 pull_request: https://github.com/python/cpython/pull/14625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:41:02 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 21:41:02 +0000 Subject: [docs] [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562449262.88.0.899764622636.issue37487@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14440 pull_request: https://github.com/python/cpython/pull/14626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:42:36 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:42:36 +0000 Subject: [docs] [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562449356.78.0.515231526127.issue37456@roundup.psfhosted.org> Terry J. Reedy added the comment: I will remove the sentence. ---------- assignee: docs at python -> terry.reedy nosy: +terry.reedy stage: -> commit review type: -> behavior versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:53:44 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:53:44 +0000 Subject: [docs] [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562450024.99.0.842686667007.issue37456@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +14441 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/14627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:54:59 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:54:59 +0000 Subject: [docs] [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562450099.4.0.84554735649.issue37487@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset ad3720359faa933d04bde3d3222fd54e73ee7feb by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14624) https://github.com/python/cpython/commit/ad3720359faa933d04bde3d3222fd54e73ee7feb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:55:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:55:22 +0000 Subject: [docs] [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562450122.5.0.289530345322.issue37487@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 9c930d076a7225694b369d30636a29acb556c2be by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14625) https://github.com/python/cpython/commit/9c930d076a7225694b369d30636a29acb556c2be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:55:44 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:55:44 +0000 Subject: [docs] [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562450144.61.0.379030032119.issue37487@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset dd3862e167d573b6e9a3348c365229ca958d1f1f by Terry Jan Reedy (Miss Islington (bot)) in branch '2.7': bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14626) https://github.com/python/cpython/commit/dd3862e167d573b6e9a3348c365229ca958d1f1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 17:56:26 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 21:56:26 +0000 Subject: [docs] [issue37487] PyList_GetItem() document: index can be 0 In-Reply-To: <1562078981.78.0.204113489649.issue37487@roundup.psfhosted.org> Message-ID: <1562450186.57.0.700273943834.issue37487@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:13:06 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 22:13:06 +0000 Subject: [docs] [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562451186.51.0.746917417887.issue37456@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 6f2a8c08573c71b78d2f6e2bfaf31641a0cd092b by Terry Jan Reedy in branch 'master': bpo-37456: Slash ('/') is now part of syntax. (GH-14627) https://github.com/python/cpython/commit/6f2a8c08573c71b78d2f6e2bfaf31641a0cd092b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:13:14 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Jul 2019 22:13:14 +0000 Subject: [docs] [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562451194.02.0.703800239381.issue37456@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14442 pull_request: https://github.com/python/cpython/pull/14628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:22:54 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 22:22:54 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562451773.96.0.369445365175.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: Please ask your questions about doc conventions, both about exceptions and function/method. Either someone will point to something in the devguide, or we might get a discussion about something that should be added. I would not merge more extensive changes without some feedback. ---------- assignee: docs at python -> terry.reedy stage: patch review -> commit review versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 18:25:50 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Jul 2019 22:25:50 +0000 Subject: [docs] [issue37456] FAQ says positional arguments aren't a thing In-Reply-To: <1561939777.04.0.384153036015.issue37456@roundup.psfhosted.org> Message-ID: <1562451950.19.0.49385530409.issue37456@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 90631f9bc5f78ec6cdc2096d5c5ae26e41e5f150 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-37456: Slash ('/') is now part of syntax. (GH-14627) (GH-14628) https://github.com/python/cpython/commit/90631f9bc5f78ec6cdc2096d5c5ae26e41e5f150 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:07:10 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 01:07:10 +0000 Subject: [docs] [issue37480] add ptpython to list of alternate interpreters In-Reply-To: <1562036636.74.0.198372246702.issue37480@roundup.psfhosted.org> Message-ID: <1562461630.9.0.766432627401.issue37480@roundup.psfhosted.org> Terry J. Reedy added the comment: My problems with this chapter are that it mostly ignores Windows, omits IDLE which has most of the 'advanced features' discussed, and some others (I could fix this), confuses a bit 'interpreter' as code executor versus 'interactive interpreter' as interface to an interpreter (Shell), and seems seems to mention a somewhat arbitrary subset of alternative shells. Other than the fact that bpython and ptpython cross list each other (and IPython), what evidence do you have that ptpython is 'both mature and popular enough to merit inclusion'? (I know, difficult question given no visible criteria.) I looked at the history of the last paragraph and it seems that is was added 8/13/2009 by Georg Brandl in c5605dffdb226e85f415bd6edb441dad714fbc0c, which merged about 16 revisions from the py3k branch. The only change since was markup. It seems to me that the wiki might be a better place for a list of alternate shells, if not one already. I believe there is already a page for editors or IDEs. ---------- nosy: +terry.reedy versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:20:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 01:20:19 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562462419.67.0.369498958716.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 0717b4d9b3899c5c2ca13031e4ff619a15a4d368 by Terry Jan Reedy (Kyle Stanley) in branch 'master': bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) https://github.com/python/cpython/commit/0717b4d9b3899c5c2ca13031e4ff619a15a4d368 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:20:27 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 01:20:27 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562462427.85.0.455912818688.issue37478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14443 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/14629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 21:20:35 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 01:20:35 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562462435.93.0.115154584092.issue37478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14444 pull_request: https://github.com/python/cpython/pull/14630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:18:53 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 02:18:53 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562465933.27.0.271656620575.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4e6bfc4c605d92d2395fbcded9cf45cdd1ced810 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8': bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) (GH-14629) https://github.com/python/cpython/commit/4e6bfc4c605d92d2395fbcded9cf45cdd1ced810 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:19:11 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 02:19:11 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562465951.01.0.9078393039.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 1dd65075955337183ba2f78cb11a1eec2466dc74 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) (GH-14630) https://github.com/python/cpython/commit/1dd65075955337183ba2f78cb11a1eec2466dc74 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:37:13 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 02:37:13 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467033.92.0.766962150127.issue37478@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +14445 pull_request: https://github.com/python/cpython/pull/14631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:44:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 02:44:04 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467444.14.0.901428068722.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset a9b40e4546ca631e5ab41376b5b72e8f296f557d by Terry Jan Reedy in branch 'master': bpo-37478: Add missing 'and'. (GH-14631) https://github.com/python/cpython/commit/a9b40e4546ca631e5ab41376b5b72e8f296f557d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:44:18 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 02:44:18 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467458.04.0.646623632586.issue37478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14446 pull_request: https://github.com/python/cpython/pull/14632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:44:25 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 02:44:25 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467465.49.0.16425508499.issue37478@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14447 pull_request: https://github.com/python/cpython/pull/14633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:49:42 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 02:49:42 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467782.11.0.67223502553.issue37478@roundup.psfhosted.org> miss-islington added the comment: New changeset e841a54206c65770aeb2b936cdc830dd4ed8bf9e by Miss Islington (bot) in branch '3.7': bpo-37478: Add missing 'and'. (GH-14631) https://github.com/python/cpython/commit/e841a54206c65770aeb2b936cdc830dd4ed8bf9e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 6 22:50:51 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 02:50:51 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562467851.97.0.148774540798.issue37478@roundup.psfhosted.org> miss-islington added the comment: New changeset e414aa9cb002427a39dfd157cdad156336f93ca9 by Miss Islington (bot) in branch '3.8': bpo-37478: Add missing 'and'. (GH-14631) https://github.com/python/cpython/commit/e414aa9cb002427a39dfd157cdad156336f93ca9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 00:39:04 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 07 Jul 2019 04:39:04 +0000 Subject: [docs] [issue37478] Docs: Method os.chdir() does not mention errors that can be raised In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562474344.59.0.394424829864.issue37478@roundup.psfhosted.org> Kyle Stanley added the comment: Exceptions for os.chdir() have been added to the docs. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 01:11:18 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Jul 2019 05:11:18 +0000 Subject: [docs] [issue37478] Specify possible exceptions for os.chdir() In-Reply-To: <1562020823.14.0.307493016752.issue37478@roundup.psfhosted.org> Message-ID: <1562476278.15.0.778444022734.issue37478@roundup.psfhosted.org> Terry J. Reedy added the comment: Spinoff issues should be separate. ---------- title: Docs: Method os.chdir() does not mention errors that can be raised -> Specify possible exceptions for os.chdir() _______________________________________ Python tracker _______________________________________ From chinapython at yeah.net Sat Jul 6 10:54:03 2019 From: chinapython at yeah.net (chinapython at yeah.net) Date: Sat, 6 Jul 2019 22:54:03 +0800 Subject: [docs] =?gb2312?b?u9i4tDogaGF2ZSBhIHF1ZXN0aW9uIGFib3V0ICJzdHJp?= =?gb2312?b?cCI=?= References: <2019070620083141859511@yeah.net> Message-ID: <2019070622540168007814@yeah.net> hi,all sorry,By reading the document, I knew I had made a mistake.I already know how to use it correctly, chinapython at yeah.net ???? chinapython at yeah.net ????? 2019-07-06 20:08 ???? docs ??? have a question about "strip" hi.all I'm robin.come from china,I have a question about "strip": version?Python 3.7.0 >>> a='ea' >>> print([a.strip()]) ['ea'] >>> print([a.strip('page')]) [''] >>> print([a.strip('ge')]) ['a'] is this a bug? chinapython at yeah.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sun Jul 7 11:34:20 2019 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 07 Jul 2019 15:34:20 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562513660.38.0.487101365347.issue37513@roundup.psfhosted.org> Xiang Zhang added the comment: Should be TypeError. It's changed from ValueError to TypeError in https://bugs.python.org/issue1831. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:40:22 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:40:22 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514022.49.0.120943743084.issue37513@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14449 pull_request: https://github.com/python/cpython/pull/14635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:40:30 2019 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 07 Jul 2019 15:40:30 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514030.36.0.891259392203.issue37513@roundup.psfhosted.org> Xiang Zhang added the comment: New changeset f6cdd3ff687ebbf8209d793a18a042ea495c4aeb by Xiang Zhang (Hai Shi) in branch 'master': bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615) https://github.com/python/cpython/commit/f6cdd3ff687ebbf8209d793a18a042ea495c4aeb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:40:29 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:40:29 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514029.57.0.378747012834.issue37513@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14450 pull_request: https://github.com/python/cpython/pull/14636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:46:05 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:46:05 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514365.38.0.341636407303.issue37513@roundup.psfhosted.org> miss-islington added the comment: New changeset bc0a6ced30267d4e21e7566bfd6d14b30d6d1604 by Miss Islington (bot) in branch '3.7': bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615) https://github.com/python/cpython/commit/bc0a6ced30267d4e21e7566bfd6d14b30d6d1604 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:46:49 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:46:49 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514409.8.0.0586945063734.issue37513@roundup.psfhosted.org> miss-islington added the comment: New changeset 3f7d0c9665ca546bb0073376cb83e31dd13b48d9 by Miss Islington (bot) in branch '3.8': bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615) https://github.com/python/cpython/commit/3f7d0c9665ca546bb0073376cb83e31dd13b48d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:50:00 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:50:00 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562514600.51.0.911911679512.issue37513@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14451 pull_request: https://github.com/python/cpython/pull/14637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:58:26 2019 From: report at bugs.python.org (Andrew Scheller) Date: Sun, 07 Jul 2019 15:58:26 +0000 Subject: [docs] [issue34446] ambiguous _max_size parameter in SpooledTemporaryFile In-Reply-To: <1534794455.51.0.56676864532.issue34446@psf.upfronthosting.co.za> Message-ID: <1562515106.06.0.498625685744.issue34446@roundup.psfhosted.org> Andrew Scheller added the comment: I agree that this is ambiguous behaviour. The docs at https://docs.python.org/3/library/tempfile.html#tempfile.SpooledTemporaryFile say "This function operates exactly as TemporaryFile() does, except that data is spooled in memory until the file size exceeds max_size, or until the file?s fileno() method is called, at which point the contents are written to disk and operation proceeds as with TemporaryFile().", and as the default value for max_size is 0, that would imply to me that _any_ data written to a SpooledTemporaryFile (constructed with a max_size of 0) would instantly get (internally) converted to a TemporaryFile. Whereas looking at the code https://github.com/python/cpython/blob/master/Lib/tempfile.py#L650 it seems a max_size of 0 means "don't rollover". Perhaps it would have made sense to have SpooledTemporaryFile default to a max_size of None (and use that to mean "never rollover") ? So as well as the inconsistency between rollover behaviour in the write()/writelines() methods and the truncate() method (when max_size is 0) that jcc2220 pointed out, I believe there's also a documentation issue here in that it's not clear what a max_size of 0 is /supposed/ to do. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, lurchman versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 11:59:17 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Jul 2019 15:59:17 +0000 Subject: [docs] [issue37513] Fix a type error in ctypes.rst In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562515157.69.0.00211987985211.issue37513@roundup.psfhosted.org> miss-islington added the comment: New changeset 00bf4d64ecb01027be40c32d822e47e55d6b5c76 by Miss Islington (bot) in branch '2.7': bpo-37513: Change ValueError to TypeError in an example in ctypes doc (GH-14615) https://github.com/python/cpython/commit/00bf4d64ecb01027be40c32d822e47e55d6b5c76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 7 12:03:08 2019 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 07 Jul 2019 16:03:08 +0000 Subject: [docs] [issue37513] Fix a wrong exception type in ctypes documentation In-Reply-To: <1562387286.6.0.643530884918.issue37513@roundup.psfhosted.org> Message-ID: <1562515388.14.0.07660662506.issue37513@roundup.psfhosted.org> Change by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Fix a type error in ctypes.rst -> Fix a wrong exception type in ctypes documentation versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From julien at palard.fr Sun Jul 7 16:48:56 2019 From: julien at palard.fr (Julien Palard) Date: Sun, 07 Jul 2019 20:48:56 +0000 Subject: [docs] EPUB and PDF files unavailable In-Reply-To: References: Message-ID: Hi Omar, > I tried to download the EPUB and PDF files from https://docs.python.org/dev/download.html but they're currently unavailable. How can I download them? You may have tried downloading them right after a release, which does not work (known bug). It works now. --? Julien Palard https://mdk.fr From julien at palard.fr Sun Jul 7 16:58:08 2019 From: julien at palard.fr (Julien Palard) Date: Sun, 07 Jul 2019 20:58:08 +0000 Subject: [docs] How do we find information about modules that aren't officially part of the python.org canon? In-Reply-To: References: Message-ID: Hi Bryan, > I apologize for the length of this email. I wanted you to get a sense of what I mean when I ask, "How do we find information about modules that aren't officially part of the python.org canon?" Try to write a shorter one next time, it consumes time and energy to read it. I'll try a short answer: When I search the doc of say python3-cliff: - I rewrite the name as "cliff" because I expect the "python3-" part come from the distro packaging, not a Python thing. - I go to pypi.org/p/cliff (yes /p/ redirects to /project/ it's faster to type) - I look if there's a "Documentation" link in the left menu or in the body (in this case, there is one: https://docs.openstack.org/cliff/latest/) - If I don't find any, I look for a link to the source (often in the left menu). - If there's no link to the source I search it using a search engine like duckduckgo "cliff source code" or even "cliff github". - Once the source code found, I search around here, in the README, or a "docs/" directory, if it's github check if there's a Wiki page. - At this point either I found the doc (>90% of the times) or I read the code because there is probably no doc, or I switch to another, better documented, lib. Sometimes, `python -m pydoc cliff` may help too. Bests, --? Julien Palard https://mdk.fr From julien at palard.fr Sun Jul 7 17:02:29 2019 From: julien at palard.fr (Julien Palard) Date: Sun, 07 Jul 2019 21:02:29 +0000 Subject: [docs] Fw: Embedding Python in Another Application Import Statement Bug In-Reply-To: References: Message-ID: Hi > Is this ticket still unsolved? I do not have a CentOS to try it. You can try on https://mail.python.org/mailman/listinfo/tutor list maybe, and if you resolve your issue and it happen to be documentation related, don't hesitate to let the docs@ list know. Bests, --? Julien Palard https://mdk.fr From julien at palard.fr Sun Jul 7 17:11:14 2019 From: julien at palard.fr (Julien Palard) Date: Sun, 07 Jul 2019 21:11:14 +0000 Subject: [docs] discrepancy in result by hex() In-Reply-To: References: Message-ID: Hi Sunil, > The hex() works fine overall but for numbers less than 16 it doesn't gives right output > for e.g > >>> hex(15) > '0xf' > where it should have been '0x0f' Why? 0x0f is actually equal to 0xf as 01 is equal to 1 in decimal, I don't see any error here. The hex function is not oriented toward working on bytes, take for exemple hex(999), it gives 0x3e7. If you need to convert bytes to a fixed-width representation you can use f-strings or .format, like this: >>> f"{x:#04x}" For x == 6 it gives: '0x06' For x == 60 it gives: '0x3c' For x == 255 it gives: '0xff' Bests, --? Julien Palard https://mdk.fr From julien at palard.fr Sun Jul 7 17:21:58 2019 From: julien at palard.fr (Julien Palard) Date: Sun, 07 Jul 2019 21:21:58 +0000 Subject: [docs] What are the rules for local and global variables in Python? In-Reply-To: <2771A4C7-D66B-4205-9AF8-978A8B5F9A7D@gmail.com> References: <2771A4C7-D66B-4205-9AF8-978A8B5F9A7D@gmail.com> Message-ID: <7lugMCL_bL9gVCYgEYY15zAfzr8Kv_-3bzvutQhfmdflzDwzLcBpFUBERfq1HiFBZs9xkyQ372ey951ndYF9InDMYctsNlHxHajFhYGBUHs=@palard.fr> Hi Will, thanks for reporting! > The text reads that variables which are _only_ referenced *inside* a function will be global, surely this should be *outside*, which I think would also make the following sentence make more sense. Stransgely enough, the documentation is right: there's a distinction between "referenced" and "assigned": - If a name is only referenced in a function, it's a global. - If a name is assigned in a function, it's a local (unless declared explicitly as global). For example: ``` VAL = 42 def foo(): print(VAL) foo() ``` In this case, VAL is only referenced inside function foo, so it's global. Bests, --? Julien Palard https://mdk.fr From julien at palard.fr Sun Jul 7 17:36:24 2019 From: julien at palard.fr (Julien Palard) Date: Sun, 07 Jul 2019 21:36:24 +0000 Subject: [docs] documentation bug In-Reply-To: References: Message-ID: Hi Hug! Thanks a lot for those reports! > the last sentence should be: > [...] matches characters not considered [...] I opened two PRs for them here: - https://github.com/python/cpython/pull/14639 - https://github.com/python/cpython/pull/14640 Feel free to proofread them and I'll merge them. Bests, -- Julien Palard https://mdk.fr From kishore.vancheeshwaran at gmail.com Mon Jul 8 01:45:46 2019 From: kishore.vancheeshwaran at gmail.com (Kishore Vancheeshwaran) Date: Mon, 8 Jul 2019 11:15:46 +0530 Subject: [docs] Would like to contribute to documentation by writing example snippets Message-ID: Hi team, I noticed that for some methods, we have example code, while for others we don't. Is there any reason for this? If it is ok, then can I contribute to the documentation by writing example code snippets for whichever might not have them? Example: With example - https://docs.python.org/3/library/stdtypes.html#str.rstrip Without example - https://docs.python.org/3/library/stdtypes.html#str.rpartition Regards, Kishore Vancheeshwaran -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien at palard.fr Mon Jul 8 04:25:29 2019 From: julien at palard.fr (Julien Palard) Date: Mon, 08 Jul 2019 08:25:29 +0000 Subject: [docs] Would like to contribute to documentation by writing example snippets In-Reply-To: References: Message-ID: <-7lVsyzfflvUxrNXRttoAHhp0hmHumM-OxJ1AReLkDLuE9nTHT-RV5ctFTHAncF0rMwi8Q0WJU0RDcyEY_XkQBqYY7b249dDvatzk2po1cM=@palard.fr> Hi Kishore, > I noticed that for some methods, we have example code, while for others we don't. Pull requests on https://github.com/python/cpython/ are welcome! Please add only one exemple per pull request, and start slowly by say one pull request, to familiarise with the process. Bests, --? Julien Palard https://mdk.fr From julien at palard.fr Mon Jul 8 04:33:02 2019 From: julien at palard.fr (Julien Palard) Date: Mon, 08 Jul 2019 08:33:02 +0000 Subject: [docs] Correction for documentation reference In-Reply-To: References: Message-ID: <1TqxzDgm7GCYB-5g1_ndvCDgx0oWqrVrd7hjx3AUyFhnNiVaoTMm8UK8lgIF1NgmOfoj8VTvPPUPIvMTQFXnBqu9ebacEHFSH8FkzoiRhVQ=@palard.fr> Hi Michael, > Technically, the term camelCase (without other decoration) does not begin with a capitalized letter since it now looks like a camel with a hump in the middle. Given the potential for ambiguity there are two distinctions which more clearly identify what happens with the first character: UpperCamelCase and lowerCamelCase. I opened a pull request [1], feel free to proofread it. [1]: https://github.com/python/cpython/pull/14644/files --? Julien Palard https://mdk.fr From loren.cannon at gmail.com Sun Jul 7 20:51:46 2019 From: loren.cannon at gmail.com (Loren Cannon) Date: Sun, 7 Jul 2019 18:51:46 -0600 Subject: [docs] I was taken aback a little by the wording on pg. 13 Message-ID: ?Note how the start is always included, and the end always excluded.? I had to think about ? the start of what? -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien at palard.fr Mon Jul 8 06:45:10 2019 From: julien at palard.fr (Julien Palard) Date: Mon, 08 Jul 2019 10:45:10 +0000 Subject: [docs] I was taken aback a little by the wording on pg. 13 In-Reply-To: References: Message-ID: Hi Loren, thanks for taking time to give us this feedback! What do you think of: > Note how the character at the start position is always included, and the one at the end is always excluded. ? Do you have any better wordings in mind? -- Julien Palard https://mdk.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From hugcape at gmail.com Mon Jul 8 11:15:40 2019 From: hugcape at gmail.com (Hug Capella) Date: Mon, 8 Jul 2019 16:15:40 +0100 Subject: [docs] documentation bug In-Reply-To: References: Message-ID: Thank you Julien for let me know. In my opinion both commits are ok. I'm sorry my suggested edit for #14640 was a bit inaccurate, and I'm glad you fixed it. Regards hug 2019-07-07 22:36 GMT+01:00, Julien Palard : > Hi Hug! Thanks a lot for those reports! > >> the last sentence should be: >> [...] matches characters not considered [...] > > I opened two PRs for them here: > - https://github.com/python/cpython/pull/14639 > - https://github.com/python/cpython/pull/14640 > > Feel free to proofread them and I'll merge them. > > Bests, > -- > Julien Palard > https://mdk.fr > > From report at bugs.python.org Mon Jul 8 12:57:47 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jul 2019 16:57:47 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562605067.64.0.473218158376.issue37149@roundup.psfhosted.org> Ned Deily added the comment: New changeset 317c33e67cb6076c5a87a66c75e8c35ac581398d by Ned Deily in branch '3.6': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/317c33e67cb6076c5a87a66c75e8c35ac581398d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:04:18 2019 From: report at bugs.python.org (hai shi) Date: Mon, 08 Jul 2019 17:04:18 +0000 Subject: [docs] [issue37187] CField.size from the ctypes module does not behave as documented on bitfields In-Reply-To: <1559879196.85.0.0861364976154.issue37187@roundup.psfhosted.org> Message-ID: <1562605458.86.0.0787276406641.issue37187@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14458 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 13:32:40 2019 From: report at bugs.python.org (hai shi) Date: Mon, 08 Jul 2019 17:32:40 +0000 Subject: [docs] [issue37187] CField.size from the ctypes module does not behave as documented on bitfields In-Reply-To: <1559879196.85.0.0861364976154.issue37187@roundup.psfhosted.org> Message-ID: <1562607160.99.0.798392468499.issue37187@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 14:36:52 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Jul 2019 18:36:52 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562611012.39.0.445334151406.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: Larry, I have the same request of you that I did for Ned. Please backport PR-14616 to 3.5. It replaces a dead link to the most important online Tkinter reference. Many people are lost without the reference, as they find reading the tcl/tk reference much harder. It is like having half the tkinter doc, the part covering tk widgets, removed. (The question has come up on Stackoverflow also.) The replacement will benefit any 3.5 users looking at the online 3.5 docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:07:58 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jul 2019 19:07:58 +0000 Subject: [docs] [issue37512] Error in the documentation about string concatenation In-Reply-To: <1562362398.93.0.443192979272.issue37512@roundup.psfhosted.org> Message-ID: <1562612878.23.0.792959256581.issue37512@roundup.psfhosted.org> Brett Cannon added the comment: I'm going to close this as we try to avoid documenting CPython-specific details unless absolutely necessary. And in the case of documenting the str type we should avoid that. So thanks for the suggestion, Dmitriy, but we will just leave this as a pleasant surprise for folks who accidentally make the mistake of writing code this way. ---------- nosy: +brett.cannon resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 15:09:01 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Jul 2019 19:09:01 +0000 Subject: [docs] [issue37514] french translation Spelling mistake on datetime python's library documentation online In-Reply-To: <1562419390.4.0.81704201562.issue37514@roundup.psfhosted.org> Message-ID: <1562612941.07.0.834977241198.issue37514@roundup.psfhosted.org> Change by Brett Cannon : ---------- assignee: docs at python -> mdk _______________________________________ Python tracker _______________________________________ From MichaelBlankenship.ftw at outlook.com Mon Jul 8 12:17:38 2019 From: MichaelBlankenship.ftw at outlook.com (Michael Blankenship) Date: Mon, 8 Jul 2019 16:17:38 +0000 Subject: [docs] Correction for documentation reference In-Reply-To: <1TqxzDgm7GCYB-5g1_ndvCDgx0oWqrVrd7hjx3AUyFhnNiVaoTMm8UK8lgIF1NgmOfoj8VTvPPUPIvMTQFXnBqu9ebacEHFSH8FkzoiRhVQ=@palard.fr> References: , <1TqxzDgm7GCYB-5g1_ndvCDgx0oWqrVrd7hjx3AUyFhnNiVaoTMm8UK8lgIF1NgmOfoj8VTvPPUPIvMTQFXnBqu9ebacEHFSH8FkzoiRhVQ=@palard.fr> Message-ID: Julien, Looks good. ? Michael ________________________________ From: Julien Palard Sent: Monday, July 8, 2019 1:33 AM To: Michael Blankenship Cc: docs at python.org Subject: Re: [docs] Correction for documentation reference Hi Michael, > Technically, the term camelCase (without other decoration) does not begin with a capitalized letter since it now looks like a camel with a hump in the middle. Given the potential for ambiguity there are two distinctions which more clearly identify what happens with the first character: UpperCamelCase and lowerCamelCase. I opened a pull request [1], feel free to proofread it. [1]: https://github.com/python/cpython/pull/14644/files -- Julien Palard https://mdk.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From ngocbachpol at gmail.com Mon Jul 8 10:36:17 2019 From: ngocbachpol at gmail.com (Bach) Date: Mon, 8 Jul 2019 17:36:17 +0300 Subject: [docs] Local host server bug Message-ID: <61d515f0-bdd5-1f5a-6fa1-f728c4239277@gmail.com> I started a local host server using python3 -m http.server Wanted to view the listing of the directory "Web" in my browser (Firefox and Edge tested). Instead of the directory, it opens "index.html" all the time. The problem persists until I change the name of this file to others. Took me 2 days to diagnose the problem (even took the time to install Ubuntu and tested it). Sorry if this is a known bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2019-07-08 17-31-38.png Type: image/png Size: 56400 bytes Desc: not available URL: From julien at palard.fr Mon Jul 8 17:00:38 2019 From: julien at palard.fr (Julien Palard) Date: Mon, 08 Jul 2019 21:00:38 +0000 Subject: [docs] Local host server bug In-Reply-To: <61d515f0-bdd5-1f5a-6fa1-f728c4239277@gmail.com> References: <61d515f0-bdd5-1f5a-6fa1-f728c4239277@gmail.com> Message-ID: Hi Bach, > I started a local host server using python3 -m http.server > Instead of the directory, it opens "index.html" all the time. It's not even a bug, it's a convention: https://en.wikipedia.org/wiki/Webserver_directory_index In other words there's two cases: ?- Either the URL points to a file, the file is served, no surprises. ?- Either the URL points to a directory, and here there's a choice : Either display a "directory listing" or pick a file and display this file. I don't really know about a formal specification around "index.html", I think it's just a consensus that arose by itself, "it has always been like this". It's also documented in SimpleHttpRequestHandler: >?If the request was mapped to a directory, the directory is checked for a file named `index.html` > or `index.htm` (in that order). If found, the file?s contents are returned; otherwise a directory listing > is generated by calling the `list_directory()` method. _ https://docs.python.org/3/library/http.server.html#http.server.SimpleHTTPRequestHandler.do_GET If you think it should be documented also elsewhere, don't hesitate to propose it (like: where you searched?). > Took me 2 days to diagnose the problem I hope you learned a lot during this "trip" :) Bests, --? Julien Palard https://mdk.fr From report at bugs.python.org Mon Jul 8 17:54:52 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jul 2019 21:54:52 +0000 Subject: [docs] [issue37149] link to official documentation tkinter failed !!! In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562622892.29.0.240795712135.issue37149@roundup.psfhosted.org> Ned Deily added the comment: New changeset f2cbf41afc9e9a0ce16bfe0c71662348453a28c4 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-37149: Replace dead link for online Tkinter reference (GH-14616) https://github.com/python/cpython/commit/f2cbf41afc9e9a0ce16bfe0c71662348453a28c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 8 19:56:51 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Jul 2019 23:56:51 +0000 Subject: [docs] [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1562630211.28.0.222381328736.issue37149@roundup.psfhosted.org> Ned Deily added the comment: A few comments on this. One, the Tkinter documentation in question seems to have been a personal project of John Shipman at New Mexico Tech and, as such, was not "official" so I've updated the issue title accordingly. Sadly, as Cheryl noted, John died two years ago and I guess there were no plans in place for someone to take the documentation over from him. We can all appreciate his very valuable contributions over the years by developing and maintaining this additional documentation. It would be great to find a way to provide an equivalent resource for Tk 8.6. The best alternatives today is probably Mark Roseman's TkDocs website and "Modern Tkinter" book/ebook, both also already linked on our Standard Library tkinter page. I've nosied Mark in case he has any thoughts on the matter. As far as updating the page in older releases, as 3.6 release manager I did decide to allow the update there, even though we normally would not make such a change for a security-fix-only release; I did so as we are still including 3.6 in our daily doc builds on docs.python.org (although at some point soon that will stop). It's Larry's call about 3.5 but note that the current 3.5 docs on docs.python.org are normally only updated when a new 3.5.x security-fix release appears. If you want it to be considered for 3.5, it would be best to make a 3.5 backport PR. ---------- nosy: +markroseman priority: release blocker -> title: link to official documentation tkinter failed !!! -> link to John Shipman's Tkinter 8.5 documentation fails: website no longer available _______________________________________ Python tracker _______________________________________ From bazthelinuxguy at gmail.com Mon Jul 8 18:40:40 2019 From: bazthelinuxguy at gmail.com (Bryan Zimmer) Date: Mon, 8 Jul 2019 17:40:40 -0500 Subject: [docs] How do we find information about modules that aren't officially part of the python.org canon? In-Reply-To: References: Message-ID: Thanks, I'll check them out. On Sun, Jul 7, 2019 at 3:58 PM Julien Palard wrote: > Hi Bryan, > > > I apologize for the length of this email. I wanted you to get a sense of > what I mean when I ask, "How do we find information about modules that > aren't officially part of the python.org canon?" > > Try to write a shorter one next time, it consumes time and energy to read > it. I'll try a short answer: > > When I search the doc of say python3-cliff: > > - I rewrite the name as "cliff" because I expect the "python3-" part come > from the distro packaging, not a Python thing. > - I go to pypi.org/p/cliff (yes /p/ redirects to /project/ it's faster to > type) > - I look if there's a "Documentation" link in the left menu or in the body > (in this case, there is one: https://docs.openstack.org/cliff/latest/) > - If I don't find any, I look for a link to the source (often in the left > menu). > - If there's no link to the source I search it using a search engine like > duckduckgo "cliff source code" or even "cliff github". > - Once the source code found, I search around here, in the README, or a > "docs/" directory, if it's github check if there's a Wiki page. > - At this point either I found the doc (>90% of the times) or I read the > code because there is probably no doc, or I switch to another, better > documented, lib. > > Sometimes, `python -m pydoc cliff` may help too. > > Bests, > -- > Julien Palard > https://mdk.fr > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ngocbachpol at gmail.com Mon Jul 8 18:09:44 2019 From: ngocbachpol at gmail.com (Ngoc Bach Nguyen) Date: Tue, 9 Jul 2019 00:09:44 +0200 Subject: [docs] Local host server bug In-Reply-To: References: <61d515f0-bdd5-1f5a-6fa1-f728c4239277@gmail.com> Message-ID: Thank you very much! I did not expect to receive a reply this early, and I am really grateful for your help. Anyway, best wishes to you and your work! On Mon, Jul 8, 2019, 23:00 Julien Palard wrote: > Hi Bach, > > > I started a local host server using python3 -m http.server > > Instead of the directory, it opens "index.html" all the time. > > It's not even a bug, it's a convention: > https://en.wikipedia.org/wiki/Webserver_directory_index > > In other words there's two cases: > - Either the URL points to a file, the file is served, no surprises. > - Either the URL points to a directory, and here there's a choice : > Either display a "directory listing" or pick a file and display this file. > > I don't really know about a formal specification around "index.html", I > think it's just a consensus that arose by itself, "it has always been like > this". > > It's also documented in SimpleHttpRequestHandler: > > If the request was mapped to a directory, the directory is checked for a > file named `index.html` > > or `index.htm` (in that order). If found, the file?s contents are > returned; otherwise a directory listing > > is generated by calling the `list_directory()` method. > > _ > https://docs.python.org/3/library/http.server.html#http.server.SimpleHTTPRequestHandler.do_GET > > If you think it should be documented also elsewhere, don't hesitate to > propose it (like: where you searched?). > > > Took me 2 days to diagnose the problem > > I hope you learned a lot during this "trip" :) > > Bests, > -- > Julien Palard > https://mdk.fr > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iqbalhabibie0684 at gmail.com Mon Jul 8 22:58:45 2019 From: iqbalhabibie0684 at gmail.com (iqbalhabibie habibie) Date: Tue, 9 Jul 2019 11:58:45 +0900 Subject: [docs] install package Message-ID: Dear Python admin, I am using python 2.7 when I am trying to install package or library example OpenCV-python it comes : (py27) C:\Anaconda3\envs\py27\Scripts>pip install OpenCV-python DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. May I know the Python 2.7 cant to be used after 1st January 2020? Hope I get feedback from you. Thank you Best regards, *Muhammad Iqbal Habibie, MT* Doctoral Student in Appropriate Technology and Sciences for Sustainable Development. Bio-production and Machinery Lab, Graduate School of Life and Environmental Sciences, University of Tsukuba, Japan 1-1-1 Tennodai, Tsukuba, Ibaraki, 305-8577, Japan. Telp. : (+81) 080-9045-4809 <+81%2080-2150-0792> / +62-813-2285-6739 E-mail: iqbalhabibie0684 at gmail.com and s1636021 at u.tsukuba.ac.jp -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Tue Jul 9 03:36:41 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Jul 2019 07:36:41 +0000 Subject: [docs] [issue37390] Generate table of audit events for docs In-Reply-To: <1561391164.88.0.923938823513.issue37390@roundup.psfhosted.org> Message-ID: <1562657800.95.0.604462716991.issue37390@roundup.psfhosted.org> Steve Dower added the comment: Anyone from the docs team have any ideas here? We're going to present on this at EuroPython tomorrow and it'd be great to be able to point people at the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 9 05:31:47 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Jul 2019 09:31:47 +0000 Subject: [docs] [issue37052] Add examples for mocking async for and async context manager in unittest.mock docs In-Reply-To: <1558857063.08.0.951093658338.issue37052@roundup.psfhosted.org> Message-ID: <1562664707.86.0.245431385164.issue37052@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +14467 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14660 _______________________________________ Python tracker _______________________________________ From julien at palard.fr Tue Jul 9 09:46:43 2019 From: julien at palard.fr (Julien Palard) Date: Tue, 09 Jul 2019 13:46:43 +0000 Subject: [docs] install package In-Reply-To: References: Message-ID: Hi > May I know the Python 2.7 cant to be used after 1st January 2020? Hope I get feedback from you. Thank you This does not look like a documentation related issue. Please use docs@ for docs related issues only. Python 2.7 will still *work* (as "it won't explode") after jan. 1 2020, but bugs in it will no longer be fixed and no features will be added. Please note that Python 3 is more than 10 years old, and most libraries are dropping Python 2 support this year, so you should consider using Python 3 even if Python 2 won't literaly "explode" on jan 1 2020. Bests, --? Julien Palard https://mdk.fr From report at bugs.python.org Tue Jul 9 21:19:16 2019 From: report at bugs.python.org (Zach Valenta) Date: Wed, 10 Jul 2019 01:19:16 +0000 Subject: [docs] [issue37480] add ptpython to list of alternate interpreters In-Reply-To: <1562036636.74.0.198372246702.issue37480@roundup.psfhosted.org> Message-ID: <1562721556.35.0.190249496183.issue37480@roundup.psfhosted.org> Zach Valenta added the comment: Terry, I agree w/ you that this info has a better home in the wiki. Just commented on the PR to say as much there. I'll update the PR per Kyle Stanley's suggestion and port the info into the wiki. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 07:54:30 2019 From: report at bugs.python.org (Nathan Oyama) Date: Wed, 10 Jul 2019 11:54:30 +0000 Subject: [docs] [issue37545] Argparse Tutorial - unreasonable operators Message-ID: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> New submission from Nathan Oyama : In "Python 3.7 Documentation > Python HOWTOs > Argparse Tutorial" (https://docs.python.org/3.7/howto/argparse.html), search this page for elif args.verbosity >= 1: The operator ">=" should read "==" because args.verbosity cannot be 2 or greater after the if statement. You would find the original codes unreasonable until you go through "if args.verbosity >= 1:". ---------- assignee: docs at python components: Documentation messages: 347617 nosy: Culip, docs at python priority: normal severity: normal status: open title: Argparse Tutorial - unreasonable operators type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 08:32:52 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 10 Jul 2019 12:32:52 +0000 Subject: [docs] [issue37548] Document range of atan, acos and asin Message-ID: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> New submission from Mark Dickinson : A small nice-to-have: it would be good to document the range of the inverse trigonometric functions `math.atan`, `math.asin` and `math.acos`, in both the docstrings and the built documentation. There are standard "principal values" for each of these inverses, and Python is using these standard values, but that may not be obvious to a user. ---------- assignee: docs at python components: Documentation messages: 347620 nosy: docs at python, mark.dickinson priority: normal severity: normal status: open title: Document range of atan, acos and asin versions: Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 13:14:07 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Jul 2019 17:14:07 +0000 Subject: [docs] [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562778847.01.0.977394060648.issue37545@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 13:30:10 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 10 Jul 2019 17:30:10 +0000 Subject: [docs] [issue37548] Document range of atan, acos and asin In-Reply-To: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> Message-ID: <1562779810.35.0.027221978501.issue37548@roundup.psfhosted.org> Change by Mark Dickinson : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 22:09:44 2019 From: report at bugs.python.org (Roy Wellington) Date: Thu, 11 Jul 2019 02:09:44 +0000 Subject: [docs] [issue37554] Typo in os.rename docs Message-ID: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> New submission from Roy Wellington : The documentation for os.rename (e.g., here, https://docs.python.org/3/library/os.html#os.rename but also for 3.8 and 3.9) currently reads, > On Unix, if src is a file and dst is a directory or vice-versa, anq:q IsADirectoryError or a NotADirectoryError will be raised respectively. That "anq:q" should probably be just "an"; it appears someone tried to quit vim ;-) ---------- assignee: docs at python components: Documentation messages: 347647 nosy: docs at python, roy.wellington priority: normal severity: normal status: open title: Typo in os.rename docs versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 22:39:44 2019 From: report at bugs.python.org (Mariatta) Date: Thu, 11 Jul 2019 02:39:44 +0000 Subject: [docs] [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562812784.75.0.964940478285.issue37554@roundup.psfhosted.org> Change by Mariatta : ---------- keywords: +patch pull_requests: +14495 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14692 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:30:59 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Jul 2019 03:30:59 +0000 Subject: [docs] [issue30757] pyinstaller can be added to docs, py2exe ref can be updated In-Reply-To: <1498451168.27.0.593036349197.issue30757@psf.upfronthosting.co.za> Message-ID: <1562815859.32.0.409640699532.issue30757@roundup.psfhosted.org> Zachary Ware added the comment: I've just come across the fact that the Windows FAQ is out of date again. Denis, your PR still has some pending change requests; are you interested in updating your PR, or would you rather someone else take this over? ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> patch review versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:37:44 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 11 Jul 2019 03:37:44 +0000 Subject: [docs] [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562816264.11.0.53541388582.issue37545@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- keywords: +patch pull_requests: +14497 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 10 23:38:34 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 11 Jul 2019 03:38:34 +0000 Subject: [docs] [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562816314.02.0.161306441143.issue37545@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 00:53:26 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Jul 2019 04:53:26 +0000 Subject: [docs] [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562820806.49.0.95234652955.issue37545@roundup.psfhosted.org> Zachary Ware added the comment: I don't agree with the proposed change; I think the examples are fine as is. Using `>= 1` means if you later decide that the `-vv` message should actually only happen at `-vvv` and `-vv` should get the same message as `-v`, you only have to change the 2 to a 3 and you're done. With `== 1` you have to remember to either change `== 1` to `>= 1` or switch to `in {1, 2}`, or (more likely) forget to make the change initially and have to go back and fix it later. The last example especially must not be changed; it is explicitly showing how to emit additional messages at higher verbosity levels. I recommend closing this issue. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 01:52:31 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 11 Jul 2019 05:52:31 +0000 Subject: [docs] [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562824350.97.0.692880085387.issue37545@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: The >= is unnecessary in this exact example, as is correctly noted by Nathan. I understand using >= for future purposes, after you explained, what is also correct but confusing because you specifically describe why you change the >= 2, but it doesn't make sense for >= 1 then. For the last example, I might be completely wrong (please don't shoot me), IMHO it can be == 1 also? It is not 'explicitly showing how to emit additional messages at higher verbosity levels', but to 'uses verbosity level to display more text'. So, removing the 'else' statement to always print(answer), no matter which verbosity is shown. To avoid confusion, I recommend the change and please have another look at the last statement that makes no difference in using == or >=. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:16:47 2019 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 11 Jul 2019 06:16:47 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1562825807.08.0.523810950372.issue30550@roundup.psfhosted.org> Change by Dima Tisnek : ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:37:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Jul 2019 06:37:15 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1562827035.79.0.355574736458.issue30550@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 02:49:39 2019 From: report at bugs.python.org (Kishore) Date: Thu, 11 Jul 2019 06:49:39 +0000 Subject: [docs] [issue37557] Example snippets for simpler functions/methods Message-ID: <1562827779.24.0.52309043258.issue37557@roundup.psfhosted.org> New submission from Kishore : Is there a reason why many (not all) of the simpler methods lack example snippets? Snippets which are present: 1. https://docs.python.org/3/library/stdtypes.html#str.rstrip 2. https://docs.python.org/3/library/stdtypes.html#str.strip Snippets which are not present: 1. https://docs.python.org/3/library/stdtypes.html#str.lower 2. https://docs.python.org/3/library/stdtypes.html#str.upper 3. https://docs.python.org/3/library/stdtypes.html#str.isupper Is there any recommendation against adding concise example snippets for all methods? I am of the opinion that short examples are more easier to read and visually skim through, than reading the description. I was hoping I could add example snippets to the simpler methods if anyone does not have any objection towards it. ---------- assignee: docs at python components: Documentation messages: 347656 nosy: docs at python, kishvanchee priority: normal severity: normal status: open title: Example snippets for simpler functions/methods type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 03:46:03 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Thu, 11 Jul 2019 07:46:03 +0000 Subject: [docs] [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562831163.48.0.537001335781.issue37545@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: @Zachary, you are right ... the last one should be >= 1. Now i see the difference with the previous examples. It changed the output drastically from "the square of {} equals {}" vs "{}^2 == {}" to suddenly printing the filename at -vv. I was focused more on the structural change to always print answer. ... I will adjust. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:00:09 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:00:09 +0000 Subject: [docs] [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562853609.42.0.556447361796.issue34369@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:01:01 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:01:01 +0000 Subject: [docs] [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562853661.63.0.941872777965.issue34369@roundup.psfhosted.org> Tal Einat added the comment: New changeset 79042ac4348ccc09344014f20dd49401579f8795 by Tal Einat in branch 'master': bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499) https://github.com/python/cpython/commit/79042ac4348ccc09344014f20dd49401579f8795 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:01:09 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 14:01:09 +0000 Subject: [docs] [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562853669.15.0.130684371331.issue34369@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14504 pull_request: https://github.com/python/cpython/pull/14704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:01:17 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 14:01:17 +0000 Subject: [docs] [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562853677.83.0.504327730134.issue34369@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14505 pull_request: https://github.com/python/cpython/pull/14705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:01:34 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 14:01:34 +0000 Subject: [docs] [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562853694.9.0.450700899093.issue34369@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14506 pull_request: https://github.com/python/cpython/pull/14706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:14:34 2019 From: report at bugs.python.org (Jonathan) Date: Thu, 11 Jul 2019 14:14:34 +0000 Subject: [docs] [issue37563] Documentation - default for StreamHandler Message-ID: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> New submission from Jonathan : https://docs.python.org/2/library/logging.handlers.html https://docs.python.org/3/library/logging.handlers.html Both say: """class logging.StreamHandler(stream=None) Returns a new instance of the StreamHandler class. If stream is specified, the instance will use it for logging output; otherwise, sys.stderr will be used.""" Surely that means from an user perspective that the default is actually `sys.stderr`, not `None`? ---------- assignee: docs at python components: Documentation messages: 347677 nosy: docs at python, jonathan-lp priority: normal severity: normal status: open title: Documentation - default for StreamHandler versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:16:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Jul 2019 14:16:02 +0000 Subject: [docs] [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1562854562.15.0.719664207542.issue37563@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:16:09 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 14:16:09 +0000 Subject: [docs] [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562854569.71.0.609944034765.issue34369@roundup.psfhosted.org> miss-islington added the comment: New changeset dc0b6af42eca70e520b67d0bcf4dc5278a3f02dd by Miss Islington (bot) in branch '3.8': bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499) https://github.com/python/cpython/commit/dc0b6af42eca70e520b67d0bcf4dc5278a3f02dd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:16:49 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:16:49 +0000 Subject: [docs] [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562854609.19.0.514937205626.issue34369@roundup.psfhosted.org> Tal Einat added the comment: New changeset d3747fd8fa91b768b73b60f2e2a14044e5404afa by Tal Einat (Miss Islington (bot)) in branch '3.7': bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499) https://github.com/python/cpython/commit/d3747fd8fa91b768b73b60f2e2a14044e5404afa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:17:11 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:17:11 +0000 Subject: [docs] [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562854631.57.0.254640781397.issue34369@roundup.psfhosted.org> Tal Einat added the comment: New changeset 46c2eff5adca7dc309f077ec65faf95b95c47b43 by Tal Einat (Miss Islington (bot)) in branch '2.7': bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499) https://github.com/python/cpython/commit/46c2eff5adca7dc309f077ec65faf95b95c47b43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:19:18 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 11 Jul 2019 14:19:18 +0000 Subject: [docs] [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1562854757.99.0.976510193064.issue34369@roundup.psfhosted.org> Change by Tal Einat : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 10:59:50 2019 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 11 Jul 2019 14:59:50 +0000 Subject: [docs] [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1562857190.16.0.914564645645.issue37563@roundup.psfhosted.org> Vinay Sajip added the comment: If None is passed, that is interpreted to mean whatever the implementation default is, and that is sys.stderr. For backwards compatibility, that won't change: and I don't see any need to update the documentation, as it makes it perfectly clear that sys.stderr will be used if None is specified. Nor do I see a need to change the default parameter value from its current value of None. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 11:12:02 2019 From: report at bugs.python.org (Jonathan) Date: Thu, 11 Jul 2019 15:12:02 +0000 Subject: [docs] [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1562857922.93.0.972540602635.issue37563@roundup.psfhosted.org> Change by Jonathan : ---------- status: -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:31:42 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:31:42 +0000 Subject: [docs] [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562866302.23.0.497167631578.issue37554@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14512 pull_request: https://github.com/python/cpython/pull/14712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:31:54 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:31:54 +0000 Subject: [docs] [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562866314.09.0.41290256301.issue37554@roundup.psfhosted.org> miss-islington added the comment: New changeset 7cbef72902f32866a416ca6c4e732af4541951b8 by Miss Islington (bot) (Mariatta) in branch 'master': closes bpo-37554: Remove `q:q` in os.rst documentation (GH-14692) https://github.com/python/cpython/commit/7cbef72902f32866a416ca6c4e732af4541951b8 ---------- nosy: +miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:32:24 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:32:24 +0000 Subject: [docs] [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562866344.99.0.714902282265.issue37554@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14513 pull_request: https://github.com/python/cpython/pull/14713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:39:42 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:39:42 +0000 Subject: [docs] [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562866782.76.0.929822869072.issue37554@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14514 pull_request: https://github.com/python/cpython/pull/14714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:40:37 2019 From: report at bugs.python.org (Mariatta) Date: Thu, 11 Jul 2019 17:40:37 +0000 Subject: [docs] [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562866837.56.0.227824287712.issue37554@roundup.psfhosted.org> Mariatta added the comment: Thanks for the report! ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:45:40 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:45:40 +0000 Subject: [docs] [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562867140.85.0.176707427468.issue37554@roundup.psfhosted.org> miss-islington added the comment: New changeset 107171500d7d6e60f463eeb4db492c0ae292a669 by Miss Islington (bot) in branch '3.8': closes bpo-37554: Remove `q:q` in os.rst documentation (GH-14692) https://github.com/python/cpython/commit/107171500d7d6e60f463eeb4db492c0ae292a669 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:46:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Jul 2019 17:46:44 +0000 Subject: [docs] [issue37545] Argparse Tutorial - unreasonable operators In-Reply-To: <1562759670.76.0.736461636286.issue37545@roundup.psfhosted.org> Message-ID: <1562867204.86.0.875343988808.issue37545@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Zachary. The current writing is more errorproof. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 13:48:05 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 11 Jul 2019 17:48:05 +0000 Subject: [docs] [issue37554] Typo in os.rename docs In-Reply-To: <1562810984.17.0.614327905754.issue37554@roundup.psfhosted.org> Message-ID: <1562867285.66.0.950953600497.issue37554@roundup.psfhosted.org> miss-islington added the comment: New changeset 71435f685c0423f878946e584f4b9eb01233d332 by Miss Islington (bot) in branch '3.7': closes bpo-37554: Remove `q:q` in os.rst documentation (GH-14692) https://github.com/python/cpython/commit/71435f685c0423f878946e584f4b9eb01233d332 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 18:36:47 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 11 Jul 2019 22:36:47 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1562884607.1.0.146302599622.issue30550@roundup.psfhosted.org> Josh Rosenberg added the comment: Is there a reason to document object_pairs_hook=OrderedDict rather than just making the decoder populate a regular dict in an order-preserving way? (No idea if it does this already) ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:12:32 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Fri, 12 Jul 2019 03:12:32 +0000 Subject: [docs] [issue37548] Document range of atan, acos and asin In-Reply-To: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> Message-ID: <1562901152.47.0.396368844858.issue37548@roundup.psfhosted.org> Change by Giovanni Cappellotto : ---------- keywords: +patch pull_requests: +14517 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 11 23:17:16 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Fri, 12 Jul 2019 03:17:16 +0000 Subject: [docs] [issue37548] Document range of atan, acos and asin In-Reply-To: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> Message-ID: <1562901436.48.0.993892482882.issue37548@roundup.psfhosted.org> Giovanni Cappellotto added the comment: I created a small diff to update the documentation of `math.atan`, `math.asin` and `math.acos`. ---------- nosy: +potomak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 03:40:49 2019 From: report at bugs.python.org (Reuben Thomas) Date: Fri, 12 Jul 2019 07:40:49 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code Message-ID: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> New submission from Reuben Thomas : The CTypes documentation has this example: >>> s = c_char_p() >>> s.value = "abc def ghi" >>> s.value 'abc def ghi' >>> s.value is s.value False >>> It appears not to have been updated since Python 2: in Python 3, you can't assign a str to a c_char_p. If one tries the example code above, one gets: >>> s = c_char_p() >>> s.value = "abc def ghi" Traceback (most recent call last): File "", line 1, in TypeError: bytes or integer address expected instead of str instance Using a bytes works: >>> s = c_char_p() >>> s.value = b"abc def ghi" >>> s.value b'abc def ghi' >>> s.value is s.value False >>> Hence adding the two "b"s is an obvious fix. Note that the similar example with c_wchar_p does work fine with str. ---------- assignee: docs at python components: Documentation messages: 347725 nosy: docs at python, rrt priority: normal severity: normal status: open title: Incorrect use of c_char_p in example code versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 03:57:59 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 12 Jul 2019 07:57:59 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1562918279.19.0.521391251175.issue37571@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. Looks like a valid issue to me. Would you like to create a PR? ---------- components: +ctypes nosy: +amaury.forgeotdarc, belopolsky, meador.inge, xtreak versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 06:17:14 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 12 Jul 2019 10:17:14 +0000 Subject: [docs] [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1562926634.65.0.057150136304.issue37563@roundup.psfhosted.org> Vinay Sajip added the comment: The devil is in the detail. If stream=sys.stderr is specified, that takes effect at import time. If stream=None is specified and the implementation chooses to treat that as sys.stderr, that takes effect at the time of the call. The two are not equivalent. It was a conscious choice by me to implement it this way, and I believe it's clearly documented what happens, which should be sufficiently clear for users. Which part of "If stream is specified, the instance will use it for logging output; otherwise, sys.stderr will be used." is unclear? ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 14:16:31 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 12 Jul 2019 18:16:31 +0000 Subject: [docs] [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. Message-ID: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> New submission from Eric Snow : When writing an importer, the finder (either MetaPathFinder or PathEntryFinder) must implement `find_spec()`. A useful tool for that is the existing `spec_from_loader()`. [1] The docs for `MetaPathFinder.find_spec()` and `PathEntryFinder.find_spec()` should mention it. [1] (https://docs.python.org/3/library/importlib.html#importlib.util.spec_from_loader ---------- assignee: docs at python components: Documentation keywords: easy messages: 347750 nosy: docs at python, eric.snow priority: normal severity: normal stage: needs patch status: open title: Mention spec_from_loader() in Finder.find_spec() docs. type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 14:55:03 2019 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Fri, 12 Jul 2019 18:55:03 +0000 Subject: [docs] [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1562957703.17.0.833084224246.issue34226@roundup.psfhosted.org> Change by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 15:05:09 2019 From: report at bugs.python.org (Michele Angrisano) Date: Fri, 12 Jul 2019 19:05:09 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1562958309.89.0.908800385127.issue37571@roundup.psfhosted.org> Change by Michele Angrisano : ---------- keywords: +patch pull_requests: +14518 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 16:50:07 2019 From: report at bugs.python.org (Srikanth) Date: Fri, 12 Jul 2019 20:50:07 +0000 Subject: [docs] [issue37575] Python Documentation on strings ( section 3.1.2.) Message-ID: <1562964607.44.0.971161139684.issue37575@roundup.psfhosted.org> New submission from Srikanth : In section 3.1.2 of the python documentation, its mentioned as below: Two or more string literals (i.e. the ones enclosed between quotes) next to each other are automatically concatenated. This feature is particularly useful when you want to break long strings: This only works with two literals though, not with variables or expressions: However, the concatination operation works on variables and expressions also. Please find the below python code snippet and the output: Python Code: ------------- s1='Hello' s2=' World ' s3=' How are you ? ' print(s1, s2, "\n", s3, "\n") print('---------------------------') print('Long time ' 'No see mate ') print("Hope ", 'All is ' "good") print('---------------------------') print(s1, 'World'," !!") print((s1+s2+s3)*2," there ?") Output: -------- Hello World How are you ? --------------------------- Long time No see mate Hope All is good --------------------------- Hello World !! Hello World How are you ? Hello World How are you ? there ? ---------- assignee: docs at python components: Documentation files: Python_Docs_3.1.2_String_Concatination.py messages: 347754 nosy: Deshpande, docs at python priority: normal severity: normal status: open title: Python Documentation on strings ( section 3.1.2.) type: resource usage Added file: https://bugs.python.org/file48474/Python_Docs_3.1.2_String_Concatination.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:16:02 2019 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Jul 2019 21:16:02 +0000 Subject: [docs] [issue37575] Python Documentation on strings ( section 3.1.2.) In-Reply-To: <1562964607.44.0.971161139684.issue37575@roundup.psfhosted.org> Message-ID: <1562966162.14.0.619038546701.issue37575@roundup.psfhosted.org> Mark Dickinson added the comment: The documentation is correct here; none of the examples you show demonstrates implicit concatenation of string-valued expressions. The tutorial documentation is referring to two strings placed directly next to each other with no other syntax (other than whitespace) in between. For example, taking just the first line you give (after the definitions): print(s1, s2, "\n", s3, "\n") Nowhere in this line are two string-value expressions placed right next to each other; they're occurring in an argument list to a function, separated by commas. The other lines are similar. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 12 17:17:55 2019 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Jul 2019 21:17:55 +0000 Subject: [docs] [issue37575] Python Documentation on strings (tutorial section 3.1.2.) In-Reply-To: <1562964607.44.0.971161139684.issue37575@roundup.psfhosted.org> Message-ID: <1562966275.52.0.967336151645.issue37575@roundup.psfhosted.org> Change by Mark Dickinson : ---------- title: Python Documentation on strings ( section 3.1.2.) -> Python Documentation on strings (tutorial section 3.1.2.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 01:49:45 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 05:49:45 +0000 Subject: [docs] [issue37580] Markup typo in http.cookiejar doc Message-ID: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : CookieJar.add_cookie_header in Doc/library/http.cookiejar.rst contains the below statement where .. is present that causes the markup to not link to the correct docs. The fix would be to remove extra dot in the docs and verify the rendered doc page. https://docs.python.org/3/library/http.cookiejar.html#http.cookiejar.CookieJar.add_cookie_header The *request* object (usually a :class:`urllib.request..Request` instance) Marking this as easy for first time contributors who have not made a PR. ---------- assignee: docs at python components: Documentation keywords: easy messages: 347775 nosy: docs at python, xtreak priority: normal severity: normal stage: needs patch status: open title: Markup typo in http.cookiejar doc type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:03:42 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2019 06:03:42 +0000 Subject: [docs] [issue37557] Example snippets for simpler functions/methods In-Reply-To: <1562827779.24.0.52309043258.issue37557@roundup.psfhosted.org> Message-ID: <1562997822.64.0.634481136795.issue37557@roundup.psfhosted.org> Raymond Hettinger added the comment: We generally only put the examples where they add something substantive. Otherwise, it just make the docs verbose and time consuming to read start to finish. Adding an example for str.lower() contributes no additional value. Most published Python books would all avoid the unnecessary here as well. FWIW, we have no evidence that any user has ever found the current form hard to use. So, let's close this. If you're looking for places to contribute, please look at the open bugs where there are known problems. ---------- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 02:44:11 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 13 Jul 2019 06:44:11 +0000 Subject: [docs] [issue37581] Docs: Improve phrasing of flush argument for print() In-Reply-To: <1563000171.75.0.259144303863.issue37581@roundup.psfhosted.org> Message-ID: <1563000251.61.0.195095776374.issue37581@roundup.psfhosted.org> Change by Kyle Stanley : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: -> enhancement versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 03:23:21 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Jul 2019 07:23:21 +0000 Subject: [docs] [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. In-Reply-To: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> Message-ID: <1563002601.42.0.658561799267.issue37574@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 04:38:13 2019 From: report at bugs.python.org (Jonathan) Date: Sat, 13 Jul 2019 08:38:13 +0000 Subject: [docs] [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1563007093.59.0.165088856932.issue37563@roundup.psfhosted.org> Jonathan added the comment: > The devil is in the detail. If stream=sys.stderr is specified, that takes effect at import time. If stream=None is specified and the implementation chooses to treat that as sys.stderr, that takes effect at the time of the call. The two are not equivalent. But this isn't what the prose says at all. You're right, the prose clearly say that the default is sys.stderr, however the code doesn't show that, and many people won't read the prose (I don't a lot of the time), they'll only look at the code snippet because that's all they think they need. The code-snippet claims that the default is None, which from a user perspective isn't true. Again I point out that the documentation is for users, not implementers. We users Do. Not. Care. about how wonderfully clever your implementation is, we care about how it actually works. Whatever Rube-Goldbergian implementation details there are behind the scenes are of no interest to us. Yet again: There's a standard for documenting defaults for keyword arguments, I would ask that it please be used consistently to help us users. Fine, lets try this another way - does anyone else have opinions on this? What's the convention for documentation defaults? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:06:51 2019 From: report at bugs.python.org (Milan Oberkirch) Date: Sat, 13 Jul 2019 09:06:51 +0000 Subject: [docs] [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563008811.08.0.20486068765.issue37580@roundup.psfhosted.org> Change by Milan Oberkirch : ---------- keywords: +patch pull_requests: +14524 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:15:29 2019 From: report at bugs.python.org (Ilya Kamenshchikov) Date: Sat, 13 Jul 2019 09:15:29 +0000 Subject: [docs] [issue37352] Typo in documentation: "to making it easy" In-Reply-To: <1561051076.38.0.680855087082.issue37352@roundup.psfhosted.org> Message-ID: <1563009329.6.0.914836643205.issue37352@roundup.psfhosted.org> Change by Ilya Kamenshchikov : ---------- keywords: +patch pull_requests: +14525 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14730 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 05:30:28 2019 From: report at bugs.python.org (Ilya Kamenshchikov) Date: Sat, 13 Jul 2019 09:30:28 +0000 Subject: [docs] [issue37352] Typo in documentation: "to making it easy" In-Reply-To: <1561051076.38.0.680855087082.issue37352@roundup.psfhosted.org> Message-ID: <1563010228.42.0.983275964179.issue37352@roundup.psfhosted.org> Ilya Kamenshchikov added the comment: The wording from Carol Willing makes it read simpler. Also in the next sentence, 'test-directed development' goes under the name 'test-driven development' as of 2019 (search in google -> https://en.wikipedia.org/wiki/Test-driven_development). I have created a pull request with simpler wording and 'test-driven development'. CLA is signed, will take time to propagate. ---------- nosy: +Ilya Kamenshchikov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:10:51 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 13 Jul 2019 10:10:51 +0000 Subject: [docs] [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1563012651.26.0.956418690915.issue37563@roundup.psfhosted.org> Vinay Sajip added the comment: > the prose clearly say that the default is sys.stderr, however the code doesn't show that Which code are you looking at? Here is the entirety of StreamHandler.__init__: def __init__(self, stream=None): """ Initialize the handler. If stream is not specified, sys.stderr is used. """ Handler.__init__(self) if stream is None: stream = sys.stderr self.stream = stream > We users Do. Not. Care. about how wonderfully clever your implementation is, we care about how it actually works. Whatever Rube-Goldbergian implementation details there are behind the scenes are of no interest to us. I'm not sure your tone is particularly constructive here. I don't regard the code you say you've read, reproduced above, is particularly Rube-Goldbergian, or even Heath-Robinsonish. And are you presuming to speak for all Python users here? > Fine, lets try this another way - does anyone else have opinions on this? As far as I can remember, you're the first person to bring this up since logging was added to Python in 2003. In all that time, no-one appears to have been confused by that prose, which has been there since pretty much the beginning, though there was a spelling change and a logging documentation reorganisation around 9 years ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:17:19 2019 From: report at bugs.python.org (Ilya Kamenshchikov) Date: Sat, 13 Jul 2019 10:17:19 +0000 Subject: [docs] [issue7951] Should str.format allow negative indexes when used for __getitem__ access? In-Reply-To: <1266450859.13.0.906832569526.issue7951@psf.upfronthosting.co.za> Message-ID: <1563013039.02.0.924233662994.issue7951@roundup.psfhosted.org> Ilya Kamenshchikov added the comment: Py3.6+ f-strings support any indexing as they actually evaluate python expressions. >>> a = ['Java', 'Python'] >>> var = f"Hello {a[-1]}" Hello Python ---------- nosy: +Ilya Kamenshchikov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:17:20 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 10:17:20 +0000 Subject: [docs] [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563013040.4.0.787520959869.issue37580@roundup.psfhosted.org> miss-islington added the comment: New changeset b5bbb8a740eaf46c78d122185de8b072e9deea2a by Miss Islington (bot) (Milan Oberkirch) in branch 'master': bpo-37580: Fix typo in http.cookiejar documentation (GH-14731) https://github.com/python/cpython/commit/b5bbb8a740eaf46c78d122185de8b072e9deea2a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:17:35 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 10:17:35 +0000 Subject: [docs] [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563013055.76.0.308721641968.issue37580@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14527 pull_request: https://github.com/python/cpython/pull/14733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:18:03 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 10:18:03 +0000 Subject: [docs] [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563013083.72.0.678604707725.issue37580@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14528 pull_request: https://github.com/python/cpython/pull/14734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:23:13 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 10:23:13 +0000 Subject: [docs] [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563013393.45.0.0179959980356.issue37580@roundup.psfhosted.org> miss-islington added the comment: New changeset 36494a94914c4d3f249ca10b6a2d6194f6093cc6 by Miss Islington (bot) in branch '3.7': bpo-37580: Fix typo in http.cookiejar documentation (GH-14731) https://github.com/python/cpython/commit/36494a94914c4d3f249ca10b6a2d6194f6093cc6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:24:51 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Jul 2019 10:24:51 +0000 Subject: [docs] [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563013491.75.0.000218599099378.issue37580@roundup.psfhosted.org> miss-islington added the comment: New changeset 5da83b417e48aecd7698387d3f37c603162fd46e by Miss Islington (bot) in branch '3.8': bpo-37580: Fix typo in http.cookiejar documentation (GH-14731) https://github.com/python/cpython/commit/5da83b417e48aecd7698387d3f37c603162fd46e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 06:25:59 2019 From: report at bugs.python.org (Jonathan) Date: Sat, 13 Jul 2019 10:25:59 +0000 Subject: [docs] [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1563013559.95.0.720002075815.issue37563@roundup.psfhosted.org> Jonathan added the comment: > I'm not sure your tone is particularly constructive here. Apologies, my bad. > Which code are you looking at? The documentation code: `class logging.StreamHandler(stream=None)`. Sorry, I don't know what you'd call that. I'm not referring to the code proper. > As far as I can remember, you're the first person to bring this up since logging was added to Python in 2003. This is a fallacy. Just because no-one else has reported it doesn't mean it hasn't caused a problem. I mean, I'm sure there are plenty of spelling errors/typos in the docs that no-one has reported for years, it doesn't mean they shouldn't be fixed when raised. It's also assuming you have seen and remember every single bug report related to this from the past 16 years which, nothing personal, seems incredibly unlikely given how poor humans are at remembering things in the first place. > And are you presuming to speak for all Python users here? I'm presuming to speak for end-users yes, why not? I did ask for other input too you'll note. After a few decades of practice I'm fairly decent at getting into the headspace of users (of which I am one in this case), and I know it's something many developers don't really do well. A common mistake we developers make is to assume that everyone knows what we know and thinks like us. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 07:35:46 2019 From: report at bugs.python.org (Milan Oberkirch) Date: Sat, 13 Jul 2019 11:35:46 +0000 Subject: [docs] [issue9938] Documentation for argparse interactive use In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1563017746.81.0.207779108493.issue9938@roundup.psfhosted.org> Milan Oberkirch added the comment: This issue is a duplicate of issue 9112 which was resolved by commit 9375492b ---------- nosy: +zvyn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 08:56:41 2019 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 13 Jul 2019 12:56:41 +0000 Subject: [docs] [issue37580] Markup typo in http.cookiejar doc In-Reply-To: <1562996985.21.0.0323221925238.issue37580@roundup.psfhosted.org> Message-ID: <1563022601.21.0.0958946074129.issue37580@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:05:29 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2019 13:05:29 +0000 Subject: [docs] [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. In-Reply-To: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> Message-ID: <1563023129.38.0.0107243541084.issue37574@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14535 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:32:12 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Jul 2019 13:32:12 +0000 Subject: [docs] [issue37575] Python Documentation on strings (tutorial section 3.1.2.) In-Reply-To: <1562964607.44.0.971161139684.issue37575@roundup.psfhosted.org> Message-ID: <1563024732.81.0.159938630026.issue37575@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> not a bug status: open -> pending type: resource usage -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 09:59:58 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Jul 2019 13:59:58 +0000 Subject: [docs] [issue37548] Document range of atan, acos and asin In-Reply-To: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> Message-ID: <1563026398.05.0.0176439366731.issue37548@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset dc3f99fa77f415077c20a9c2b3e953e5cd894076 by Mark Dickinson (Giovanni Cappellotto) in branch 'master': bpo-37548: Document range of atan, acos and asin (GH-14717) https://github.com/python/cpython/commit/dc3f99fa77f415077c20a9c2b3e953e5cd894076 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:02:59 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Jul 2019 14:02:59 +0000 Subject: [docs] [issue37548] Document range of atan, acos and asin In-Reply-To: <1562761972.12.0.588698954565.issue37548@roundup.psfhosted.org> Message-ID: <1563026579.0.0.650776921396.issue37548@roundup.psfhosted.org> Mark Dickinson added the comment: Done for 3.9; closing. Thank you for the contribution! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:19:48 2019 From: report at bugs.python.org (Carl Bordum Hansen) Date: Sat, 13 Jul 2019 14:19:48 +0000 Subject: [docs] [issue30588] Missing documentation for codecs.escape_decode In-Reply-To: <1496847775.57.0.842403144977.issue30588@psf.upfronthosting.co.za> Message-ID: <1563027588.37.0.314513990879.issue30588@roundup.psfhosted.org> Change by Carl Bordum Hansen : ---------- keywords: +patch pull_requests: +14542 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 10:32:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Jul 2019 14:32:02 +0000 Subject: [docs] [issue30588] Missing documentation for codecs.escape_decode In-Reply-To: <1496847775.57.0.842403144977.issue30588@psf.upfronthosting.co.za> Message-ID: <1563028322.29.0.386803630399.issue30588@roundup.psfhosted.org> Serhiy Storchaka added the comment: I disagree. We can change, rename or remove it because it is not public function and never was. But we can not just remove it while it is used in the pickle module, and there is no reason to change it as it works pretty good for its purpose. If you want to make it public and maintain it, I suggest first discuss this on the Python-Ideas mailing list. You should prove that the benefit of adding it is larger than the cost of the maintance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:51:33 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2019 15:51:33 +0000 Subject: [docs] [issue25433] whitespace in strip()/lstrip()/rstrip() In-Reply-To: <1445170536.34.0.94220475409.issue25433@psf.upfronthosting.co.za> Message-ID: <1563033093.3.0.496914370194.issue25433@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14548 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 11:57:54 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Jul 2019 15:57:54 +0000 Subject: [docs] [issue12217] Cross-link docs for faulthandler, traceback and pdb In-Reply-To: <1306770313.4.0.799430970978.issue12217@psf.upfronthosting.co.za> Message-ID: <1563033474.53.0.285501397863.issue12217@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +14549 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14754 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:48:08 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 13 Jul 2019 16:48:08 +0000 Subject: [docs] [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1563036488.76.0.411224271752.issue37563@roundup.psfhosted.org> Vinay Sajip added the comment: > This is a fallacy. What fallacy? I was responding to "does anyone else have opinions on this?" I can't read minds of people all over the world, so I have to go by my best guess, which is based on how many times this issue has been reported before - which I believe is zero. > It's also assuming you have seen and remember every single bug report related to this from the past 16 years which, nothing personal, seems incredibly unlikely given how poor humans are at remembering things in the first place. Feel free to do a search on here to see if you can find an earlier issue about this. > I'm presuming to speak for end-users yes, why not? Because they're a very diverse bunch who don't all speak with one voice. I, too, am a user (of other people's code) as much as a developer. I don't see things the same way as you do, here, and it's not because it's my code. I'd probably feel the same way if you'd pointed to some other instance of Python code which does the same kind of thing. There are numerous examples in the stdlib where None is passed in and some other value (e.g. 'utf-8' for an encoding) are used as a default, without that value appearing in any documented argument list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 12:55:18 2019 From: report at bugs.python.org (Jonathan) Date: Sat, 13 Jul 2019 16:55:18 +0000 Subject: [docs] [issue37563] Documentation - default for StreamHandler In-Reply-To: <1562854474.19.0.0872282470861.issue37563@roundup.psfhosted.org> Message-ID: <1563036918.0.0.940734022686.issue37563@roundup.psfhosted.org> Jonathan added the comment: >What fallacy? You appeared to be saying (to paraphrase) "no-one else has ever reported this, so it's never been a problem". That's a fallacy. > I was responding to "does anyone else have opinions on this?" I was asking if anyone else wanted to chime in with an opinion. > There are numerous examples in the stdlib where None is passed in and some other value (e.g. 'utf-8' for an encoding) are used as a default Then for clarity's purpose I'd suggest those be changed too, but that's another ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 14:37:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Jul 2019 18:37:32 +0000 Subject: [docs] [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563043052.67.0.337933741369.issue7940@roundup.psfhosted.org> Raymond Hettinger added the comment: -1 on the proposal. We don't know of any strong use cases, so there isn't a real problem being solved here. Rather than providing a benefit, this feature request makes it more likely that people will write convoluted code or that it will let bugs pass silently that would otherwise be caught. ISTM the actual issue here is an incorrect user expectation that "all things that having indexing will support negative indexing". While it is common for objects to implement negative index support, it is not universal or required. Even collections.abc.Sequence does not insist on negative index support. I think this warrants a FAQ entry (which should also mention that slice support as well is not universal or required, some objects have it, some don't). Reclassifying this as documentation issue. ---------- assignee: -> docs at python components: +Documentation -Library (Lib), Regular Expressions nosy: +docs at python, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 14:38:27 2019 From: report at bugs.python.org (Ulf Rompe) Date: Sat, 13 Jul 2019 18:38:27 +0000 Subject: [docs] [issue25433] whitespace in strip()/lstrip()/rstrip() In-Reply-To: <1445170536.34.0.94220475409.issue25433@psf.upfronthosting.co.za> Message-ID: <1563043107.74.0.50935545081.issue25433@roundup.psfhosted.org> Ulf Rompe added the comment: Using a re.sub() call as documentation: 1. wouldn't be helpful for many developers. If they need to look up the documentation of a simple method they shouldn't be forced to learn about a more complex one as well to understand it. 2. would be wild guessing since the re module defines its own whitespace as well. I have created a pull request that aligns the strip methods of bytearray to those of bytes objects. The implementation found there is cleaner and even a little bit faster. Current master: ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.lstrip()' 1000000 loops, best of 5: 245 nsec per loop ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.rstrip()' 1000000 loops, best of 5: 245 nsec per loop ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.strip()' 1000000 loops, best of 5: 260 nsec per loop Using my patch: ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.lstrip()' 1000000 loops, best of 5: 235 nsec per loop ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.rstrip()' 1000000 loops, best of 5: 235 nsec per loop ./python -m timeit -s 'bla = bytearray(b" foo ")' 'bla.strip()' 1000000 loops, best of 5: 239 nsec per loop I have also updated the documentation, adding "whitespace" to the glossary and linking to it from many places in the documentation of standard types. ---------- nosy: +rompe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 17:57:40 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 13 Jul 2019 21:57:40 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563055060.61.0.596656191256.issue30550@roundup.psfhosted.org> Kyle Stanley added the comment: > The JSON encoder for dictionaries preserves the order of the items in a dictionary >From what I can tell, the JSON encoder does nothing to preserve the order of the keys. Although the default option is to not modify the existing dictionary, the items() method returns the k,v pairs in a non-random arbitrary manner, which may not match the order the values were entered in. See https://docs.python.org/2/library/stdtypes.html#dict.items. ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 18:45:40 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Sat, 13 Jul 2019 22:45:40 +0000 Subject: [docs] [issue13127] xml.dom.Attr.name is not labeled as read-only In-Reply-To: <1318047492.07.0.217686953928.issue13127@psf.upfronthosting.co.za> Message-ID: <1563057940.69.0.381870676.issue13127@roundup.psfhosted.org> Change by Giovanni Cappellotto : ---------- keywords: +patch pull_requests: +14552 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 13 18:51:14 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Sat, 13 Jul 2019 22:51:14 +0000 Subject: [docs] [issue13127] xml.dom.Attr.name is not labeled as read-only In-Reply-To: <1318047492.07.0.217686953928.issue13127@psf.upfronthosting.co.za> Message-ID: <1563058274.82.0.713534205383.issue13127@roundup.psfhosted.org> Giovanni Cappellotto added the comment: In https://github.com/python/cpython/pull/14757 I tried updating the implementation of `Attr._set_name` to remove and reset the attr node in the owner element. So now `Attr._set_name` behaves similarly to `Document.renameNode`. All existing tests are still passing and I added one more test for checking the issue described here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:55:14 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 07:55:14 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563090914.2.0.776739475227.issue37571@roundup.psfhosted.org> Steve Dower added the comment: New changeset 6b929580eb018cfef386db7f7f66b3a58532eada by Steve Dower (Michele Angrisano) in branch 'master': bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721) https://github.com/python/cpython/commit/6b929580eb018cfef386db7f7f66b3a58532eada ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:55:22 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 07:55:22 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563090922.5.0.962807326388.issue37571@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14557 pull_request: https://github.com/python/cpython/pull/14762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:55:28 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 07:55:28 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563090928.65.0.455767265889.issue37571@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14558 pull_request: https://github.com/python/cpython/pull/14763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 03:59:14 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 07:59:14 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091154.19.0.156047022206.issue37571@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +14559 pull_request: https://github.com/python/cpython/pull/14764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:05:24 2019 From: report at bugs.python.org (hai shi) Date: Sun, 14 Jul 2019 08:05:24 +0000 Subject: [docs] [issue37590] Remove redundant docs of PyEval_EvalFrameEx Message-ID: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> New submission from hai shi : PyEval_EvalFrameEx have been updated. so remove redundant info in https://github.com/python/cpython/blob/master/Python/ceval.c#L733-L738 ---------- assignee: docs at python components: Documentation messages: 347874 nosy: docs at python, shihai1991 priority: normal severity: normal status: open title: Remove redundant docs of PyEval_EvalFrameEx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:07:09 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:07:09 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091629.58.0.172972913265.issue37571@roundup.psfhosted.org> miss-islington added the comment: New changeset e7c114df38eaef0cec3457f55835a2276eccbff6 by Miss Islington (bot) in branch '3.8': bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721) https://github.com/python/cpython/commit/e7c114df38eaef0cec3457f55835a2276eccbff6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:08:51 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:08:51 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091731.65.0.417516798915.issue37571@roundup.psfhosted.org> miss-islington added the comment: New changeset d7caf75c73626d7df4c0628c63761738b7063463 by Miss Islington (bot) in branch '3.7': bpo-37571: Add 'b' to prevent the TypeError exception. (GH-14721) https://github.com/python/cpython/commit/d7caf75c73626d7df4c0628c63761738b7063463 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:09:05 2019 From: report at bugs.python.org (hai shi) Date: Sun, 14 Jul 2019 08:09:05 +0000 Subject: [docs] [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563091745.37.0.244955687442.issue37590@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14560 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:09:26 2019 From: report at bugs.python.org (hai shi) Date: Sun, 14 Jul 2019 08:09:26 +0000 Subject: [docs] [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563091766.64.0.4500275698.issue37590@roundup.psfhosted.org> hai shi added the comment: sorry, the upstair's comment is wrong PyEval_EvalFrameEx have been updated. so remove redundant info?`It is literally 2000 lines long.` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:09:48 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:09:48 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091788.0.0.198740343762.issue37571@roundup.psfhosted.org> Steve Dower added the comment: New changeset 68c74d05c1fdaf59d8711431884af975ac2ac5f8 by Steve Dower in branch 'master': bpo-37571: Remove extra space in ctypes docs (GH14764) https://github.com/python/cpython/commit/68c74d05c1fdaf59d8711431884af975ac2ac5f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:10:06 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:10:06 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091806.77.0.723853664528.issue37571@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14561 pull_request: https://github.com/python/cpython/pull/14766 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:10:13 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:10:13 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563091813.85.0.800820652253.issue37571@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14562 pull_request: https://github.com/python/cpython/pull/14767 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:14:38 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:14:38 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563092078.36.0.617003968045.issue37571@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the patch! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:20:44 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:20:44 +0000 Subject: [docs] [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563092444.77.0.106745846436.issue37590@roundup.psfhosted.org> Steve Dower added the comment: I agree. This isn't important information for the documentation anyway. ---------- nosy: +steve.dower versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:21:50 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:21:50 +0000 Subject: [docs] [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563092510.76.0.131264593162.issue37590@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14563 pull_request: https://github.com/python/cpython/pull/14768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:23:00 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:23:00 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563092580.04.0.135100558209.issue37571@roundup.psfhosted.org> miss-islington added the comment: New changeset 4f733f48b48735231b79cd0f6605d3d0a2d5b511 by Miss Islington (bot) in branch '3.8': bpo-37571: Remove extra space in ctypes docs (GH14764) https://github.com/python/cpython/commit/4f733f48b48735231b79cd0f6605d3d0a2d5b511 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:24:38 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Jul 2019 08:24:38 +0000 Subject: [docs] [issue37571] Incorrect use of c_char_p in example code In-Reply-To: <1562917249.5.0.829310494906.issue37571@roundup.psfhosted.org> Message-ID: <1563092678.45.0.43794433125.issue37571@roundup.psfhosted.org> miss-islington added the comment: New changeset 13c89f3c876363c44d35ec5f8dc374aecbca62a1 by Miss Islington (bot) in branch '3.7': bpo-37571: Remove extra space in ctypes docs (GH14764) https://github.com/python/cpython/commit/13c89f3c876363c44d35ec5f8dc374aecbca62a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:26:12 2019 From: report at bugs.python.org (hai shi) Date: Sun, 14 Jul 2019 08:26:12 +0000 Subject: [docs] [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563092772.19.0.910215947952.issue37590@roundup.psfhosted.org> hai shi added the comment: Thanks, Steve ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:53:21 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:53:21 +0000 Subject: [docs] [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563094401.66.0.997383053377.issue37590@roundup.psfhosted.org> Steve Dower added the comment: New changeset 7a430109b983806c57babf229c60d0245d0b541c by Steve Dower (Miss Islington (bot)) in branch '3.8': bpo-37590: Remove redundant docs of PyEval_EvalFrameEx (GH-14765) https://github.com/python/cpython/commit/7a430109b983806c57babf229c60d0245d0b541c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:53:42 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:53:42 +0000 Subject: [docs] [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563094422.64.0.283676418275.issue37590@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 04:54:02 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Jul 2019 08:54:02 +0000 Subject: [docs] [issue37590] Remove redundant docs of PyEval_EvalFrameEx In-Reply-To: <1563091524.9.0.285341984232.issue37590@roundup.psfhosted.org> Message-ID: <1563094442.0.0.261309534151.issue37590@roundup.psfhosted.org> Steve Dower added the comment: The commit to master succeeded, but we missed the bpo number in the message, which is why it didn't appear here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 05:49:57 2019 From: report at bugs.python.org (Ulf Rompe) Date: Sun, 14 Jul 2019 09:49:57 +0000 Subject: [docs] [issue25433] whitespace in strip()/lstrip()/rstrip() In-Reply-To: <1445170536.34.0.94220475409.issue25433@psf.upfronthosting.co.za> Message-ID: <1563097797.11.0.348068507003.issue25433@roundup.psfhosted.org> Change by Ulf Rompe : ---------- pull_requests: +14564 pull_request: https://github.com/python/cpython/pull/14771 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 06:31:59 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 14 Jul 2019 10:31:59 +0000 Subject: [docs] [issue30757] pyinstaller can be added to docs, py2exe ref can be updated In-Reply-To: <1498451168.27.0.593036349197.issue30757@psf.upfronthosting.co.za> Message-ID: <1563100319.04.0.307712554029.issue30757@roundup.psfhosted.org> Ronald Oussoren added the comment: Please also add a reference to py2app (at least of the programming FAQ as py2app is macOS-only). ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 07:58:14 2019 From: report at bugs.python.org (Ulf Rompe) Date: Sun, 14 Jul 2019 11:58:14 +0000 Subject: [docs] [issue25433] whitespace in strip()/lstrip()/rstrip() In-Reply-To: <1445170536.34.0.94220475409.issue25433@psf.upfronthosting.co.za> Message-ID: <1563105494.96.0.591311919089.issue25433@roundup.psfhosted.org> Change by Ulf Rompe : ---------- pull_requests: +14569 pull_request: https://github.com/python/cpython/pull/14775 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 09:26:18 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Jul 2019 13:26:18 +0000 Subject: [docs] [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563110778.45.0.672069800364.issue7940@roundup.psfhosted.org> Ezio Melotti added the comment: The current behavior is inconsistent because the start position accepts both positive and negative indices, whereas the end position only accepts positive indices. I think the proposal and the PR written by Anil are reasonable and should be merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:01:58 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Jul 2019 14:01:58 +0000 Subject: [docs] [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563112918.31.0.236227535878.issue7940@roundup.psfhosted.org> Ezio Melotti added the comment: Sorry, I was wrong. re.findall accepts negative indices for both start and end but they silently get converted to 0, which is arguably an unexpected behavior. This is an example of the current behavior: >>> s, e = 1, 4; re.compile('.').findall('abcde', s, e), 'abcde'[s:e] (['b', 'c', 'd'], 'bcd') >>> s, e = -4, 4; re.compile('.').findall('abcde', s, e), 'abcde'[s:e] (['a', 'b', 'c', 'd'], 'bcd') >>> s, e = 1, -1; re.compile('.').findall('abcde', s, e), 'abcde'[s:e] ([], 'bcd') >>> s, e = -4, -1; re.compile('.').findall('abcde', s, e), 'abcde'[s:e] ([], 'bcd') With the patch, all these return ['b', 'c', 'd']. This change might indeed cause issues because it's a change in behavior, but I'm also not sure there are many cases where one would want a negative index to be treated as 0. Maybe we could raise a FutureWarning in the next release and change the behavior afterwards? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:21:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2019 14:21:50 +0000 Subject: [docs] [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563114110.09.0.775963832634.issue7940@roundup.psfhosted.org> Serhiy Storchaka added the comment: Are there any real world examples which show the benefit of supporting negative indices? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:30:25 2019 From: report at bugs.python.org (Carl Bordum Hansen) Date: Sun, 14 Jul 2019 14:30:25 +0000 Subject: [docs] [issue30588] Missing documentation for codecs.escape_decode In-Reply-To: <1496847775.57.0.842403144977.issue30588@psf.upfronthosting.co.za> Message-ID: <1563114625.78.0.0980212797751.issue30588@roundup.psfhosted.org> Carl Bordum Hansen added the comment: You have a point, the function is not in codecs.__all__. Reading the stackoverflow questions, it seems like this is a function that is useful. ---------- nosy: +carlbordum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 10:55:14 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Jul 2019 14:55:14 +0000 Subject: [docs] [issue30588] Missing documentation for codecs.escape_decode In-Reply-To: <1496847775.57.0.842403144977.issue30588@psf.upfronthosting.co.za> Message-ID: <1563116114.73.0.602236337626.issue30588@roundup.psfhosted.org> Serhiy Storchaka added the comment: Reading the stackoverflow questions, I am not sure that this function would be useful for the author of the question. He just needs to remove b'\\000', this is only what we know. There are many ways to do it, and after using codecs.escape_decode() you will need to remove b'\000'. If you want to add a feature similar to the "string-escape" codec in Python 3, it is better to provide it officially as a new codec "bytes-escape" (functions like codecs.utf_16_le_decode() are internal). But we should discuss its behavior taking to account the difference between string literals in Python 2 and bytes literals in Python 3. For example how to treat non-escaped non-ascii bytes (they where acceptable in Python 2, but not in Python 3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 13:39:24 2019 From: report at bugs.python.org (M. Anil Tuncel) Date: Sun, 14 Jul 2019 17:39:24 +0000 Subject: [docs] [issue19820] docs are missing info about module attributes In-Reply-To: <1385620941.03.0.287546381963.issue19820@psf.upfronthosting.co.za> Message-ID: <1563125964.82.0.782463579164.issue19820@roundup.psfhosted.org> M. Anil Tuncel added the comment: Are they still missing? inspect.ismodule() seems to be there at least. https://docs.python.org/3/library/inspect.html ---------- nosy: +anilbey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 14 16:06:39 2019 From: report at bugs.python.org (Eric O. LEBIGOT) Date: Sun, 14 Jul 2019 20:06:39 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563134799.75.0.612287238944.issue30550@roundup.psfhosted.org> Eric O. LEBIGOT added the comment: Kyle, what you're saying is correct but is unfortunately unrelated to any of the points in the original issue. In fact, the JSON encoder does preserve whatever order the dictionary elements are in, and it would be useful to document this. Thus, if a user gives an OrderedDict (or a dict with a known order, in Python 3.7+), it is useful that he know that the order of its elements will not be changed upon transformation into JSON. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 08:09:03 2019 From: report at bugs.python.org (M. Anil Tuncel) Date: Mon, 15 Jul 2019 12:09:03 +0000 Subject: [docs] [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563192543.37.0.603691997041.issue7940@roundup.psfhosted.org> M. Anil Tuncel added the comment: I guess the use of negative indices serve the same purpose here as in lists or strings. Though as Ezio pointed out, the current behaviour is already accepting negative indices but providing inconsistent results in comparison to various other Python modules that support negative indices. In my opinion: If the negative indices are to be used here (which is what the current implementation suggests), they should behave in the same way as the rest of the Python modules. Otherwise, perhaps negative indices should not be allowed here at all. What do you think? P.S. this patch is already applied to the regex module by @mrabarnett ---------- nosy: +anilbey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:37:35 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 14:37:35 +0000 Subject: [docs] [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563201455.24.0.240898661438.issue37284@roundup.psfhosted.org> miss-islington added the comment: New changeset 52693c10e82622d883433b779a45d0bd792f17ed by Miss Islington (bot) (Giovanni Cappellotto) in branch 'master': bpo-37284: Add note to sys.implementation doc (GH-14328) https://github.com/python/cpython/commit/52693c10e82622d883433b779a45d0bd792f17ed ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:38:48 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 14:38:48 +0000 Subject: [docs] [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563201528.97.0.574006138391.issue37284@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14580 pull_request: https://github.com/python/cpython/pull/14783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:38:56 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 14:38:56 +0000 Subject: [docs] [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563201536.52.0.335200307765.issue37284@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14581 pull_request: https://github.com/python/cpython/pull/14784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:44:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 14:44:32 +0000 Subject: [docs] [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563201872.04.0.298673824638.issue37284@roundup.psfhosted.org> miss-islington added the comment: New changeset 134f79682d6729e3cf84b665d615f576075550e8 by Miss Islington (bot) in branch '3.7': bpo-37284: Add note to sys.implementation doc (GH-14328) https://github.com/python/cpython/commit/134f79682d6729e3cf84b665d615f576075550e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:45:16 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Jul 2019 14:45:16 +0000 Subject: [docs] [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563201916.5.0.981544364754.issue37284@roundup.psfhosted.org> miss-islington added the comment: New changeset 1ff4c4277421c02df5ca0894fb95de70cd9cd5f4 by Miss Islington (bot) in branch '3.8': bpo-37284: Add note to sys.implementation doc (GH-14328) https://github.com/python/cpython/commit/1ff4c4277421c02df5ca0894fb95de70cd9cd5f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:47:22 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 15 Jul 2019 14:47:22 +0000 Subject: [docs] [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563202042.8.0.956270029188.issue37284@roundup.psfhosted.org> Change by Eric Snow : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 10:47:52 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 15 Jul 2019 14:47:52 +0000 Subject: [docs] [issue37284] Not obvious that new required attrs of sys.implementation must have a PEP. In-Reply-To: <1560535361.35.0.573554677552.issue37284@roundup.psfhosted.org> Message-ID: <1563202072.72.0.554607337051.issue37284@roundup.psfhosted.org> Eric Snow added the comment: @potomak, thanks for doing this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 13:11:21 2019 From: report at bugs.python.org (Andrew Carter) Date: Mon, 15 Jul 2019 17:11:21 +0000 Subject: [docs] [issue37598] Don't use _ as a function name in logging documentation cookbook Message-ID: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> New submission from Andrew Carter : Current docs link: https://docs.python.org/3/howto/logging-cookbook.html#implementing-structured-logging GitHub commit link: https://github.com/python/cpython/commit/4b88d6c6642450240a9dc22e6efbdc69baf890dd The suggestion is that for structured logging, a StructuredMessage class should be created with a __str__ method defined and then assigned to an _ variable and used as a logging formatter. As the _ variable is commonly used as a "skip variable" and it has other meanings inside the Python interactive shell - I recommend that this example is changed to one that maybe just defines a simple wrapper function. I'm happy to create a PR for this - but only if there's agreement that it's worthwhile and will get merged if suitable. Thanks, Andrew ---------- assignee: docs at python components: Documentation messages: 347984 nosy: AndrewCarterUK, docs at python priority: normal severity: normal status: open title: Don't use _ as a function name in logging documentation cookbook versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 15:22:50 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 15 Jul 2019 19:22:50 +0000 Subject: [docs] [issue37598] Don't use _ as a function name in logging documentation cookbook In-Reply-To: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> Message-ID: <1563218570.17.0.320741652184.issue37598@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:39:43 2019 From: report at bugs.python.org (sgal) Date: Mon, 15 Jul 2019 20:39:43 +0000 Subject: [docs] [issue37599] Remove a vague statement in documentation of Integer Objects Message-ID: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> New submission from sgal : In current Python document (3.7 - 3.9) there is such statement in documentation of Integer Objects: The current implementation keeps an array of integer objects for all integers between ``-5`` and ``256``, when you create an int in that range you actually just get back a reference to the existing object. So it should be possible to change the value of ``1``. I suspect the behaviour of Python in this case is undefined. :-) The last sentence is vague. It is irresponsible to write "I suspect" in documentation. And as the statements ahead has already clarified the sense that this is "a current implementation", the last sentence should be removed. ---------- assignee: docs at python components: Documentation messages: 347990 nosy: docs at python, sgal priority: normal severity: normal status: open title: Remove a vague statement in documentation of Integer Objects type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:41:14 2019 From: report at bugs.python.org (Eric N. Vander Weele) Date: Mon, 15 Jul 2019 20:41:14 +0000 Subject: [docs] [issue37599] Remove a vague statement in documentation of Integer Objects In-Reply-To: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> Message-ID: <1563223274.19.0.804540181889.issue37599@roundup.psfhosted.org> Change by Eric N. Vander Weele : ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 16:46:29 2019 From: report at bugs.python.org (sgal) Date: Mon, 15 Jul 2019 20:46:29 +0000 Subject: [docs] [issue37599] Remove a vague statement in documentation of Integer Objects In-Reply-To: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> Message-ID: <1563223589.9.0.12533099374.issue37599@roundup.psfhosted.org> Change by sgal : ---------- keywords: +patch pull_requests: +14583 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14786 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 17:09:59 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 15 Jul 2019 21:09:59 +0000 Subject: [docs] [issue37598] Don't use _ as a function name in logging documentation cookbook In-Reply-To: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> Message-ID: <1563224999.47.0.685152316291.issue37598@roundup.psfhosted.org> Vinay Sajip added the comment: The comment at the end of the "_ = ..." line indicates clearly that it's optional to do that, and I assume that any reader will realise that they can use any suitable variable name rather than "_". There's no particular "recommendation" to use "_" and cookbook recipes are generally regarded as starting points for one's own code, rather than being copied verbatim into production scenarios. I specifically picked "_", despite knowing its other uses, because: * One use of "_" is as a function that does some form of translation on a passed string argument - language translation being the most common example - and this recipe is a very loose analogue of that type of usage * A very brief notation assists readability because once you've looked at the "_" definition, you can use constructions like the one further down in the recipe. Since "_" wasn't picked at random, I'd rather not change it - if people decide to use this recipe, it would be better for brevity and standardisation if "_" were to be used, IMO. I don't believe the usage of "_" in interactive interpreter sessions is relevant to this cookbook recipe and shouldn't, in my opinion, cause confusion, any more than where the use of "_" for language translations is being explored in an interactive session. In summary - please don't waste your time on this, though I appreciate the intent behind your suggestion - thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 15 20:36:45 2019 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Jul 2019 00:36:45 +0000 Subject: [docs] [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1563237405.05.0.879538158389.issue7940@roundup.psfhosted.org> Ezio Melotti added the comment: > Are there any real world examples which show the benefit of supporting > negative indices? A common case is ignoring parentheses at the beginning/end, e.g. >>> re.compile('[^,]+').findall('(foo,123,(),bar)') ['(foo', '123', '()', 'bar)'] >>> # ignore the surrounding () >>> re.compile('[^,]+').findall('(foo,123,(),bar)', 1, 15) ['foo', '123', '()', 'bar'] >>> >>> # extract attributes from a tag (poc, doesn't handle all cases) >>> re.compile('[^ ]+').findall('', 7, 39) ['type="checkbox"', 'id="foo"', 'checked'] In both cases using -1 as endpos is simpler. ---------- versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 03:51:35 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Jul 2019 07:51:35 +0000 Subject: [docs] [issue37598] Don't use _ as a function name in logging documentation cookbook In-Reply-To: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> Message-ID: <1563263495.94.0.825534165769.issue37598@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Slightly unrelated to the issue but I noticed the below statement in the docs page couple of times. I think it's related to the order of kwargs when the statement was added in 3d9e972270270e1498712065a17ec3a589ae8986. Since order of kwargs is guaranteed from Python 3.6 can this be removed? > Note that the order of items might be different according to the version of Python used. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 05:53:44 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 16 Jul 2019 09:53:44 +0000 Subject: [docs] [issue37598] Don't use _ as a function name in logging documentation cookbook In-Reply-To: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> Message-ID: <1563270824.54.0.0298811823105.issue37598@roundup.psfhosted.org> Vinay Sajip added the comment: > Since order of kwargs is guaranteed from Python 3.6 can this be removed? Well, the statement about order isn't inaccurate when talking about Python in general and the cookbook is a resource meant to be useful across multiple Python implementations and versions, so I'd be inclined to leave it as is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 05:54:22 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 16 Jul 2019 09:54:22 +0000 Subject: [docs] [issue37598] Don't use _ as a function name in logging documentation cookbook In-Reply-To: <1563210681.88.0.786597036054.issue37598@roundup.psfhosted.org> Message-ID: <1563270862.99.0.218906678265.issue37598@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 10:46:07 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Tue, 16 Jul 2019 14:46:07 +0000 Subject: [docs] [issue37256] urllib.request.Request documentation erroneously refers to the "final two" In-Reply-To: <1560366755.97.0.221740241329.issue37256@roundup.psfhosted.org> Message-ID: <1563288367.2.0.922171168299.issue37256@roundup.psfhosted.org> Change by Ngalim Siregar : ---------- keywords: +patch pull_requests: +14587 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14792 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 10:57:06 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2019 14:57:06 +0000 Subject: [docs] [issue37599] Remove a vague statement in documentation of Integer Objects In-Reply-To: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> Message-ID: <1563289026.22.0.854561046197.issue37599@roundup.psfhosted.org> Raymond Hettinger added the comment: There's nothing wrong with a little wry humor in the docs, especially when the provide a little insight into the implementation. It isn't irresponsible at all -- please avoid those pejoratives. That said, I'll accept the patch because the sentence isn't necessary and has other issues (the statement makes more sense in the ctypes module where such changes are possible and it applies broadly to all immutable objects, not just pre-computed singleton integers). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:13:43 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2019 15:13:43 +0000 Subject: [docs] [issue37352] Typo in documentation: "to making it easy" In-Reply-To: <1561051076.38.0.680855087082.issue37352@roundup.psfhosted.org> Message-ID: <1563290023.58.0.32554808004.issue37352@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset a0f7119f1584db5b32deffb60a68d830673ebbdf by Raymond Hettinger (Ilya Kamenshchikov) in branch 'master': bpo-37352: Minor word-smithing for design.rst (GH #14730) https://github.com/python/cpython/commit/a0f7119f1584db5b32deffb60a68d830673ebbdf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:14:36 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2019 15:14:36 +0000 Subject: [docs] [issue37352] Typo in documentation: "to making it easy" In-Reply-To: <1561051076.38.0.680855087082.issue37352@roundup.psfhosted.org> Message-ID: <1563290076.1.0.808629483986.issue37352@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:15:23 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2019 15:15:23 +0000 Subject: [docs] [issue37599] Remove a vague statement in documentation of Integer Objects In-Reply-To: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> Message-ID: <1563290123.19.0.134783425275.issue37599@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 1d8b04edfdc3030e645730492bfcc27b75718b96 by Raymond Hettinger (sgal) in branch 'master': bpo-37599: Remove a vague statement in documentation of Integer Objects (#14786) https://github.com/python/cpython/commit/1d8b04edfdc3030e645730492bfcc27b75718b96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:16:14 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Jul 2019 15:16:14 +0000 Subject: [docs] [issue37599] Remove a vague statement in documentation of Integer Objects In-Reply-To: <1563223183.58.0.391676175993.issue37599@roundup.psfhosted.org> Message-ID: <1563290174.13.0.995255170246.issue37599@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 16 11:57:51 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Jul 2019 15:57:51 +0000 Subject: [docs] [issue37605] CI should not depend on gmane response In-Reply-To: <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org> Message-ID: <1563292671.18.0.768485376268.issue37605@roundup.psfhosted.org> Zachary Ware added the comment: Victor, note that this issue is about the nntplib doctests in Doc/library/nntplib.rst. I agree that any examples in that file that actually hit an external server should be marked as not doctests. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, zach.ware versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 06:23:49 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Wed, 17 Jul 2019 10:23:49 +0000 Subject: [docs] [issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation Message-ID: <1563359029.55.0.364710956162.issue37608@roundup.psfhosted.org> New submission from ?? : In https://docs.python.org/3/whatsnew/3.0.html#library-changes Documentation, it said "Cleanup of the thread module: acquire_lock() and release_lock() are gone; use acquire() and release() instead." But in 3.7, I can still find {"acquire_lock", (PyCFunction)(void(*)(void))lock_PyThread_acquire_lock, METH_VARARGS | METH_KEYWORDS, acquire_doc}, in _threadmodule.c line 217, which defined this function. And in my code ,these functions work, without any warning or error. So maybe the Documentation should be changed, or the support of these functions should be removed, or at least add a warning. It has no effect on code, but truly confusing and waste me an hour to search for why. ---------- assignee: docs at python components: Documentation messages: 348053 nosy: docs at python, shiyuchong priority: normal severity: normal status: open title: _thread: acquire_lock,release_lock still in use while declared to be "gone" in Documentation versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From shoaib_mi at yahoo.com Wed Jul 17 11:07:17 2019 From: shoaib_mi at yahoo.com (shoaib Mirzaey) Date: Wed, 17 Jul 2019 15:07:17 +0000 (UTC) Subject: [docs] bugs and suggestion References: <807218495.2639727.1563376037215.ref@mail.yahoo.com> Message-ID: <807218495.2639727.1563376037215@mail.yahoo.com> Hello As someone who spent almost two year creating application(GUI) in python I found plenty of issues which killing passion for doing morecoding in python. Fortunately lots of them are libraries issues and has nothingto do with python itself. But it has effect on decision of people to use pythonmore. I can code in C, C++, Pascal, PHP, HTML, Python, and thereis no need to say that python is the best and most comfortable one. At first I was using python 2.7 and it was very good, untilI started to use utf-8 encoding text in code Then after a year struggling and overcoming Unicode issues,I got tired and decided to change the version of python to 3.6 to see how ittreats Unicode, and it was perfect. I wondered why you keep supporting python2.7 anymore when almost everything is the same in python 3.6. Then I started to develop GUIs in python 3.6, and everythingwas great until I decided to compile it for windows users; running same code inwindows 7 64bit was really tricky. Here I enlist some tricks or bugs that camein my way, plus some suggestion: 1.??????Version-dependency: With Windows 7 64bit, Python: v3.6 wesimply cannot install library pygobject through pip (or any other methods), itstuck in installing another dependency named pycairo, and even if we manuallyinstall it, and then install pygobject it will not find it, and tries toinstall it again; or maybe it?s because of version mismatch. I know that it?slibraries developer?s problem, but inside this problem lies a great pythonproblem, which is version dependent libraries. Of course it?s not only relatedto python. Even Linux OS has the same problem. Look at windows OS. If in year2000 someone has created an app working in windows 98, it still can beinstalled in windows 10. Why Linux or library developers do not care about thisproblem? I know that being update is so important and make distribution oflanguage and libraries smaller and easier. But there must be a way to force developersto remove previously written libs and change it to new one. For example, wecould define functions in python 2.7 in this way def some_function(a, b, (c, d)) but it?s not possible in python 3.x, whichI think it is better not to do that, but some developers didn?t develop theirlibs in python 3.x, just stop supporting python 2.7 and they will be forced tochange the code to compatible with python 3.x. all I wanted to say is why the libs areversion-dependent? It?s really painful. 2.??????Third party apps: One more thing about above is that forrunning pygobject with python 3.x in windows we have to install msys2 ormingw64 and install all libraries we want inside mingw64, using pip in parallelwith pacman will cause conflicts. The thing is why we should install thirdparty software to run python libraries inside windows when we can simplyinstall it without them. So there must be a problem I don?t know maybe in dllfiles needed for python or libraries to work perfect; because pygobject isworking just fine with python 3.x in Linux platform. 3.??????Right to Leftlanguage support: There are some libraries to change thesituation in a way that developers could use RTL developing in their apps, butcomparing to visual studio we see that the language itself take care of that,and it automatically select right glyph (or character code) based on positionof character inside word, and writes the word perfectly, but in python (anyversion) it writes characters (with unappropriated glyph) from left to right(which must be reversed). If you could take care of that in the core of python,everyone in the world would appreciate it including me. 4.??????exec and execfile: in python 2.7 there was a built-in functionexecfile which has very simple syntax and easy to use and understandable, andsuddenly you have removed it and forced everyone to use a little bit complexmethod exec(open(?filename.py?).read()).I am saying that it wasn?t a good toremove it, because finally the languages must be much more user friendly andeasy to learn. There is one more problem with exec() andI?ll show it through images (I didn?t examin execfile in py2.7 for thissituation). it?s not libraries bugs, it?s python?s bug. It doesn?t matter we use kivy or PyQt5 orGtk as our graphical user interface the result is the same. When developing big apps, we need toseparate code in (.py) files and call them in main code to run. There areseveral methods for do so. Let?s first use exec(): main.py content: ? ??exec(open(?page2.py?).read()) page2.py content ????from PyQt5.QtWidgets import *????class HelloWindow(QWidget): def __init__(self): QWidget.__init__(self) self.setWindowTitle("?? ?? ?? ????") gridLayout = QGridLayout(self)? ? ? self.title = QLabel("??????? ?")? gridLayout.addWidget(self.title, 0, 0) self.setLayout(gridLayout)????app = QApplication([])????mainWin = HelloWindow()????mainWin.resize(400,200)????mainWin.show()????app.exec_() If we run page2.py the result is perfect. but if we run main.py the GUI can not handle unicode text inside widgets. At first I thought it?s libraries problem, then I tested the sameprocedure with kivy GUI, and result was the same.But there is something else, if we changemain.py as:? ? import page2 everything is perfect again. That?s why Igot convinced it was a bug in python itself. The real reason why I prefer use of over is that exec() uses everything that isimported before, but forces me to reimport every libraries Ihave imported before in every scripts I have, and that?s double working, and Idon?t know if it consume more RAM or not; it?s not preferable. And something else, can you please makechanges to method so it can run without reimporting other previouslyimported modulus. I am aware that you did that to modulus to be independent. 5.??????Static Arrays: Python is very good in dealing with arrays,actually it?s perfect. It can save several types of data inside one array, andeach time we can change value and type of array?s elements, and it?sincredible. But there are some times that having dynamic arrays is prolongingduration of running code; for example, if we are going to do mathematicalcalculation and we know that every element of the array is a float number andit occupies fixed size inside RAM, so there is no need to recomputing the newsize in each change of array?s elements. If you could define new method fordealing with this situation, that makes it much efficient in math jobs. I am not aware if numpy or other librariescould do this, but if it?s inside the python, it would be much better. Lately I changed a code written in Pascalinto python. It was computing second order differential equation numerically.Run time of Pascal code was almost 9 seconds while the python code inside Linux,took 100 seconds and inside windows 190 seconds. I don?t know how arrays aredealt with in python, but I thought maybe it?s because the arrays are dynamicin python and if we have had static arrays, duration must be almost the sameorder. 6.??????Code Editor: Writing code inside a lovely editor withcolor code and suggesting codes is always preferable, if it?s possible add agood editor with mentioned ability and stylable to python 7.??????Hiding code oncompile: When we are using pyinstaller compiling thecode, it makes it independent of OS to run, and it?s a good thing, but I?veread in web that the code can be decompiled from packaged app. If you couldmake the compiler to hide or encrypt code automatically, then we were almostsure that our code cannot be reused without permission. I know that cython cando this but it?s better if it was default python behavior. Thank you for creating such a great programing language. Sincerely yours Shoaib Mirzaei -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Jul 17 13:26:10 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 17 Jul 2019 17:26:10 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE Message-ID: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> New submission from Mariatta : The Python Usage and Setup documentation lists how to use Python in different environments: 1. command line 2. Unix 3. Windows 4. MacOS Under "Unix" environment there is a section for Editors and IDE, which actually links to external links like https://wiki.python.org/moin/PythonEditors that has more comprehensive list of editors across various platforms. It would be great if the Editors & IDE section is not tied to the "Unix environment" section, which might got skipped if the reader is a Windows or Mac user. There are IDEs and Editors for those platforms too! ---------- assignee: docs at python components: Documentation messages: 348074 nosy: Mariatta, docs at python priority: normal severity: normal stage: needs patch status: open title: Improve "Python Usage and Setup" documentation re: Editors & IDE type: enhancement versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:27:49 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 17 Jul 2019 17:27:49 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563384469.62.0.735408636718.issue37610@roundup.psfhosted.org> Mariatta added the comment: Should have included the link, but I can't edit issue. Here's the page which I think could be improved. https://docs.python.org/3/using/index.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 13:42:36 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 17 Jul 2019 17:42:36 +0000 Subject: [docs] [issue37611] Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs Message-ID: <1563385356.62.0.425073313065.issue37611@roundup.psfhosted.org> New submission from Mariatta : On the left of docs.python.org, is a link to "Report a Bug", which takes you to "Dealing with Bugs" section (https://docs.python.org/3/bugs.html) One of the first few paragraphs of the page is telling people that documentation bugs can be reported at the bug tracker, or if they're short on time, it can be emailed to docs at python.org. The next section is talking about "using issue tracker", and at the very bottom are two links to external resources about how to report bugs effectively and bug reporting guidelines. 1. It would be great if the guidelines are at the top, instead of the bottom. 2. It would be great if we provide our own set of guidelines, instead of linking to external resources. I think the guidelines are especially important for people who opted to write an email instead of creating an issue in bpo. In bpo, user is kinda restricted/reminded to select a specific type/component, but writing email can be more freeform. The better email they write, the easier it is for us to respond to them. ---------- assignee: docs at python components: Documentation messages: 348077 nosy: Mariatta, docs at python priority: normal severity: normal stage: needs patch status: open title: Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs type: enhancement _______________________________________ Python tracker _______________________________________ From mariatta at python.org Wed Jul 17 18:06:32 2019 From: mariatta at python.org (Mariatta) Date: Wed, 17 Jul 2019 16:06:32 -0600 Subject: [docs] bugs and suggestion In-Reply-To: <807218495.2639727.1563376037215@mail.yahoo.com> References: <807218495.2639727.1563376037215.ref@mail.yahoo.com> <807218495.2639727.1563376037215@mail.yahoo.com> Message-ID: This mailing list is for bugs related to Python documentation only. Most of your comments aren't applicable to documentation, so I won't address them here. > I wondered why you keep supporting python 2.7 Only until January 1, 2020. This is documented in PEP 373 https://www.python.org/dev/peps/pep-0373/#maintenance-releases *6. * > *Code Editor:*Writing code inside a lovely editor with color code and > suggesting codes is always preferable, if it?s possible add a good editor > with mentioned ability and stylable to python There are various Python IDE and editors, and it is a personal choice which one you want to choose. We don't maintain the list of IDEs as part of our documentation, but in this page, the resources are linked here https://docs.python.org/3/using/unix.html#editors-and-ides ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Jul 17 18:14:01 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Jul 2019 22:14:01 +0000 Subject: [docs] [issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation In-Reply-To: <1563359029.55.0.364710956162.issue37608@roundup.psfhosted.org> Message-ID: <1563401641.44.0.986536152404.issue37608@roundup.psfhosted.org> Brett Cannon added the comment: The documentation is correct by not documenting the methods as they are not meant to be used. A warning could be added, but it requires new code to wrap the C function with a DeprecationWarning since that code is currently shared between thread.LockType.acquire() and acquire_lock(). ---------- components: +Library (Lib) -Documentation nosy: +brett.cannon type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 19:38:54 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Wed, 17 Jul 2019 23:38:54 +0000 Subject: [docs] [issue37613] Fix broken "Back to top" link in www.python.org (mobile) Message-ID: <1563406734.28.0.0957616376882.issue37613@roundup.psfhosted.org> New submission from Giovanni Cappellotto : The mobile version of https://www.python.org/ has a "Back to top" link at the bottom of every page that should scroll the page back to the top, but it doesn't work in Chrome for Android. Note: it works with Safari on iOS. ---------- assignee: docs at python components: Documentation messages: 348087 nosy: docs at python, potomak priority: normal severity: normal status: open title: Fix broken "Back to top" link in www.python.org (mobile) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 19:39:12 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Wed, 17 Jul 2019 23:39:12 +0000 Subject: [docs] [issue37613] Broken "Back to top" link in www.python.org (mobile) In-Reply-To: <1563406734.28.0.0957616376882.issue37613@roundup.psfhosted.org> Message-ID: <1563406752.38.0.607082842629.issue37613@roundup.psfhosted.org> Change by Giovanni Cappellotto : ---------- title: Fix broken "Back to top" link in www.python.org (mobile) -> Broken "Back to top" link in www.python.org (mobile) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 19:41:10 2019 From: report at bugs.python.org (Giovanni Cappellotto) Date: Wed, 17 Jul 2019 23:41:10 +0000 Subject: [docs] [issue37613] Broken "Back to top" link in www.python.org (mobile) In-Reply-To: <1563406734.28.0.0957616376882.issue37613@roundup.psfhosted.org> Message-ID: <1563406870.42.0.350639219932.issue37613@roundup.psfhosted.org> Giovanni Cappellotto added the comment: I can reproduce the error in Chrome for MacOS when I emulate the resolution of a generic mobile device. I think I have a quick fix for the issue, I will publish a PR soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 19:44:30 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 17 Jul 2019 23:44:30 +0000 Subject: [docs] [issue37613] Broken "Back to top" link in www.python.org (mobile) In-Reply-To: <1563406734.28.0.0957616376882.issue37613@roundup.psfhosted.org> Message-ID: <1563407070.25.0.402478450963.issue37613@roundup.psfhosted.org> Mariatta added the comment: Thanks for the report. The issue tracker for python.org website is at https://github.com/python/pythondotorg/issues PR should be proposed there instead of python/cpython. ---------- assignee: docs at python -> nosy: +Mariatta resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:13:12 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Thu, 18 Jul 2019 02:13:12 +0000 Subject: [docs] [issue37602] nonzero fixer problem In-Reply-To: <1563255027.06.0.811777029402.issue37602@roundup.psfhosted.org> Message-ID: <1563415992.61.0.699025803286.issue37602@roundup.psfhosted.org> ?? added the comment: Got it. I am just testing all changes in Python 3.X (in preparation for a project porting to 3.7 before I have permission to view the source code), and call __nonzero__() directly for testing. So maybe I cannot provide an example. I did not realize that it should not be called directly. Still, I recommend a documentation change to explain this fact, telling readers the fixer will not change the usage of __nonzero__(). Thanks for your reply. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 17 22:18:54 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Thu, 18 Jul 2019 02:18:54 +0000 Subject: [docs] [issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation In-Reply-To: <1563359029.55.0.364710956162.issue37608@roundup.psfhosted.org> Message-ID: <1563416334.16.0.23810705734.issue37608@roundup.psfhosted.org> ?? added the comment: I got it that it is just my misunderstanding. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 03:42:29 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 18 Jul 2019 07:42:29 +0000 Subject: [docs] [issue37618] Docs: Code example locations in stdtypes Message-ID: <1563435749.25.0.657684993159.issue37618@roundup.psfhosted.org> New submission from Kyle Stanley : In the docs for the module stdtypes, the code example for several commonly used functions are in the bytearray section instead of the str section, where new users are far more likely to look. The new users are much more likely to benefit from seeing examples of these functions. A few examples of this include: islower(), isupper(), and istitle(). Since the functionality is very similar for functions such as str.islower() and bytearray.islower(), it doesn't seem necessary to include separate examples for each. With that in mind, here's a couple of potential solutions: 1) Move the location of the code examples to the str equivalent. This would require only removing the 'b' notation proceeding the strings. A link to the str equivalent could be potentially provided. 2) Provide a reference link to equivalent bytearray function in the str function's summary. This would be a bit easier since the code examples would not have to me modified or moved. However, for reasons stated above, it seems to make a bit more sense to have the examples be in the str functions rather than in the bytearray functions. I can start working on a PR to address this, but I'll wait on some feedback first. ---------- assignee: docs at python components: Documentation messages: 348104 nosy: aeros167, docs at python priority: normal severity: normal status: open title: Docs: Code example locations in stdtypes versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 03:44:40 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 18 Jul 2019 07:44:40 +0000 Subject: [docs] [issue37618] Docs: Code example locations in stdtypes In-Reply-To: <1563435749.25.0.657684993159.issue37618@roundup.psfhosted.org> Message-ID: <1563435880.64.0.576117434825.issue37618@roundup.psfhosted.org> Kyle Stanley added the comment: Clarification on option 1: The last sentence should be "A link to the bytearray equivalent..." Clarification on option 2: As a part of this option, a link to the str equivalent could optionally be provided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:04:45 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 01:04:45 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563498285.52.0.265096587325.issue37610@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- keywords: +patch pull_requests: +14640 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14849 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:12:26 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 01:12:26 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563498746.63.0.297765267777.issue37610@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- pull_requests: +14641 pull_request: https://github.com/python/cpython/pull/14850 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:13:00 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 01:13:00 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563498780.8.0.146739912742.issue37610@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:23:23 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 01:23:23 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499403.42.0.659557381706.issue37610@roundup.psfhosted.org> miss-islington added the comment: New changeset 8f040b7a9f442e7c2605ef1cad9c6b5eb7dd7af7 by Miss Islington (bot) (aldwinaldwin) in branch 'master': bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850) https://github.com/python/cpython/commit/8f040b7a9f442e7c2605ef1cad9c6b5eb7dd7af7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:23:34 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 01:23:34 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499414.21.0.938097102354.issue37610@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14642 pull_request: https://github.com/python/cpython/pull/14851 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:25:06 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 01:25:06 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499506.5.0.721584985333.issue37610@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14643 pull_request: https://github.com/python/cpython/pull/14852 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:27:03 2019 From: report at bugs.python.org (Mariatta) Date: Fri, 19 Jul 2019 01:27:03 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499623.49.0.700583169853.issue37610@roundup.psfhosted.org> Mariatta added the comment: Thanks for the PR! There's conflict to the 2.7 branch, but I'm not motivated enough to fix it there. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:28:52 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 01:28:52 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499732.72.0.838468946845.issue37610@roundup.psfhosted.org> miss-islington added the comment: New changeset 87b6078fb90f11dc67ad8f31e98cbc40f74fcb81 by Miss Islington (bot) in branch '3.7': bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850) https://github.com/python/cpython/commit/87b6078fb90f11dc67ad8f31e98cbc40f74fcb81 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:31:44 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 01:31:44 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563499904.34.0.645114250079.issue37610@roundup.psfhosted.org> miss-islington added the comment: New changeset 840352455dfbb6acb3b69ea88a19c01b7358e801 by Miss Islington (bot) in branch '3.8': bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850) https://github.com/python/cpython/commit/840352455dfbb6acb3b69ea88a19c01b7358e801 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 21:47:14 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 19 Jul 2019 01:47:14 +0000 Subject: [docs] [issue37610] Improve "Python Usage and Setup" documentation re: Editors & IDE In-Reply-To: <1563384370.32.0.18026893098.issue37610@roundup.psfhosted.org> Message-ID: <1563500834.66.0.900716737417.issue37610@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: just guessing ... in 2.7 unix.rst has '\ No newline at end of file' it's your enhancement/call, but indeed no need to put energy in 2.7 doc anymore. case closed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:39:04 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Fri, 19 Jul 2019 03:39:04 +0000 Subject: [docs] =?utf-8?q?=5Bissue37626=5D_Documentation=EF=BC=9Aconflict?= =?utf-8?q?_between_docs?= Message-ID: <1563507544.8.0.798543653919.issue37626@roundup.psfhosted.org> Change by ?? : ---------- assignee: docs at python components: Documentation nosy: docs at python, shiyuchong priority: normal severity: normal status: open title: Documentation?conflict between docs versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 18 23:43:42 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Fri, 19 Jul 2019 03:43:42 +0000 Subject: [docs] =?utf-8?q?=5Bissue37626=5D_Documentation=EF=BC=9Aconflict?= =?utf-8?q?_between_docs?= Message-ID: <1563507822.25.0.227141722177.issue37626@roundup.psfhosted.org> New submission from ?? : In https://docs.python.org/3/whatsnew/3.4.html#api-and-feature-removals,It is said "inspect.Signature: positional-only parameters are now required to have a valid name." But in https://docs.python.org/3/library/inspect.html?highlight=3.4#inspect.Signature, the actual change happened in inspect.Parameter, " Changed in version 3.4: In Python 3.3 Parameter objects were allowed to have name set to None if their kind was set to POSITIONAL_ONLY. This is no longer permitted." So I wonder is it a mistake? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:46:53 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 19 Jul 2019 05:46:53 +0000 Subject: [docs] =?utf-8?q?=5Bissue37626=5D_Documentation=EF=BC=9Aconflict?= =?utf-8?q?_between_docs?= In-Reply-To: <1563507822.25.0.227141722177.issue37626@roundup.psfhosted.org> Message-ID: <1563515213.72.0.777435113387.issue37626@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 01:59:47 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 19 Jul 2019 05:59:47 +0000 Subject: [docs] =?utf-8?q?=5Bissue37626=5D_Documentation=EF=BC=9Aconflict?= =?utf-8?q?_between_docs?= In-Reply-To: <1563507822.25.0.227141722177.issue37626@roundup.psfhosted.org> Message-ID: <1563515987.45.0.797358317197.issue37626@roundup.psfhosted.org> Inada Naoki added the comment: https://docs.python.org/3/library/inspect.html#inspect.Parameter.replace """ Changed in version 3.4: In Python 3.3 Parameter objects were allowed to have name set to None if their kind was set to POSITIONAL_ONLY. This is no longer permitted. """ ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 02:51:49 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 06:51:49 +0000 Subject: [docs] [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563519109.05.0.598764855663.issue37624@roundup.psfhosted.org> Raymond Hettinger added the comment: We can add a note the the docs that weights are assumed to be non-negative, but I don't want to add an extra O(n) step to check for unusual inputs with undefined meaning -- that would just impair the normal use cases for near zero benefit. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:18:58 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 07:18:58 +0000 Subject: [docs] [issue37620] str.split(sep=None, maxsplit=-1,any=False) In-Reply-To: <1563458340.3.0.354346385459.issue37620@roundup.psfhosted.org> Message-ID: <1563520738.15.0.916009121509.issue37620@roundup.psfhosted.org> Raymond Hettinger added the comment: This API is already overloaded with two distinct algorithms -- see https://stackoverflow.com/questions/16645083 . If new functionality is truly needed, it should be in a separate method rather than feature creeping in additional variants. Also, the OP's post seems to be grounded in an initial misreading of the docs rather than in compelling use cases for a new option. So, there may be room for improving the documentation, especially the examples. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, rhettinger versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 03:47:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 07:47:33 +0000 Subject: [docs] [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563522453.27.0.603936398248.issue37624@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +14645 pull_request: https://github.com/python/cpython/pull/14855 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 04:56:56 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 08:56:56 +0000 Subject: [docs] [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563526616.92.0.165498070448.issue37624@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 8dbe563aa6bd18b8c581951537dfb406d36e8063 by Raymond Hettinger in branch 'master': bpo-37624: Document weight assumptions for random.choices() (GH-14855) https://github.com/python/cpython/commit/8dbe563aa6bd18b8c581951537dfb406d36e8063 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 04:57:01 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Jul 2019 08:57:01 +0000 Subject: [docs] [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563526621.2.0.742454872733.issue37624@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14648 pull_request: https://github.com/python/cpython/pull/14858 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 05:17:39 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 09:17:39 +0000 Subject: [docs] [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563527859.0.0.403397075635.issue37624@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset a50a6225a06e5a83ce2a880a7eb4496043fdbb55 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37624: Document weight assumptions for random.choices() (GH-14855) (GH-14858) https://github.com/python/cpython/commit/a50a6225a06e5a83ce2a880a7eb4496043fdbb55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 05:27:50 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 09:27:50 +0000 Subject: [docs] [issue37624] random.choices has unexpected behavior with negative weights In-Reply-To: <1563483087.67.0.502160957711.issue37624@roundup.psfhosted.org> Message-ID: <1563528470.16.0.554070001393.issue37624@roundup.psfhosted.org> Raymond Hettinger added the comment: Misc side notes: * There is no expected behavior for negative a negative weight. Arguably, the only reasonable interpretation is what it already does (reduce the cumulative total). * Running simulations is a primary use case for choices(). Generally, running time there is important. * During the design phase, none of the other implementations studied had incorporated a scan of the inputs for negative weights. * bisect() does not check to make sure its inputs are sorted. The results for unsorted data are undefined. It is a documented precondition. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 06:56:03 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 19 Jul 2019 10:56:03 +0000 Subject: [docs] [issue36182] Path.write_text() docs do not include the case that a file exists In-Reply-To: <1551703881.69.0.0731434428442.issue36182@roundup.psfhosted.org> Message-ID: <1563533763.0.0.0130433214259.issue36182@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Pinging for review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 09:31:25 2019 From: report at bugs.python.org (Krishna Oza) Date: Fri, 19 Jul 2019 13:31:25 +0000 Subject: [docs] [issue37618] Docs: Code example locations in stdtypes In-Reply-To: <1563435749.25.0.657684993159.issue37618@roundup.psfhosted.org> Message-ID: <1563543084.85.0.00339561195905.issue37618@roundup.psfhosted.org> Krishna Oza added the comment: Kyle In my opinion the current documentation is correctly formed since the bytearray and str are two different classes in Python they could have different set of functions supported and hence the grouping of functions like islower() to be kept separated for different object types. ---------- nosy: +Krishna Oza, Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 09:48:50 2019 From: report at bugs.python.org (Krishna Oza) Date: Fri, 19 Jul 2019 13:48:50 +0000 Subject: [docs] [issue37611] Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs In-Reply-To: <1563385356.62.0.425073313065.issue37611@roundup.psfhosted.org> Message-ID: <1563544130.89.0.790594652033.issue37611@roundup.psfhosted.org> Krishna Oza added the comment: Mariatta, Would it be okay for now just to move the existing bug filing guidelines to be moved up. ---------- nosy: +Krishna Oza _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 11:25:23 2019 From: report at bugs.python.org (Mariatta) Date: Fri, 19 Jul 2019 15:25:23 +0000 Subject: [docs] [issue37611] Improve the "Dealing with Bugs" documentation, include guidelines on how to report bugs In-Reply-To: <1563385356.62.0.425073313065.issue37611@roundup.psfhosted.org> Message-ID: <1563549923.7.0.364461622597.issue37611@roundup.psfhosted.org> Mariatta added the comment: Sure, moving it up is a good start. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 14:34:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jul 2019 18:34:56 +0000 Subject: [docs] [issue37620] str.split(sep=None, maxsplit=-1,any=False) In-Reply-To: <1563458340.3.0.354346385459.issue37620@roundup.psfhosted.org> Message-ID: <1563561296.43.0.155310350105.issue37620@roundup.psfhosted.org> Serhiy Storchaka added the comment: An alternative is to use regular expressions. >>> re.split('[\t ]+', 'ab\t cd ef') ['ab', 'cd', 'ef'] . ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 14:39:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jul 2019 18:39:56 +0000 Subject: [docs] [issue26951] Unintuitive error when using generator expression in class property In-Reply-To: <1462372473.02.0.946073615941.issue26951@psf.upfronthosting.co.za> Message-ID: <1563561596.37.0.275193315391.issue26951@roundup.psfhosted.org> Serhiy Storchaka added the comment: See also issue3692. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 14:59:56 2019 From: report at bugs.python.org (Harry Coin) Date: Fri, 19 Jul 2019 18:59:56 +0000 Subject: [docs] [issue37620] str.split(sep=None, maxsplit=-1,any=False) In-Reply-To: <1563561296.43.0.155310350105.issue37620@roundup.psfhosted.org> Message-ID: <48772bb7-deb3-038c-fb70-554637f8e6bb@gmail.com> Harry Coin added the comment: I suspect the number of times the str.split builtin was examined for use and rejected in favor of the much more complex and 'heavy' re module far, far exceeds the number of times it found use with more than one character in the split string. The str.split documentation 'feels like' the python equivalent of the linux 'tr' utility that treats the separator characters as a set instead of a sequence.?? Notice the default and the help(str.split) documentation tends to encourage that intuition as no sep= has a very different behavior:? no argument 'removes any whitespace and discards empty strings from the result'.? That leads one to suspect each character in a string would do the same. Mostly it's a use-case driven obviousness, you'd think python would naturally do that in str.split. So very many cases seek to resolve a string into a list of the interesting bits without regard to any mix of separators? (tabs, spaces, etc to increase the readability of the file). I think it would be a heavily used enhancement to add the 'any=True' parameter. Or,? in the alternative, allow the argument to sep to be an iterable so that: 'ab, cd'.split(sep=' ,') -->? ['ab, cd'] but 'ab, cd'.split(sep=[' ',',']) -> ['ab', 'cd'] On 7/19/19 1:34 PM, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > An alternative is to use regular expressions. > >>>> re.split('[\t ]+', 'ab\t cd ef') > ['ab', 'cd', 'ef'] > . > > ---------- > nosy: +serhiy.storchaka > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 15:00:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Jul 2019 19:00:22 +0000 Subject: [docs] [issue35625] Comprehension doc doesn't mention buggy class scope behavior In-Reply-To: <1546253280.49.0.920078772343.issue35625@roundup.psfhosted.org> Message-ID: <1563562822.27.0.320261182772.issue35625@roundup.psfhosted.org> Serhiy Storchaka added the comment: As a documentation issue this is a duplicate of issue26951. ---------- stage: -> resolved status: open -> closed superseder: -> Unintuitive error when using generator expression in class property _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 16:22:33 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 19 Jul 2019 20:22:33 +0000 Subject: [docs] [issue37618] Docs: Code example locations in stdtypes In-Reply-To: <1563435749.25.0.657684993159.issue37618@roundup.psfhosted.org> Message-ID: <1563567753.48.0.156133003397.issue37618@roundup.psfhosted.org> Kyle Stanley added the comment: >In my opinion the current documentation is correctly formed since the bytearray and str are two different classes in Python they could have different set of functions supported and hence the grouping of functions like islower() to be kept separated for different object types. This could justify the grouping of the functions themselves, but doesn't explain why the code examples are contained in bytearray instead of str. New users of the language are far more likely to check the docs for the string functions, and thus benefit significantly more from seeing the code examples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 19 19:40:54 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Jul 2019 23:40:54 +0000 Subject: [docs] [issue37620] str.split(sep=None, maxsplit=-1,any=False) In-Reply-To: <1563458340.3.0.354346385459.issue37620@roundup.psfhosted.org> Message-ID: <1563579654.65.0.475483968893.issue37620@roundup.psfhosted.org> Raymond Hettinger added the comment: Harry, thanks for the suggestion but we're going to pass for now. For the most part, str.split() has stood the test of time and we use regexes for more customized or complicated variants. In general, adding API options increases complexity for users, making the basic methods harder to learn and remember. Fewer choices tends to make for easier programming. Guido has repeatedly given guidance to prefer separate functions and methods over putting multiple algorithmic flags in a single function or method. If you want to pursue this further, consider posting to the python-ideas list. You'll find more traction if you're able to find real-world code that would benefit from the new API. One other thought: the API for the strip/lstrip/rstrip methods has the equivalent of the *any* option when *chars* are specified. That has not worked out well -- people get surprised when the methods strip more than the exact string specified: 'there'.rstrip('re') --> 'th'. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 00:02:28 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 20 Jul 2019 04:02:28 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563595348.48.0.96414622101.issue37635@roundup.psfhosted.org> Change by Kyle Stanley : ---------- assignee: -> docs at python components: +Documentation, Tests nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 12:30:02 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2019 16:30:02 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563640201.91.0.896294602921.issue37635@roundup.psfhosted.org> Raymond Hettinger added the comment: I think it's okay to leave these as 0, 1, 2 because they have a long and well known tradition across multiple languages. The named versions are just alternatives available for end-users. The numbered forms also let us avoid a bunch of otherwise unnecessary imports (which affect start-up time and occasionally create load order bootstrapping issues). Antoine, what do you think? ---------- nosy: +pitrou, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 17:14:09 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 20 Jul 2019 21:14:09 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563657249.02.0.281282574451.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: >The named versions are just alternatives available for end-users While it is true that the usage of 0,1,2 is more commonly used across the repository, the constants are used several times across Lib/_compression.py and Lib/_pyio.py. From my perspective, it looks like the locations which already used the integer values were just not updated rather than it being an intentional design decision. However, if it is primarily targeted at the end-users, I would still recommend at least updating the tutorial and perhaps other IO documentation to use the constants. To any user unfamiliar with the integers, the constants convey their purpose far more explicitly, and I don't think anyone familiar with the integers would be confused by the constants. >The numbered forms also let us avoid a bunch of otherwise unnecessary imports (which affect >start-up time and occasionally create load order bootstrapping issues). I can definitely understand this argument for anything that doesn't already import IO. It probably wouldn't be worthwhile to increase start times and introduce load order bugs. But for anything that already imports IO anyways, this seems like it would only serve to be a readability improvement without causing any change in functionality. This might not make a difference at all to developers who are used to using 0,1,2, but their purpose is not inherently obvious to anyone that isn't. This change would be in alignment with "Explicit is better than implicit". The purpose of the integers is defined only by implication based on tradition, whereas the constants explicitly define the purpose of the argument. A major advantage of Python over many existing languages is the emphasis on providing maximum readability. Sometimes functionality should be prioritized, such as in places where IO is not already imported. But in cases where there is no functionality cost, readability should be the priority. Even for non-public sections such as the tests, improved readability leads to easier maintenance and incorporation of new Python developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 20 19:10:35 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Jul 2019 23:10:35 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563664235.83.0.868258989499.issue37635@roundup.psfhosted.org> Raymond Hettinger added the comment: This is Antoine's call. I believe he made the original decision not to sweep through the standard library, changing it everywhere it occurred. Perhaps this was performance reasons, perhaps the existing code was already clear enough, perhaps the value-add was too low. For me personally, it is easier to remember 0 than the name of the constant. ---------- assignee: docs at python -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 03:07:41 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 21 Jul 2019 07:07:41 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563692861.81.0.217702770008.issue30550@roundup.psfhosted.org> Kyle Stanley added the comment: >Thus, if a user gives an OrderedDict (or a dict with a known order, in Python 3.7+), it is useful that >he know that the order of its elements will not be changed upon transformation into JSON. I would agree that it could be helpful to document that if a user passes an OrderedDict, the order of the elements will not changed, I was just pointing out that a default dictionary implementation would not normally retain the order. However, after looking through the 3.7 changes and reading the discussions, it looks like dictionaries retaining insertion order was decided to be made an official part of the language. If the order matters though, it would make sense to recommend users to use OrderedDict. The order in the default dictionary implementation can end up becoming sorted if pprint is used. Discussions: https://mail.python.org/pipermail/python-dev/2017-December/151283.html and https://mail.python.org/pipermail/python-dev/2017-December/151376.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 04:52:49 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 21 Jul 2019 08:52:49 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563699169.58.0.710826241279.issue30550@roundup.psfhosted.org> Inada Naoki added the comment: OrderedDict is not recommended to preserve order any more. Note that mention about `object_pairs_hook=OrderedDict` is removed intentionally. https://github.com/python/cpython/pull/5001 Please forget about OrderedDict unless you need additional feature OrderedDict provides. It is far inefficient than regular dict. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 08:18:55 2019 From: report at bugs.python.org (Eric O. LEBIGOT) Date: Sun, 21 Jul 2019 12:18:55 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563711535.94.0.286498831322.issue30550@roundup.psfhosted.org> Eric O. LEBIGOT added the comment: The essence of the original post is simply to document any order-preserving properties of the Python to JSON and JSON to Python transformation for mappings. This way users can rely on it. This is for instance useful if a program modifies JSON created by a user and wants to preserve the user ordering. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 11:07:32 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Jul 2019 15:07:32 +0000 Subject: [docs] [issue37605] CI should not depend on gmane response In-Reply-To: <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org> Message-ID: <1563721652.41.0.0364741107544.issue37605@roundup.psfhosted.org> Terry J. Reedy added the comment: gmane was down awhile yesterday, so another merge (temporarily) blocked because of this. If either of you knows how to fix this, please do so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 16:51:38 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 21 Jul 2019 20:51:38 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563742298.26.0.117290296064.issue30550@roundup.psfhosted.org> Kyle Stanley added the comment: > OrderedDict is not recommended to preserve order any more. > Please forget about OrderedDict unless you need additional feature OrderedDict provides. It is far inefficient than regular dict. Thanks for the clarification. Should this recommendation be briefly mentioned in the documentation (https://docs.python.org/3.9/library/collections.html#ordereddict-objects)? Currently, the docs reference that as of 3.7, the order-preserving behavior of standard dictionaries is guaranteed, but there is no mention of the significant differences in efficiency. Based on the current description, a user might end up using OrderedDictionary on the basis that they *might* have a need for reordering elements. If the difference in performance is significant enough, it would be worth noting in the docs so that users can take it into consideration when deciding which data structure to use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 20:26:44 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2019 00:26:44 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563755204.21.0.0678963267166.issue30550@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 21:09:34 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2019 01:09:34 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563757774.74.0.746842300023.issue30550@roundup.psfhosted.org> Raymond Hettinger added the comment: Kyle, the link you gave already discusses performance to the extent that it matters. Please keep focused on the OP's thought that the JSON docs should explicitly promised that key/value pairs are added in the order that they are encountered. The existing JSON docs imply this pretty strongly, but it can be made more explicit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 21:10:11 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Jul 2019 01:10:11 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563757811.72.0.113789191595.issue30550@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- priority: normal -> low versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 21 22:06:39 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 22 Jul 2019 02:06:39 +0000 Subject: [docs] [issue30550] Document order-preserving dictionary output in json In-Reply-To: <1496396847.32.0.655591837652.issue30550@psf.upfronthosting.co.za> Message-ID: <1563761199.69.0.544671592978.issue30550@roundup.psfhosted.org> Kyle Stanley added the comment: > Please keep focused on the OP's thought that the JSON docs should explicitly promised that > key/value pairs are added in the order that they are encountered. The existing JSON docs imply > this pretty strongly, but it can be made more explicit. I agree that the behavior could be more explicitly stated in the docs, as that could be potentially useful information for users to be aware of. Apologies for derailing the topic, I became too focused on the OrderedDict vs Dict topic, which was only a small part of the issue. Any further discussion on that topic or updating the OrderedDict docs should probably be moved into it's own issue, if at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:18:46 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Jul 2019 07:18:46 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563779926.17.0.162812005916.issue37635@roundup.psfhosted.org> Antoine Pitrou added the comment: I would agree with changing the tutorial. The rest doesn't need to be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:22:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Jul 2019 07:22:11 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563780131.48.0.597301732575.issue37635@roundup.psfhosted.org> Serhiy Storchaka added the comment: AFAIK there is an open PR which sweeps through the standard library, changing seek() everywhere to use named constants. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 03:53:17 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 22 Jul 2019 07:53:17 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1563781997.77.0.0778377315632.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: > I would agree with changing the tutorial. The rest doesn't need to be changed. Fair enough, that's understandable. I'll look into creating a PR for the tutorial to attach to this issue. Thanks for the feedback Antoine and Raymond. >AFAIK there is an open PR which sweeps through the standard library, changing seek() >everywhere to use named constants. Even I would disagree with doing it through all of stdlib, especially with the current feedback. I was primarily advocating for using the constants in places where the io module was already being imported, since in that case, it wouldn't result in any additional overhead. Replacing it everywhere would require a significant number of additional io imports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 09:36:22 2019 From: report at bugs.python.org (Gary van der Merwe) Date: Mon, 22 Jul 2019 13:36:22 +0000 Subject: [docs] [issue37651] Change of inheritance of asyncio.CancelledError needs documentation Message-ID: <1563802582.63.0.387759445278.issue37651@roundup.psfhosted.org> New submission from Gary van der Merwe : asyncio.CancelledError inheritance was changed in 3.8. https://bugs.python.org/issue32528 https://github.com/python/cpython/commit/431b540bf79f0982559b1b0e420b1b085f667bb7 The documentation still instructs the user to perform a pattern needed before this change. The documentation should probably change to inform them of the change, and to let them know that pattern is only necessary prior to 3.8. ---------- assignee: docs at python components: Documentation messages: 348297 nosy: docs at python, garyvdm priority: normal severity: normal status: open title: Change of inheritance of asyncio.CancelledError needs documentation versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From antoine.bolvy at gmail.com Mon Jul 22 10:19:54 2019 From: antoine.bolvy at gmail.com (Antoine Bolvy) Date: Mon, 22 Jul 2019 16:19:54 +0200 Subject: [docs] Regarding csv.Sniffer code example Message-ID: Hello, A while ago, I posted this question on stackoverflow: https://stackoverflow.com/q/35756682/2367848 Today, I'm still getting upvotes meaning people still encounter the same problem, which I believe comes from a deficiency from the doc example, as stated in my comment to the answer: This seems like a major deficiency of the Python documentation > which shows the > problematic method of reading 1024 bytes: dialect = > csv.Sniffer().sniff(csvfile.read(1024)). CSV files are always text files > with multiple lines, so it seems that f.readline() is the right option. I noticed today that the example is still problematic, and by wondering how I could get it fixed (or better), I found this email address. I hope everything is clear, Sorry for the HTML email if people are annoyed, Best regards, Antoine BOLVY Software engineer https://saveman71.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Mon Jul 22 17:33:30 2019 From: report at bugs.python.org (Frank B) Date: Mon, 22 Jul 2019 21:33:30 +0000 Subject: [docs] [issue37655] Set subset operator docs Message-ID: <1563831210.27.0.699744646514.issue37655@roundup.psfhosted.org> New submission from Frank B : The docs say "Test whether the set is a proper subset of other" for both set < other and set > other built-in functions. Is that a misprint? How could it be both? For the <= and >= operators it properly reverses the order so one says: Test whether every element in the set is in other. and the other: Test whether every element in other is in the set. ---------- assignee: docs at python components: Documentation files: 2019-07-22 1728 Screenshot.png messages: 348307 nosy: Frank B2, docs at python priority: normal severity: normal status: open title: Set subset operator docs versions: Python 2.7, Python 3.7 Added file: https://bugs.python.org/file48498/2019-07-22 1728 Screenshot.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 19:27:06 2019 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 22 Jul 2019 23:27:06 +0000 Subject: [docs] [issue26695] pickle and _pickle accelerator have different behavior when unpickling an object with falsy __getstate__ return In-Reply-To: <1459868506.3.0.857595967516.issue26695@psf.upfronthosting.co.za> Message-ID: <1563838026.7.0.982077853488.issue26695@roundup.psfhosted.org> Zackery Spytz added the comment: Josh, would you consider creating a pull request for this issue? ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 21:51:53 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 23 Jul 2019 01:51:53 +0000 Subject: [docs] [issue37655] Set subset operator docs In-Reply-To: <1563831210.27.0.699744646514.issue37655@roundup.psfhosted.org> Message-ID: <1563846713.89.0.787694818898.issue37655@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 22 22:39:36 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Tue, 23 Jul 2019 02:39:36 +0000 Subject: [docs] [issue37655] Set subset operator docs In-Reply-To: <1563831210.27.0.699744646514.issue37655@roundup.psfhosted.org> Message-ID: <1563849576.91.0.125500651581.issue37655@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: For 'set < other' it says sub-set ... for 'set > other' is says super-set. Subset vs superset. So I think it's correct in the documentation. ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 00:58:44 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Jul 2019 04:58:44 +0000 Subject: [docs] [issue37655] Set subset operator docs In-Reply-To: <1563831210.27.0.699744646514.issue37655@roundup.psfhosted.org> Message-ID: <1563857924.42.0.846874142103.issue37655@roundup.psfhosted.org> Raymond Hettinger added the comment: The docs look fine to me as well. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 23 01:52:38 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 23 Jul 2019 05:52:38 +0000 Subject: [docs] [issue36568] Typo in socket.CAN_RAW_FD_FRAMES library documentation In-Reply-To: <1554776259.35.0.774393301329.issue36568@roundup.psfhosted.org> Message-ID: <1563861158.95.0.388404610832.issue36568@roundup.psfhosted.org> Zackery Spytz added the comment: It seems that this was fixed in 1b05aa219041eb1c9dbcb4ec6c1fa5b20f060bf5. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:18:58 2019 From: report at bugs.python.org (Ngalim Siregar) Date: Wed, 24 Jul 2019 12:18:58 +0000 Subject: [docs] [issue37605] CI should not depend on gmane response In-Reply-To: <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org> Message-ID: <1563970738.09.0.906184538221.issue37605@roundup.psfhosted.org> Ngalim Siregar added the comment: is it allowed to mock news.gmane.org response? if it is okay i would like to help ---------- nosy: +nsiregar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 08:30:27 2019 From: report at bugs.python.org (Leonardo Santagada) Date: Wed, 24 Jul 2019 12:30:27 +0000 Subject: [docs] [issue19809] Doc: subprocess should warn uses on race conditions when multiple threads spawn child processes In-Reply-To: <1385544646.44.0.340337636792.issue19809@psf.upfronthosting.co.za> Message-ID: <1563971427.93.0.743102544084.issue19809@roundup.psfhosted.org> Leonardo Santagada added the comment: This is still the case on windows as the pipes created to talk to the process might be inherited by two or more simultaneous CreateProcess calls. I've found a suggested solution to this: https://devblogs.microsoft.com/oldnewthing/20111216-00/?p=8873 By only inheriting the stdout/err/in handles and them supporting close_fds for windows. Would more users be interested in a proper patch for this? For us now we have a lock around Popen.__init__ but that obviously doesn't suport subinterpreters and other calls to CreateProcess that might happen. ---------- nosy: +santagada versions: +Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 10:34:35 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 24 Jul 2019 14:34:35 +0000 Subject: [docs] [issue37605] CI should not depend on gmane response In-Reply-To: <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org> Message-ID: <1563978875.15.0.948623302546.issue37605@roundup.psfhosted.org> Zachary Ware added the comment: For doctests, I would prefer to just disable some or all of the doctests in Doc/library/nntplib.rst rather than go to the effort of trying to mock things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:03:21 2019 From: report at bugs.python.org (Caleb Donovick) Date: Wed, 24 Jul 2019 18:03:21 +0000 Subject: [docs] [issue37670] Description of UserDict is misleading Message-ID: <1563991401.59.0.133528027971.issue37670@roundup.psfhosted.org> New submission from Caleb Donovick : The documentation for collections.UserDict states "In addition to supporting the methods and operations of mappings, UserDict instances provide the following attribute: ..." This however is misleading as it supports the operations of mutable mappings. Which is not stated anywhere. ---------- assignee: docs at python components: Documentation messages: 348393 nosy: docs at python, donovick priority: normal severity: normal status: open title: Description of UserDict is misleading _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 14:05:22 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Jul 2019 18:05:22 +0000 Subject: [docs] [issue37670] Description of UserDict is misleading In-Reply-To: <1563991401.59.0.133528027971.issue37670@roundup.psfhosted.org> Message-ID: <1563991522.87.0.266187741185.issue37670@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 16:56:43 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 24 Jul 2019 20:56:43 +0000 Subject: [docs] [issue19809] Doc: subprocess should warn uses on race conditions when multiple threads spawn child processes In-Reply-To: <1385544646.44.0.340337636792.issue19809@psf.upfronthosting.co.za> Message-ID: <1564001803.32.0.659253313044.issue19809@roundup.psfhosted.org> Eryk Sun added the comment: > This is still the case on windows as the pipes created to talk to the > process might be inherited by two or more simultaneous CreateProcess > calls. subprocess already uses PROC_THREAD_ATTRIBUTE_HANDLE_LIST to address this problem, at least between its own subprocess.Popen calls. The handles in the list still have to be inheritable, so it does not solve the problem with os.system and os.spawn* calls that are concurrent with subprocess.Popen -- nor extension-module, ctypes, cffi, or PyWin32 code in the wild that inherits handles without PROC_THREAD_ATTRIBUTE_HANDLE_LIST. There's a warning about this in the docs: https://docs.python.org/3/library/subprocess.html#subprocess.STARTUPINFO.lpAttributeList It's why we can't use the handle list to implement pass_fds in Windows and why the general capability is buried in STARTUPINFO, instead of being exposed as a high-level Popen parameter. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 18:15:42 2019 From: report at bugs.python.org (Mariatta) Date: Wed, 24 Jul 2019 22:15:42 +0000 Subject: [docs] [issue37674] Is imp module deprecated or pending deprecation? Message-ID: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> New submission from Mariatta : The doc https://docs.python.org/3.7/library/imp.html says "Deprecated since version 3.4: The imp package is pending deprecation in favor of importlib." Is it in "deprecated" state, or "pendingdeprecation" state? Should it just be removed in 3.9? Maybe I just don't understand the difference of "deprecated" and "pending deprecation" :( ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 348411 nosy: Mariatta, docs at python priority: normal severity: normal status: open title: Is imp module deprecated or pending deprecation? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 19:46:27 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Jul 2019 23:46:27 +0000 Subject: [docs] [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1564011987.73.0.120734724292.issue37674@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 24 21:02:17 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Jul 2019 01:02:17 +0000 Subject: [docs] [issue37670] Description of UserDict is misleading In-Reply-To: <1563991401.59.0.133528027971.issue37670@roundup.psfhosted.org> Message-ID: <1564016537.92.0.949715391177.issue37670@roundup.psfhosted.org> Raymond Hettinger added the comment: The term "mapping" is in lowercase and refers to the generic concept of a mapping as defined in the glossary. This is distinct from the capital letter classes "Mapping" and "MutableMapping" as provided in the collections.abc module. It is the former meaning that is intended. Thank you for the suggestion. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 15:47:06 2019 From: report at bugs.python.org (wim glenn) Date: Thu, 25 Jul 2019 19:47:06 +0000 Subject: [docs] [issue37684] list.extend docs inaccurate Message-ID: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> New submission from wim glenn : >From https://docs.python.org/3/tutorial/datastructures.html#more-on-lists : list.extend(iterable) Extend the list by appending all the items from the iterable. Equivalent to a[len(a):] = iterable. The "equivalent" is not very good. Consider def gen(): yield 1 yield 2 raise Exception Using `a.extend(gen())` would mutate `a`. Using slice assignment would still consume the generator, but `a` would not be modified. I propose a different example to use to describe the behaviour of extend: for x in iterable: a.append(x) ---------- assignee: docs at python components: Documentation messages: 348450 nosy: docs at python, wim.glenn priority: normal severity: normal status: open title: list.extend docs inaccurate versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 15:56:34 2019 From: report at bugs.python.org (wim glenn) Date: Thu, 25 Jul 2019 19:56:34 +0000 Subject: [docs] [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564084594.8.0.525364340821.issue37684@roundup.psfhosted.org> Change by wim glenn : ---------- keywords: +patch pull_requests: +14720 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 25 16:27:17 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Jul 2019 20:27:17 +0000 Subject: [docs] [issue37674] Is imp module deprecated or pending deprecation? In-Reply-To: <1564006542.59.0.779053208257.issue37674@roundup.psfhosted.org> Message-ID: <1564086437.22.0.826867406463.issue37674@roundup.psfhosted.org> Brett Cannon added the comment: It's deprecated: https://github.com/python/cpython/blob/master/Lib/imp.py#L31. The wording is from back when the module was soft-deprecated via documentation before it was hard-deprecated via code. Feel free to tweak it to say "The imp module is deprecated in favor of :mod:`importlib`." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 02:18:19 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Jul 2019 06:18:19 +0000 Subject: [docs] [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564121899.3.0.430187377915.issue37684@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the suggestion, but I'm going to reject this. The existing rough equivalent isn't exact but it does do a better job of communicating a bulk update rather than a series of appends. Also, it isn't far from how the C list_extend() is actually implemented ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From ahmedehabg at gmail.com Wed Jul 24 20:00:38 2019 From: ahmedehabg at gmail.com (ahmed gado) Date: Wed, 24 Jul 2019 20:00:38 -0400 Subject: [docs] [Docs] Bad url on a page Message-ID: Hi Python people, I noticed that the link that says that ?you should upgrade and read the Python documentation for the current stable release" on https://docs.python.org/3.4/library/email-examples.html points to a non-existent page. Currently, it points to https://docs.python.org/3/library/email-examples.html. But the actual URL is https://docs.python.org/3/library/email.examples.html (swapping the hyphen for a dot). I thought this was important to fix since the 3.4 page is the one that currently shows up in a Google search. Best, Ahmed -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel at hooper.engineering Wed Jul 24 12:48:00 2019 From: daniel at hooper.engineering (Daniel Hooper) Date: Wed, 24 Jul 2019 11:48:00 -0500 Subject: [docs] Documentation prototype for PyStructSequence_SET_ITEM(..) is incorrect in 3.x? Message-ID: In 3.7.4 and in several other 3.x versions as well at https://docs.python.org/3/c-api/tuple.html#c.PyStructSequence_SetItem I noticed that PyStructSequence_SET_ITEM is defined void PyStructSequence_SET_ITEM(PyObject *p, Py_ssize_t *pos, PyObject *o) with the Py_ssize_t *pos defined as a POINTER, however PyStructSequence_SetItem is not, void PyStructSequence_SetItem(PyObject *p, Py_ssize_t pos, PyObject *o) . This doesn?t make sense to me, because it appears that the definition is #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v) from https://github.com/python/cpython/blob/master/Include/structseq.h and #define PyTuple_SET_ITEM(op, i, v) (_PyTuple_CAST(op)->ob_item[i] = v) from https://github.com/python/cpython/blob/master/Include/cpython/tupleobject.h . Various examples seem to just use a number from 0 to N. Between the definition and those usage examples, that does not seem to support being documented as a pointer type. ? Daniel Hooper, P.E. Hooper Engineering, LLC (214) 267-8780 http://hooper.engineering -------------- next part -------------- An HTML attachment was scrubbed... URL: From python at oldfield.wattle.id.au Wed Jul 24 22:28:54 2019 From: python at oldfield.wattle.id.au (Kim Oldfield) Date: Thu, 25 Jul 2019 12:28:54 +1000 Subject: [docs] Search doesn't find built-in functions Message-ID: <3faa7255-0240-13c8-31b9-af2835236f2c@oldfield.wattle.id.au> Hi, The python 3 documentation search doesn't always find built-in functions. For example, searching for "zip" takes me to https://docs.python.org/3/search.html?q=zip I would expect the first match to be a link to https://docs.python.org/3/library/functions.html#zip but I can't see a link to this page anywhere in the 146 results. To me this looks like a bug. Should I report it at https://bugs.python.org/ ? Or is there some other explanation I'm missing? Regards, Kim -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Fri Jul 26 03:02:40 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 07:02:40 +0000 Subject: [docs] [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564124560.47.0.747410217947.issue37684@roundup.psfhosted.org> Kyle Stanley added the comment: Raymond, what were your thoughts on the alternative suggestion I posted on the GitHub PR? My suggestion might have been too different from the original PR, but personally I think it's a bit more appropriate for the tutorial than the existing example. Would it be worth opening a separate PR for it, or do you prefer the existing example? ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:03:45 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 07:03:45 +0000 Subject: [docs] [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564124625.42.0.365538613078.issue37684@roundup.psfhosted.org> Kyle Stanley added the comment: Clarification: Since I posted two potential suggestions, I'm referring to the one using the interpreter, not the one that changed it into two lines and added indentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:23:57 2019 From: report at bugs.python.org (Kirill Balunov) Date: Fri, 26 Jul 2019 07:23:57 +0000 Subject: [docs] [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. Message-ID: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> New submission from Kirill Balunov : In the documentation it is said that os.path.isdir(...) an Path(...).is_dir()are equivalent substitutes. https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module But they give different result for empty path strings: >>> import os >>> from pathlib import Path >>> dummy = "" >>> os.path.isdir(dummy) False Obviously it's not an equivalence, so either this should be noted in the documentation or corrected in the code. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 348475 nosy: docs at python, godaygo priority: normal severity: normal status: open title: The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:27:13 2019 From: report at bugs.python.org (Kirill Balunov) Date: Fri, 26 Jul 2019 07:27:13 +0000 Subject: [docs] [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564126033.12.0.630711034898.issue37688@roundup.psfhosted.org> Kirill Balunov added the comment: Forgot to write the result for Path variant: >>> Path(dummy).is_dir() True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:34:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Jul 2019 07:34:09 +0000 Subject: [docs] [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564126449.88.0.270704553082.issue37688@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is because Path() == Path('') == Path('.'). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 03:34:49 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 07:34:49 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1564126489.41.0.287735982967.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: Upon further consideration, I think that it would be best to leave the code examples as is in the "inputoutput" tutorial, but it still be worth mentioning that the constants exist as alternatives. This is due to adding the additional step of "import io" in order to be able to access the constants. The tutorial code examples should probably aim to not add additional extra lines that are not needed. While I was working on a PR for updating the tutorial, I noticed that the second argument's name for seek() was *from_what* instead of *whence*. Was this an older name for the argument that is now outdated or am I missing something? Doc/tutorial: https://github.com/python/cpython/blob/master/Doc/tutorial/inputoutput.rst#methods-of-file-objects Doc/library: https://docs.python.org/3/library/io.html#io.IOBase.seek ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 04:07:52 2019 From: report at bugs.python.org (Kirill Balunov) Date: Fri, 26 Jul 2019 08:07:52 +0000 Subject: [docs] [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564128472.85.0.382196540199.issue37688@roundup.psfhosted.org> Kirill Balunov added the comment: I understand the reasons, I only say that it does not correspond to my perception of their equivalence, because: os.path.isdir('') != os.path.isdir('.') while: Path('').is_dir() == Path('.').is_dir() and I can confirm that some libraries rely on os.path.isdir('') -> False behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 04:10:04 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 26 Jul 2019 08:10:04 +0000 Subject: [docs] [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564128604.36.0.558851497742.issue37688@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 05:18:18 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Jul 2019 09:18:18 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1564132698.38.0.923425712328.issue37635@roundup.psfhosted.org> Antoine Pitrou added the comment: I don't know. "whence" is the official name of the argument in the POSIX API: https://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html Perhaps "from_what" is assumed to be more understandable by the average reader? Also, os.lseek() uses "how": https://docs.python.org/3/library/os.html#os.lseek ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 11:47:18 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Jul 2019 15:47:18 +0000 Subject: [docs] [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564156038.3.0.319897885969.issue37688@roundup.psfhosted.org> Brett Cannon added the comment: I think you're reading "equivalence" too strictly here to mean "exactly the same semantics". In this instance it means "for similar functionality, the equivalent method is ..." (admittedly this might be a quirk of the use of the word "equivalent" in North American English). But I can see why you would interpret it the way you do. Please feel free to propose a PR to clarify the phrasing. ---------- nosy: +brett.cannon type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 11:53:34 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Jul 2019 15:53:34 +0000 Subject: [docs] [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564156414.75.0.877874989904.issue37688@roundup.psfhosted.org> Antoine Pitrou added the comment: If "equivalent" is deceiving, perhaps replace it with "similary" or "roughly equivalent". Feel free to post a PR with your preferred wording. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 12:09:31 2019 From: report at bugs.python.org (wim glenn) Date: Fri, 26 Jul 2019 16:09:31 +0000 Subject: [docs] [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564157371.38.0.645869938432.issue37684@roundup.psfhosted.org> wim glenn added the comment: Raymond, I understand that consecutive appends could potentially trigger multiple resizes behind the scenes, and so it's not really showing that extend is more like a bulk update as you mentioned. That's a good point! However I think it's a more important consideration to make sure the equivalent actually gives a correct *result*. Can you suggest an alternative code snippet to use which is correct, or perhaps soften the language claiming that the code is equivalent? For what it's worth, the stdtypes.html docs writes that extend is "for the most part the same as" the slice assignment: https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:50:51 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 17:50:51 +0000 Subject: [docs] [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564163451.88.0.0476918273086.issue35524@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +14734 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 13:51:27 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 17:51:27 +0000 Subject: [docs] [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564163487.72.0.661511602549.issue35524@roundup.psfhosted.org> Steve Dower added the comment: I made a fake 3.8.0 installer and made the screenshot, so we'll only backport it to 3.8. I think 3.7 is fine with what it has. ---------- versions: +Python 3.8, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 15:33:38 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 19:33:38 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1564169618.35.0.791984234665.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: > I don't know. "whence" is the official name of the argument in the POSIX API > Perhaps "from_what" is assumed to be more understandable by the average reader? >From looking at the blame on GitHub, it looks like the use of the "from_what" argument in the tutorial has been there for more than 12 years, since the last commit was a massive move of the doc tree. The documentation for the IO module was added exactly 12 years (which included the usage of the *whence* argument rather than *from_what*) ago by birkenfield. Based on that information, I think the most likely answer is that the argument used to be *from_what* in a much older version of Python. To conform to the posix standard, it was changed to *whence*, but the tutorial was never updated. If it was simply never updated, I think that it would be better to change it to *whence*. The difference would be more likely to confuse new users of the language, if they were to start with the tutorial and later refer to the IO module documentation. Also the tutorial provides a fairly in-depth explanation of the purpose of the argument within seek(), so I don't think using "from_what" as the name makes its purpose any more clear to the users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 15:36:59 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 19:36:59 +0000 Subject: [docs] [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1564169819.23.0.525674461933.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: Clarification: By "latest commit" should be "oldest commit" with regards to the oldest commit in GitHub's history of the section of the "inputouput" tutorial that used the *from_what* argument for seek(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:04:23 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 20:04:23 +0000 Subject: [docs] [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564171463.51.0.424461781563.issue35524@roundup.psfhosted.org> Steve Dower added the comment: New changeset 9d9893a1c85e07f7369c848acb0aed3b8fe6c3af by Steve Dower in branch 'master': bpo-35524: Update Windows installer image in docs (GH-14966) https://github.com/python/cpython/commit/9d9893a1c85e07f7369c848acb0aed3b8fe6c3af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:05:33 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 20:05:33 +0000 Subject: [docs] [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564171533.37.0.0422266313138.issue35524@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +14738 pull_request: https://github.com/python/cpython/pull/14969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:40:16 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 20:40:16 +0000 Subject: [docs] [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564173616.29.0.396430041123.issue35524@roundup.psfhosted.org> Steve Dower added the comment: New changeset 886e66d111b6b865e582d8cc7974d5c0b398da99 by Steve Dower in branch '3.8': bpo-35524: Update Windows installer image in docs (GH-14966) https://github.com/python/cpython/commit/886e66d111b6b865e582d8cc7974d5c0b398da99 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:43:07 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Jul 2019 20:43:07 +0000 Subject: [docs] [issue35524] using/windows launcher image might be deprecated In-Reply-To: <1545135302.84.0.788709270274.issue35524@psf.upfronthosting.co.za> Message-ID: <1564173787.7.0.56817119271.issue35524@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 16:44:27 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 26 Jul 2019 20:44:27 +0000 Subject: [docs] [issue37684] list.extend docs inaccurate In-Reply-To: <1564084026.65.0.901156826849.issue37684@roundup.psfhosted.org> Message-ID: <1564173867.83.0.240681401836.issue37684@roundup.psfhosted.org> Kyle Stanley added the comment: Upon further consideration, I think the code example suggestion I made using the interpreter could be in a separate PR or issue and doesn't have to replace the the current "Equivalent to ..." portion. I'll open a separate PR for that (which isn't attached to this issue). Apologies if that at all derailed this conversation, as it might not be directly relevant (even if it's within the same section). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 26 17:24:58 2019 From: report at bugs.python.org (Kirill Balunov) Date: Fri, 26 Jul 2019 21:24:58 +0000 Subject: [docs] [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564176298.86.0.697160535925.issue37688@roundup.psfhosted.org> Kirill Balunov added the comment: I am reading "equivalence" too strictly (like "as a substitute"), because this is part of the documentation :) and I agree that in ordinary speech I would use it rather in the sense of ?similar?. In order to make sure, that everyone agrees only on that this requires only a documentation change? Because as for me, I think that it will better for `os.path.isdir` to raise `ValueError` or `DeprecationWarning` - `False` on empty string is not well defined behavior. But I'm fine to be alone with the last one. ---------- _______________________________________ Python tracker _______________________________________ From 100608019 at student.swin.edu.au Sat Jul 27 02:47:06 2019 From: 100608019 at student.swin.edu.au (CHRISTOPHER NAHON) Date: Sat, 27 Jul 2019 06:47:06 +0000 Subject: [docs] A4 Documentation actually US-Letter size Message-ID: Adobe acrobat (under file->properties) states that both the A4 paper sized documentation and the US-Letter paper sized documentation have dimensions 21.587 x 27.937 cm. -------------- next part -------------- An HTML attachment was scrubbed... URL: From 100608019 at student.swin.edu.au Sat Jul 27 02:33:49 2019 From: 100608019 at student.swin.edu.au (CHRISTOPHER NAHON) Date: Sat, 27 Jul 2019 06:33:49 +0000 Subject: [docs] EPUB documentation not packed as .zip Message-ID: On https://docs.python.org/3/download.html the EPUB format is listed as being ?Packed as .zip?, but the link is just an .epub file. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonag01 at comcast.net Sat Jul 27 23:55:06 2019 From: jonag01 at comcast.net (Jonathan Geffrard) Date: Sat, 27 Jul 2019 23:55:06 -0400 (EDT) Subject: [docs] 7/27/2019 Documentation Bug Report Message-ID: <1533326589.630255.1564286107662@connect.xfinity.com> Dear Maintainer, I was looking through the Python English 3.7.4 Documentation >> The Python Standard Library >> Internet Protocols and Support and I noticed a minor error in the documentation. As of the date of this email, under the documentation for class urllib.request.AbstractBasicAuthHandler(password_mgr=None), it reads as "This is a mixin class that helps with HTTP authentication, both to the remote host and to a proxy. password_mgr, if given, should be something that is compatible with HTTPPasswordMgr https://docs.python.org/3/library/urllib.request.html#urllib.request.HTTPPasswordMgr ; refer to section HTTPPasswordMgr Objects https://docs.python.org/3/library/urllib.request.html#http-password-mgr for information on the interface that must be supported. If passwd_mgr also provides is_authenticated..." passwd_mgr should be password_mgr. This seems to be the only place in the documentation where this function argument is misspelled. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sun Jul 28 13:24:40 2019 From: report at bugs.python.org (hai shi) Date: Sun, 28 Jul 2019 17:24:40 +0000 Subject: [docs] [issue37698] Update doc of PyBuffer_ToContiguous Message-ID: <1564334680.0.0.401210106575.issue37698@roundup.psfhosted.org> New submission from hai shi : Due to https://github.com/python/cpython/blob/master/Objects/memoryobject.c#L985, order could be 'A' in PyBuffer_ToContiguous() ---------- assignee: docs at python components: Documentation messages: 348585 nosy: docs at python, shihai1991 priority: normal severity: normal status: open title: Update doc of PyBuffer_ToContiguous _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 13:27:15 2019 From: report at bugs.python.org (hai shi) Date: Sun, 28 Jul 2019 17:27:15 +0000 Subject: [docs] [issue37698] Update doc of PyBuffer_ToContiguous In-Reply-To: <1564334680.0.0.401210106575.issue37698@roundup.psfhosted.org> Message-ID: <1564334835.91.0.236951321245.issue37698@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14758 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 14:08:02 2019 From: report at bugs.python.org (hai shi) Date: Sun, 28 Jul 2019 18:08:02 +0000 Subject: [docs] [issue34101] PyBuffer_GetPointer() not documented Message-ID: <1564337282.04.0.325588586372.issue34101@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +14760 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 23:34:58 2019 From: report at bugs.python.org (Brian Skinn) Date: Mon, 29 Jul 2019 03:34:58 +0000 Subject: [docs] [issue37699] Explicit mention of raised ValueError's after .detach() of underlying IO buffer Message-ID: <1564371298.05.0.400100937454.issue37699@roundup.psfhosted.org> New submission from Brian Skinn : Once the underlying buffer/stream is .detach()ed from an instance of a subclass of TextIOBase or BufferedIOBase, accession of most attributes defined on TextIOBase/BufferedIOBase or the IOBase parent, as well as calling of most methods defined on TextIOBase/BufferedIOBase/IOBase, results in raising of a ValueError. Currently, the documentation of both .detach() methods states simply: > After the raw stream has been detached, the buffer is in an unusable state. I propose augmenting the above to something like the following in the docs for both .detach() methods, to make this behavior more explicit: > After the raw stream has been detached, the buffer > is in an unusable state. As a result, accessing/calling most > attributes/methods of either :class:`BufferedIOBase` or its > :class:`IOBase` parent will raise :exc:`ValueError`. I confirm that the error raised for both `BufferedReader` and `TextIOWrapper` after `.detach()` *is* ValueError in all of 3.5.7, 3.6.8, 3.7.3, and 3.8.0b1. ---------- assignee: docs at python components: Documentation messages: 348594 nosy: bskinn, docs at python priority: normal severity: normal status: open title: Explicit mention of raised ValueError's after .detach() of underlying IO buffer type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 28 23:35:26 2019 From: report at bugs.python.org (Brian Skinn) Date: Mon, 29 Jul 2019 03:35:26 +0000 Subject: [docs] [issue37699] Explicit mention of raised ValueError's after .detach() of underlying IO buffer In-Reply-To: <1564371298.05.0.400100937454.issue37699@roundup.psfhosted.org> Message-ID: <1564371326.48.0.657029347647.issue37699@roundup.psfhosted.org> Change by Brian Skinn : ---------- type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:26:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:26:25 +0000 Subject: [docs] [issue1635217] Warn against using requires/provides/obsoletes in setup.py Message-ID: <1564399585.79.0.157740304301.issue1635217@roundup.psfhosted.org> STINNER Victor added the comment: This issue seems to be controversial. I suggest to open a discussion at te Packaging forum https://discuss.python.org/c/packaging rather than using the bug tracker. I close this issue. ---------- nosy: +vstinner resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:27:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:27:12 +0000 Subject: [docs] [issue1398781] Example in section 5.3 "Pure Embedding" doesn't work. Message-ID: <1564399631.99.0.0834820645106.issue1398781@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 13 years old, inactive for 5 years, has a patch: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:35:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:35:29 +0000 Subject: [docs] [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1564400129.06.0.785319050178.issue15125@roundup.psfhosted.org> STINNER Victor added the comment: This issue is 7 years old and has 3 patches: it's far from being "newcomer friendly", I remove the "Easy" label. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 07:35:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 11:35:38 +0000 Subject: [docs] [issue15125] argparse: positional arguments containing - in name not handled well In-Reply-To: <1340292847.64.0.123942573403.issue15125@psf.upfronthosting.co.za> Message-ID: <1564400138.43.0.699055343722.issue15125@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 08:02:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Jul 2019 12:02:28 +0000 Subject: [docs] [issue12436] Missing items in installation/setup instructions In-Reply-To: <1309305395.29.0.101516779086.issue12436@psf.upfronthosting.co.za> Message-ID: <1564401748.68.0.101293488295.issue12436@roundup.psfhosted.org> STINNER Victor added the comment: This issue is not newcomer friendly, I remove the easy keyword. ---------- keywords: -easy nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 14:50:44 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 29 Jul 2019 18:50:44 +0000 Subject: [docs] [issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings. In-Reply-To: <1564125837.91.0.494799678642.issue37688@roundup.psfhosted.org> Message-ID: <1564426244.73.0.476564173575.issue37688@roundup.psfhosted.org> Brett Cannon added the comment: Changing the semantics of os.path.isdir() for something like this isn't worth breaking code; basically it's now a quirk of the function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 29 22:55:35 2019 From: report at bugs.python.org (Caleb Donovick) Date: Tue, 30 Jul 2019 02:55:35 +0000 Subject: [docs] [issue35083] Fix documentation for __instancecheck__ In-Reply-To: <1540671281.62.0.788709270274.issue35083@psf.upfronthosting.co.za> Message-ID: <1564455335.32.0.48772585796.issue35083@roundup.psfhosted.org> Change by Caleb Donovick : ---------- nosy: +donovick _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 03:44:41 2019 From: report at bugs.python.org (retnikt) Date: Tue, 30 Jul 2019 07:44:41 +0000 Subject: [docs] [issue37717] argparse subcommand docs has non-existent parameter "action" Message-ID: <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org> New submission from retnikt : In the library documentation for argparse, the section for ArgumentParser.add_subparsers ( https://docs.python.org/3/library/argparse.html#sub-commands ) states that there is a parameter for 'action' with the description 'the basic type of action to be taken when this argument is encountered at the command line'. However, no such parameter actually exists, and passing it to the function causes very strange behaviour: Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/argparse.py", line 1716, in add_subparsers action = parsers_class(option_strings=[], **kwargs) TypeError: __init__() got an unexpected keyword argument 'parser_class' This line should be removed from the documentation. It is present in versions 3.4+ and 2.7 ---------- assignee: docs at python components: Documentation messages: 348718 nosy: docs at python, retnikt priority: normal severity: normal status: open title: argparse subcommand docs has non-existent parameter "action" type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 04:10:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Jul 2019 08:10:56 +0000 Subject: [docs] [issue37717] argparse subcommand docs has non-existent parameter "action" In-Reply-To: <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org> Message-ID: <1564474256.86.0.70470500049.issue37717@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 04:37:30 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 30 Jul 2019 08:37:30 +0000 Subject: [docs] [issue37717] argparse subcommand docs has non-existent parameter "action" In-Reply-To: <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org> Message-ID: <1564475850.56.0.273496458764.issue37717@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Seems related : issue23487 . kwargs is manipulated before passing to parsers_class causing the error message and also the discussion in issue23487 notes this to be a documentation issue over usage of action argument. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 30 13:28:04 2019 From: report at bugs.python.org (paul j3) Date: Tue, 30 Jul 2019 17:28:04 +0000 Subject: [docs] [issue37717] argparse subcommand docs has non-existent parameter "action" In-Reply-To: <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org> Message-ID: <1564507684.61.0.142040247826.issue37717@roundup.psfhosted.org> paul j3 added the comment: As discussed in https://bugs.python.org/issue23487, `action` works if the class is compatible with argparse._SubParsersAction. these commands all do the same thing: parser.add_subparsers() # default parser.add_subparsers(action='parsers') parser.add_subparsers(action=argparse._SubParsersAction) Your example using parser.add_subparsers(action='store') raises the error because the argparse._StoreAction class cannot handle the `parser_class` parameter that add_subparsers has added to the kwargs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 00:18:10 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 31 Jul 2019 04:18:10 +0000 Subject: [docs] [issue37726] Tutorial should not recommend getopt Message-ID: <1564546690.91.0.192257836854.issue37726@roundup.psfhosted.org> New submission from Guido van Rossum : I read on python-ideas that the tutorial recommends getopt as the simple argument parsing choice, and argparse as advanced. This is silly. We should only promote argparse (unless you want to use raw sys.argv[1:]). ---------- assignee: docs at python components: Documentation keywords: newcomer friendly messages: 348774 nosy: docs at python, gvanrossum priority: normal severity: normal stage: needs patch status: open title: Tutorial should not recommend getopt versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 07:09:29 2019 From: report at bugs.python.org (mental) Date: Wed, 31 Jul 2019 11:09:29 +0000 Subject: [docs] [issue37726] Tutorial should not recommend getopt In-Reply-To: <1564546690.91.0.192257836854.issue37726@roundup.psfhosted.org> Message-ID: <1564571369.22.0.448412573146.issue37726@roundup.psfhosted.org> mental added the comment: It's nice to see the newcomer friendly tag being encouraged :thumbsup: I'm submitting a PR for a doc change (I'd appreciate a review :D). I've replaced any mention of getopt in the tutorial section with the argparse module. Additionally I have added several small examples of usage promoting its usability. Should the section recommend using other dedicated packages for parsing: fire, click, docopt? urllib.request does this for the requests package. ---------- nosy: +mental _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 07:09:40 2019 From: report at bugs.python.org (mental) Date: Wed, 31 Jul 2019 11:09:40 +0000 Subject: [docs] [issue37726] Tutorial should not recommend getopt In-Reply-To: <1564546690.91.0.192257836854.issue37726@roundup.psfhosted.org> Message-ID: <1564571380.2.0.932821104185.issue37726@roundup.psfhosted.org> Change by mental : ---------- keywords: +patch pull_requests: +14802 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15052 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:29:20 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 12:29:20 +0000 Subject: [docs] [issue37730] NotImplemented is used instead of NotImplementedError in docs Message-ID: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> New submission from Serhiy Storchaka : In some places in the documentation NotImplemented is used instead of correct NotImplementedError. All occurrences of NotImplemented should be manually checked and wrong spelling should be corrected. ---------- assignee: docs at python components: Documentation keywords: easy, newcomer friendly messages: 348801 nosy: docs at python, serhiy.storchaka priority: normal severity: normal status: open title: NotImplemented is used instead of NotImplementedError in docs versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 08:54:08 2019 From: report at bugs.python.org (David Heiberg) Date: Wed, 31 Jul 2019 12:54:08 +0000 Subject: [docs] [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564577648.74.0.660137991632.issue37730@roundup.psfhosted.org> David Heiberg added the comment: I'm happy to take a look at this, I found one example here: https://docs.python.org/3/library/winreg.html#winreg.DisableReflectionKey How would I go about submitting a patch for all of the docs across the versions? Would I apply the patch to the relevant branches and submit a PR for each? Still fairly new to this, thanks for any pointers! ---------- nosy: +dheiberg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:23:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 13:23:53 +0000 Subject: [docs] [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564579433.76.0.588163826284.issue37730@roundup.psfhosted.org> Serhiy Storchaka added the comment: Create a PR for master. When it be merged it can be backported automatically to other branches. Sometimes it may require manually backporting, but changes should be merged to master first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 09:44:48 2019 From: report at bugs.python.org (David Heiberg) Date: Wed, 31 Jul 2019 13:44:48 +0000 Subject: [docs] [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564580688.03.0.125055739019.issue37730@roundup.psfhosted.org> David Heiberg added the comment: Super, thanks for the help, I'll submit a PR as soon as it is ready ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:48:37 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 14:48:37 +0000 Subject: [docs] [issue34101] PyBuffer_GetPointer() not documented Message-ID: <1564584517.45.0.529694517544.issue34101@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14804 pull_request: https://github.com/python/cpython/pull/15055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:48:38 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2019 14:48:38 +0000 Subject: [docs] [issue34101] PyBuffer_GetPointer() not documented Message-ID: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> New submission from Antoine Pitrou : New changeset 1b29af83bc17e773b0c0d117f5fe1018fde46b0d by Antoine Pitrou (Hai Shi) in branch 'master': bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994) https://github.com/python/cpython/commit/1b29af83bc17e773b0c0d117f5fe1018fde46b0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:57:14 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2019 14:57:14 +0000 Subject: [docs] [issue34101] PyBuffer_GetPointer() not documented In-Reply-To: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> Message-ID: <1564585034.6.0.969512401122.issue34101@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 353306137176985f1a2995ff964b0c00eccd1434 by Antoine Pitrou (Miss Islington (bot)) in branch '3.7': bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994) (GH-15055) https://github.com/python/cpython/commit/353306137176985f1a2995ff964b0c00eccd1434 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:57:25 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2019 14:57:25 +0000 Subject: [docs] [issue34101] PyBuffer_GetPointer() not documented In-Reply-To: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> Message-ID: <1564585045.55.0.722165728268.issue34101@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:57:34 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Jul 2019 14:57:34 +0000 Subject: [docs] [issue34101] PyBuffer_GetPointer() not documented In-Reply-To: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> Message-ID: <1564585054.32.0.988660236963.issue34101@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 10:57:55 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 14:57:55 +0000 Subject: [docs] [issue34101] PyBuffer_GetPointer() not documented In-Reply-To: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> Message-ID: <1564585075.82.0.959922034994.issue34101@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14805 pull_request: https://github.com/python/cpython/pull/15056 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 11:04:54 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 15:04:54 +0000 Subject: [docs] [issue34101] PyBuffer_GetPointer() not documented In-Reply-To: <1564584518.54.0.146453019906.issue34101@roundup.psfhosted.org> Message-ID: <1564585494.88.0.0123302589614.issue34101@roundup.psfhosted.org> miss-islington added the comment: New changeset 29a3a33d99dae0106c6af9d0fd75a11bef26d15c by Miss Islington (bot) in branch '3.8': bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994) https://github.com/python/cpython/commit/29a3a33d99dae0106c6af9d0fd75a11bef26d15c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 12:59:50 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 31 Jul 2019 16:59:50 +0000 Subject: [docs] [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564592390.14.0.590115313857.issue37730@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 18:10:32 2019 From: report at bugs.python.org (David Heiberg) Date: Wed, 31 Jul 2019 22:10:32 +0000 Subject: [docs] [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564611032.42.0.420073166953.issue37730@roundup.psfhosted.org> Change by David Heiberg : ---------- keywords: +patch pull_requests: +14811 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 18:50:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 31 Jul 2019 22:50:02 +0000 Subject: [docs] [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564613402.01.0.942842519993.issue37730@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset ed5e8e06cbf766e89d6c58a882ee024abb5b2ed7 by Serhiy Storchaka (David H) in branch 'master': bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH-15062) https://github.com/python/cpython/commit/ed5e8e06cbf766e89d6c58a882ee024abb5b2ed7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 31 18:50:13 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 31 Jul 2019 22:50:13 +0000 Subject: [docs] [issue37730] NotImplemented is used instead of NotImplementedError in docs In-Reply-To: <1564576160.73.0.181501805035.issue37730@roundup.psfhosted.org> Message-ID: <1564613413.38.0.0846276225917.issue37730@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +14812 pull_request: https://github.com/python/cpython/pull/15063 _______________________________________ Python tracker _______________________________________ From stepaniukmv at gmail.com Wed Jul 31 10:10:32 2019 From: stepaniukmv at gmail.com (Valentin Stepaniuk) Date: Wed, 31 Jul 2019 17:10:32 +0300 Subject: [docs] https://docs.python.org/2/library/re.html Message-ID: <16417451564582232@sas2-a1efad875d04.qloud-c.yandex.net> https://docs.python.org/2/library/re.html The table for (?P...) is very missing row separators