[issue43044] Python 2.7 documentation links to 404 pages when the library was moved or renamed

2021-03-09 Thread Борис Верховский
Борис Верховский added the comment: This was fixed using redirects in nginx https://github.com/python/psf-salt/pull/201 -- resolution: out of date -> fixed ___ Python tracker <https://bugs.python.org/issu

[issue41975] Textwrap to conform to https://www.unicode.org/reports/tr14/tr14-45.html

2021-02-22 Thread Борис Верховский
Change by Борис Верховский : -- nosy: +boris ___ Python tracker <https://bugs.python.org/issue41975> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43212] Link to class and function source code on GitHub

2021-02-12 Thread Борис Верховский
New submission from Борис Верховский : We can use shpinx.ext.linkcode to link classes and functions/methods to their source code on GitHub from the documentation. See linked PR for screen shots. This is far from linking all the symbols in the docs, but it's gets quite a few. It would be

[issue43089] The optional argument to random.Random() is called "x" not "seed"

2021-01-31 Thread Борис Верховский
New submission from Борис Верховский : The documentation https://docs.python.org/3/library/random.html#random.Random says: > class random.Random([seed])¶ But in reality the parameter is called "x" not "seed" (CPython 3.9): >>> import random >>> ran

[issue43067] inspect.signature(bytes.hex) raises ValueError "builtin has invalid signature"

2021-01-29 Thread Борис Верховский
New submission from Борис Верховский : On Python 3.9 >>> import inspect >>> inspect.signature(bytes.hex) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.9/inspect.py", line 3118, in signature return Signa

[issue43044] Python 2.7 documentation links to 404 pages when the library was moved or renamed

2021-01-27 Thread Борис Верховский
New submission from Борис Верховский : 1. go to https://docs.python.org/2/library/stringio.html (note the "/2/") 2. click on "You should upgrade and read the Python documentation for the current stable release." at the top I expect to be sent to the Python 3 documentation

[issue40304] Classes created using type() don't need to explicitly inherit from object

2020-04-16 Thread Борис Верховский
New submission from Борис Верховский : As far as I can tell, passing `(object,)` and `()` as the `bases` parameter to the 3-argument version of type() produces the same result, because classes inherit from `object` in Python 3: >>> type('X', (object,), dict(a=1)).__base

[issue39558] Implement __len__() for itertools.combinations

2020-02-05 Thread Борис Верховский
New submission from Борис Верховский : and the other objects that have a straightforward formula for the number of elements they will generate. -- components: Library (Lib) messages: 361421 nosy: boris priority: normal severity: normal status: open title: Implement __len__() for

[issue38751] Document maximum JSON depth or remove it.

2019-11-08 Thread Борис Верховский
New submission from Борис Верховский : import json foo = {} for i in range(1000): json.dumps(foo) print(i) foo = {'bar': foo} Will error at 994. At a minimum this magic number should be documented, but it would be better if the json library could handle arbitrarily n

[issue24159] Misleading TypeError when pickling bytes to a file opened as text

2019-11-01 Thread Борис Верховский
Борис Верховский added the comment: As I said in issue38226, the error message you get when you try to pickle.load() a file opened in "r" mode instead of "rb" mode, UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start

[issue38226] pickle.dump and load error message when file isn't opened in binary mode are not useful

2019-11-01 Thread Борис Верховский
Change by Борис Верховский : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38226] pickle.dump and load error message when file isn't opened in binary mode are not useful

2019-11-01 Thread Борис Верховский
Change by Борис Верховский : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue38226> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38660] Checking if two regexes are equal should test if they are functionally equivalent

2019-11-01 Thread Борис Верховский
Борис Верховский added the comment: I saw two Python regexes, one derived from a regex in the standard library. There was a comment saying that they're interchangeable and I wanted to check if they were actually the same without having to read what all the regex symbols mean. Plus a

[issue38660] Checking if two regexes are equal should test if they are functionally equivalent

2019-10-31 Thread Борис Верховский
New submission from Борис Верховский : re.compile('([-_.a-zA-Z0-9]+)') == re.compile(r'([-\w.]+)') should return True because those are the same regex (\w is a-z, A-Z, 0-9 and the underscore). If you want to check if two regexes are identical you would compare the orig

[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-23 Thread Борис Верховский
Борис Верховский added the comment: You changed "control flow statements" to "flow control statements", which is an unrelated concept. -- nosy: +boris ___ Python tracker <https://bug

[issue38226] pickle.dump and load error message when file isn't opened in binary mode are not useful

2019-09-19 Thread Борис Верховский
New submission from Борис Верховский : pickle.load() and pickle.dump() take a file object as an argument. That file object must be opened in binary mode ("rb" or "wb"). If it's not, pickle raises a confusing error message. When pickle.dump()'ing to a file ope