[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2021-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is worth to backport it to 3.9. It looks to me that it fixes also support of strings containing NUL. It would be nice to add corresponding tests for this. You can also add this in the NEWS entry for this issue. -- status: closed

[issue43526] Programmatic management of BytesWarning doesn't work for native triggers.

2021-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not against documenting the behavior of -b and BytesWarning clearly. I don't think that anyone would be against. Just somebody have to provide a PR. Explicitly repr-ing a bytes instance does not produce a warning, and never produced, so I

[issue44831] Inconsistency between datetime.now() and datetime.fromtimestamp(time.time(), None)

2021-08-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +belopolsky, p-ganssle, vstinner ___ Python tracker <https://bugs.python.org/issue44831> ___ ___ Python-bugs-list mailin

[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2021-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8c07fef867707694c9f2fcee4d7a9563ad78ed14 by Erlend Egeberg Aasland in branch '3.9': [3.9] bpo-43853: Handle sqlite3_value_text() errors (GH-25422). (GH-27627) https://github.com/python/cpython/commit/8c07fef867707694c9f2fcee4d7a95

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are problems with clearing all ignored deprecation filters. We can want to ignore warnings in narrower or wider scope: per-method, per-class, per-module. We should use the warnings.catch_warnings() context manager for restoring filters in the

[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2021-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about new tests and NEWS update? -- ___ Python tracker <https://bugs.python.org/issue43853> ___ ___ Python-bugs-list m

[issue44839] Convert Python exceptions to appropriate SQLite error codes

2021-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7d747f26e6cac9f6891d475f3443441ce947697b by Serhiy Storchaka in branch 'main': bpo-44839: Raise more specific errors in sqlite3 (GH-27613) https://github.com/python/cpython/commit/7d747f26e6cac9f6891d475f344344

[issue44839] Convert Python exceptions to appropriate SQLite error codes

2021-08-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44822] [sqlite3] Do not truncate results of user functions and aggregates on the first NUL

2021-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c352412123140e79dcce6188d17e3e6dbc3f4144 by Erlend Egeberg Aasland in branch '3.9': [3.9] bpo-44822: Don't truncate `str`s with embedded NULL chars returned by `sqlite3` UDF callbacks (GH-27588). (GH-27639) https://github.com

[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: clear_ignored_deprecations() does not know whether filters were added in setUp(), setUpClass(), setUpModule() or just in a particular method. We should use teadDown*() or add*Cleanup() to clean up at appropriate level

[issue44859] Improve some sqlite3 errors

2021-08-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : * MemoryError is now raised instead of sqlite3.Warning when memory is not enough for encoding statement to UTF-8 in Connection.__call__() and Cursor.execute(). * UnicodEncodeError is now raised instead of sqlite3.Warning when statement contains

[issue44859] Improve some sqlite3 errors

2021-08-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is also a problem with the sqlite3.InterfaceError raised when bind parameters with message "Error binding parameter XXX - probably unsupported type." It is raised not only for unsupported types, but: * For too large integers (outside of th

[issue44859] Improve some sqlite3 errors

2021-08-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26148 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27654 ___ Python tracker <https://bugs.python.org/issu

[issue44859] Improve some sqlite3 errors

2021-08-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Entries 3 and 4 are about Cursor.executescript(), not Cursor.execute(). -- ___ Python tracker <https://bugs.python.org/issue44

[issue43526] Programmatic management of BytesWarning doesn't work for native triggers.

2021-08-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > And though I did not check, I expect the `-b` flag exists mostly because of > the performance impact of the warning any time bytes are checked for > equality, but surely that impact would be limited and probably not very > rele

[issue44861] csv.writer stopped to quote values with escapechar with csv.QUOTE_MINIMAL in Python 3.10

2021-08-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The 3.9 behavior is incorrect: write 'spam\\eggs', read 'spameggs'. The 3.10 behavior is correct: write 'spam\\eggs', read 'spam\\eggs'. What is your problem exactly? -- nosy: +serhiy.storchaka __

[issue44859] Improve some sqlite3 errors

2021-08-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0eec6276fdcdde5221370d92b50ea95851760c72 by Serhiy Storchaka in branch 'main': bpo-44859: Improve error handling in sqlite3 and and raise more accurate exceptions. (GH-27654) https://github.com/python/cpyt

[issue42053] fwalk: incorrect boolean test for non-fd arguments

2021-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I confirm that fwalk() does not support integer first argument. This check is misleading. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue42

[issue42053] fwalk: incorrect boolean test for non-fd arguments

2021-08-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26158 pull_request: https://github.com/python/cpython/pull/27669 ___ Python tracker <https://bugs.python.org/issue42

[issue44866] Inconsistent Behavior of int()

2021-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following your long example, it seems to me that all works as you expected. Raise an exception if you expect exception, and does raise it if you expect no exception. I may miss something, what exactly does not work as you expected? -- nosy

[issue42053] fwalk: incorrect boolean test for non-fd arguments

2021-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2b496e79293a8b80e8ba0e514e186b3b1467b64b by Serhiy Storchaka in branch 'main': bpo-42053: Remove misleading check in os.fwalk() (GH-27669) https://github.com/python/cpython/commit/2b496e79293a8b80e8ba0e514e186b

[issue42053] fwalk: incorrect boolean test for non-fd arguments

2021-08-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 -Python 3.9 ___ Python tracker <https://bugs.python.or

[issue25782] CPython hangs on error __context__ set to the error itself

2021-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My argument is the loop creation should be prevented at first place. PyErr_SetObject() is not the only C code that can hang or overflow the stack when iterate a loop. Preventing creation of the loop will fix all other code that iterate the __context__

[issue44866] Inconsistent Behavior of int()

2021-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I understand your confusion John. The fact is that int() serves two functions. If argument is a number, it truncates it to an integer. If argument is a string, it parses the string representation of integer (not necessary decimal). For details see https

[issue44854] Add .editorconfig to the root directory

2021-08-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka nosy_count: 2.0 -> 3.0 pull_requests: +26175 pull_request: https://github.com/python/cpython/pull/27689 ___ Python tracker <https://bugs.python.org/issu

[issue44854] Add .editorconfig to the root directory

2021-08-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 058fb35b57ca8c5063d16ec818e668b3babfea65 by Serhiy Storchaka in branch 'main': bpo-44854: Remove trailing whitespaces (GH-27689) https://github.com/python/cpython/commit/058fb35b57ca8c5063d16ec818e668

[issue7615] unicode_escape codec does not escape quotes

2021-08-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nothing was changed. Backslashes in your output are backslashes in the bytes object repr. >>> print('a\'b"c\'\'\'d"""e'.encode('unicode_escape').decode()) a&#x

[issue44902] [Doc] Changing 'Mac OS X'/'OS X' to 'macOS'

2021-08-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Isn't it a duplicate of issue41203? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/is

[issue44923] Unittest incorrect result with argparse.ArgumentError in self asserRaises context

2021-08-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You raise ArgumentTypeError, but expect ArgumentError. ArgumentTypeError is not a subclass of ArgumentError. -- nosy: +serhiy.storchaka versions: +Python 3.8 -Python 3.6 ___ Python tracker <ht

[issue44920] Support UUIDv6, UUIDv7, and UUIDv8 from the new version of RFC4122

2021-08-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a new feature, and we usually do not backport new features to old Python versions, so it can only be included in Python 3.11 (backports can be provided by third-party libraries). Do you want to create a PR? -- nosy: +serhiy.storchaka

[issue44915] Python keywords as string keys in TypedDict

2021-08-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can use the functional form of TypedDict: C = TypedDict("C", {"to": int, "from": int}) -- nosy: +serhiy.storchaka ___ Python tracker <h

[issue44931] Add "bidimap" to collections library: a simple bidirectional map

2021-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is BiDiMap included in the Java SDK? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue44

[issue44930] super-Matlab-style ranged list literal initialization

2021-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Steven. Before range() and enumerate() were introduced there were discussions about introducing dedicated syntax. But it was decided that builtin functions are more preferable. range() was improved in Python 3, so you do not need to waste

[issue44932] `issubclass` and `isinstance` doesn't check for all 2nd argument types

2021-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not specific to typing. >>> isinstance(1, (int, 1)) True >>> isinstance(1, (1, int)) Traceback (most recent call last): File "", line 1, in TypeError: isinstance() arg 2 must be a type or tuple of types >&g

[issue44938] Expose PyErr_ChainExceptions in the stable API

2021-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As the original author of _PyErr_ChainExceptions() (issue21715) I am not sure that its name and signature are optimal. It did not matter while it was internal function because we could change them at any moment, but for public API the design should be

[issue44943] Integrate PyHyphen into the textwrap module?

2021-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Many years ago I write highly optimized hyphenation module (as a part of OrnamentBook project https://sourceforge.net/projects/pybookreader/files/OrnamentBook/). I could contribute the code to the stdlib. But the problem is that the algorithm depends on

[issue44955] Method stopTestRun() is not always called for skipped tests

2021-08-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Method startTestRun() is always called for the TestResult object implicitly created by TestCase.defaultTestResult() when no TestResult object is passed to TestCase.run(). But method stopTestRun() is not always called in pair with startTestRun() for

[issue44955] Method stopTestRun() is not always called for skipped tests

2021-08-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26295 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27831 ___ Python tracker <https://bugs.python.org/issu

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Tests are needed. -- resolution: fixed -> stage: resolved -> test needed status: closed -> open ___ Python tracker <https://bugs.python.or

[issue44942] Add number pad enter bind to TK's simpleDialog

2021-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Tk does not bind KP_Enter in standard TK dialogs. I do not think we should introduce additional discrepancy between dialogs implemented in Tk and Python. Please file a feature request for Tk. If they add a binding for KP_Enter we will follow them

[issue44524] __name__ attribute in typing module

2021-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are still cryptic TypeError messages for Annotated: >>> class X(Annotated[int | float, "const"]): pass ... Traceback (most recent call last): File "", line 1, in TypeError: metaclass conflict: the metaclass of a

[issue44524] __name__ attribute in typing module

2021-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are some side effects of setting _name. In 3.9: >>> class X(Annotated[int, (1, 10)]): pass ... >>> X.__mro__ (, , ) In 3.10: >>> class X(Annotated[int, (1, 10)]): pass ... >>> X.__mro__ (, , , ) Now a subclas

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +andrei.avk, defreng, ezio.melotti, michael.foord, rbcollins, terry.reedy, xtreak, zach.ware ___ Python tracker <https://bugs.python.org/issue41

[issue44923] Unittest incorrect result with argparse.ArgumentError in self asserRaises context

2021-08-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44956] curses getch returns wrong value

2021-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Your terminal emulator does not support this key. I tested it on Konsole and it returned 27. But on XTerm and on the Linux virtual console I get the expected result. -- nosy: +serhiy.storchaka ___ Python

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Every new feature should be documented and covered by tests (unless it is very trivial or it is very difficult to write a test for it). -- ___ Python tracker <https://bugs.python.org/issue41

[issue44940] Hint the use of non-capturing group in re.findall() documentation

2021-08-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 3.0 -> 4.0 pull_requests: +26309 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27849 ___ Python tracker <https://bugs.p

[issue44547] fraction.Fraction does not implement __int__.

2021-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fraction.__int__ = Fraction.__trunc__ may not work because __trunc__() can return any object with __index__, while __int__ should return an exact int (not even an int subclass). -- ___ Python tracker <ht

[issue44524] __name__ attribute in typing module

2021-08-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26319 pull_request: https://github.com/python/cpython/pull/27861 ___ Python tracker <https://bugs.python.org/issue44

[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 7.0 -> 8.0 pull_requests: +26324 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27870 ___ Python tracker <https://bugs.p

[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +asyncio type: -> behavior versions: -Python 3.8 ___ Python tracker <https://bugs.python.org/issue44968> ___ _

[issue44524] __name__ attribute in typing module

2021-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4ceec495598e78f0776dd46d511dcc612a434dc3 by Serhiy Storchaka in branch 'main': bpo-44524: Do not set _name of _SpecialForm without need (GH-27861) https://github.com/python/cpython/commit/4ceec495598e78f0776dd46d511dcc

[issue44969] Subclassing of annotated types does not always work

2021-08-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : It works only with simple types >>> class X(Annotated[list, 'annotation']): pass ... But not with type aliases >>> class X(Annotated[List[int], 'annotation']): pass ... Traceback (most recent call last): File &q

[issue44969] Subclassing of annotated types does not always work

2021-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that __mro_entries__() for annotated types should return the result of __mro_entries__() for the original type if it has __mro_entries__. But details can be complicated, especially if user-defined generic types are involved. Alternatively

[issue39827] setting a locale that uses comma as decimal separator breaks tkinter.DoubleVar

2021-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue12558 which exposes the other side of the same issue. Las time I looked at it, it was inherently a Tcl issue. In some places it uses locale-dependent formatting of floating point numbers, but locale-unaware parsing, or vice versa

[issue44524] __name__ attribute in typing module

2021-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5bd27c3be5734e158f67ff86087a977a25d89161 by Miss Islington (bot) in branch '3.10': bpo-44524: Do not set _name of _SpecialForm without need (GH-27861) (GH-27871) https://github.com/python/cpyt

[issue44970] Re-examine complex pow special case handling

2021-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The OverflowError should only be raised if finite arguments produce infinite result. Py_ADJUST_ERANGE2 is used improperly. But after fixing this error I get (nan+infj) for z**1, the same as for z*1. -- nosy: +serhiy.storchaka

[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 585390fdd8661b4bc08bdfc27551292da9b4b9b8 by Serhiy Storchaka in branch 'main': bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870) https://github.com/python/cpython/commit/585390fdd8661b4bc08bdfc2755129

[issue44940] Clarify the documentation of re.findall()

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 64f9e7b19dc1603fcbd07c17c9860085b9d21465 by Serhiy Storchaka in branch 'main': bpo-44940: Clarify the documentation of re.findall() (GH-27849) https://github.com/python/cpython/commit/64f9e7b19dc1603fcbd07c17c98600

[issue44955] Method stopTestRun() is not always called for skipped tests

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a9640d75531d6cbbfd254b65435f238c26bf5cd9 by Serhiy Storchaka in branch 'main': bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831) https://github.com/python/cpyt

[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report Ryan. Indeed, there was a bug introduced during refactoring (one unneeded "yield" was kept), and there was a bug before refactoring (the transport was not closed). I'll open a new issue about "Unkno

[issue44974] Warning about "Unknown child process pid" in test_asyncio

2021-08-22 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Ryan Mast reported about a warning about "Unknown child process pid" after finishing test_asyncio (see msg400018 and https://github.com/python/cpython/pull/27870#issuecomment-903072119 for details). I cannot reproduce it locally. Ryan, coul

[issue41620] Python Unittest does not return results object when the test is skipped

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a bug because there is a difference between the following cases: @skip("skipped") def test1(self): ... @other_decorator @skip("skipped") def test2(self): ... def test2(self): se

[issue44977] Deprecate delegation of int to __trunc__?

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Completely agree. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue44977> ___ ___ Python-bug

[issue44977] Deprecate delegation of int to __trunc__?

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think that math.trunc() for UUID or IP4Address makes sense. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44955] Method stopTestRun() is not always called for skipped tests

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4e5162fd369baf25dd16a42ccd0fa7756744f4d0 by Miss Islington (bot) in branch '3.9': bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831) (GH-27882) https://github.com/python/cpyt

[issue44940] Clarify the documentation of re.findall()

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d006392245c904547e5727144235c2f9d7948e96 by Miss Islington (bot) in branch '3.9': bpo-44940: Clarify the documentation of re.findall() (GH-27849) (GH-27880) https://github.com/python/cpython/commit/d006392245c904547e5727144235c2

[issue44940] Clarify the documentation of re.findall()

2021-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 ___ Python tracker <https://bugs.python.or

[issue44955] Method stopTestRun() is not always called for skipped tests

2021-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41322] unittest: deprecate test methods returning non-None values

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b1db308c6114bb18c06656c94c0ffa73ba954977 by andrei kulakov in branch 'main': bpo-41322: Add unit tests for deprecation of test return values (GH-27846) https://github.com/python/cpython/commit/b1db308c6114bb18c06656c94c0ffa

[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Functions registered with TestCase.addClassCleanup are called because TestCase has default implementation of tearDownClass. But you can suppress it by setting tearDownClass = None. So there is a similar issue with class cleanup functions. -- nosy

[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.11 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue43913> ___ ___ Python-bugs-list mailin

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not a bug in archivers, it is just a broken archive. The ZIP archive contains a central directory which lists all files in the archive, so the archiver can just read the central directory without reading all archive to get the list of files. There

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the zipped file was created by zipfile module of Python, it is a bug. Could you reproduce the sequence of actions that creates such broken archive? -- ___ Python tracker <https://bugs.python.org/issue41

[issue24234] Should we define complex.__complex__ and bytes.__bytes__?

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Defining complex.__complex__ and bytes.__bytes__ would not solve anything, because >>> issubclass(int, SupportsComplex) False >>> issubclass(float, SupportsComplex) False >>> issubclass(bytearray, SupportsBytes) Fals

[issue44984] Rewrite test_null_strings in _testcapi

2021-08-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : test_null_strings in Modules/_testcapimodule.c was initially added in 7580146b5c7025976f0907a9893e01dc3d3d3457 for testing PyObject_Str(NULL) and PyObject_Unicode(NULL). PyObject_Unicode() was removed in 3.0, so now the test calls PyObject_Str(NULL

[issue44984] Rewrite test_null_strings in _testcapi

2021-08-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26362 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27904 ___ Python tracker <https://bugs.python.org/issu

[issue44981] wildcard imports should normalise names in `__all__`

2021-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should getattr() normalize attribute name? If no, it will produce surprises further along the way. If yes, it will add significant overhead. Even star-import can get significant impact. -- nosy: +serhiy.storchaka

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, it cannot be fixed in marshal itself. s = {("string", 1), ("string", 2), ("string", 3)} All tuples contain references to the same string. The first serialized tuple will contain serialization of the string, all other will

[issue43598] test_subprocess logs multiple ResourceWarning warnings

2021-08-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Resource warnings in test_subprocess ___ Python tracker <https://bugs.python

[issue38912] test_asyncio altered the execution environment

2021-08-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue38912> ___ ___ Python-bugs-list mailing list Un

[issue34990] year 2038 problem in compileall.py

2021-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bb21e28fd08f894ceff2405544a2f257d42b1354 by Ammar Askar in branch 'main': bpo-34990: Treat the pyc header's mtime in compileall as an unsigned int (GH-19708) https://github.com/python/cpython/commit/bb21e28fd08f894ceff240554

[issue44524] __name__ attribute in typing module

2021-08-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 23384a1749359f0ae7aaae052073d44b59e715a1 by Ken Jin in branch 'main': bpo-44524: Don't modify MRO when inheriting from typing.Annotated (GH-27841) https://github.com/python/cpython/commit/23384a1749359f0ae7aaae052

[issue45003] Documentation wrote __div__ instead of __truediv__

2021-08-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: https://github.com/python/cpython -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue45003> ___ ___

[issue45003] Documentation wrote __div__ instead of __truediv__

2021-08-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 806e25fd3173a80021e6df87b81263b5f6056f38 by Objectivitix in branch 'main': bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951) https://github.com/python/cpython/commit/806e25fd3173a80021e6df87b81263

[issue45003] Documentation wrote __div__ instead of __truediv__

2021-08-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26411 pull_request: https://github.com/python/cpython/pull/27964 ___ Python tracker <https://bugs.python.org/issue45

[issue45010] Remove support of special method __div__ in unittest.mock

2021-08-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Special method __div__ was used in Python 2, but is not used in Python 3. I think it can be removed from the list of supported special methods in unittest.mock. -- components: Library (Lib) messages: 400314 nosy: michael.foord, serhiy.storchaka

[issue45010] Remove support of special method __div__ in unittest.mock

2021-08-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was kept in the previous clean up in issue23641 because I had doubts. But now I do not see reasons to keep it. Rather keeping it can confuse users. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45010] Remove support of special method __div__ in unittest.mock

2021-08-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26412 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27965 ___ Python tracker <https://bugs.python.org/issu

[issue45003] Documentation wrote __div__ instead of __truediv__

2021-08-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 46970fdd8ddc18823519d1e1c57136f6bc2a8dac by Miss Islington (bot) in branch '3.9': bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951) (GH-27962) https://github.com/python/cpyt

[issue45003] Documentation wrote __div__ instead of __truediv__

2021-08-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ea39933b4b76da35874be79f2384e24b38c37351 by Miss Islington (bot) in branch '3.10': bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951) (GH-27963) https://github.com/python/cpyt

[issue45003] Documentation wrote __div__ instead of __truediv__

2021-08-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.or

[issue45011] tests fail when using pure-python instead of _asyncio

2021-08-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka title: tests fail when using pure-python instead of _asycio -> tests fail when using pure-python instead of _asyncio ___ Python tracker <https://bugs.python.org/issu

[issue45011] tests fail when using pure-python instead of _asyncio

2021-08-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26415 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27968 ___ Python tracker <https://bugs.python.org/issu

[issue45011] tests fail when using pure-python instead of _asyncio

2021-08-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not know why asyncio.events._get_running_loop was patched in FunctionalTestCaseMixin. -- nosy: +lukasz.langa, pablogsal priority: normal -> release blocker type: -> behavior versions: +Python 3.10, Python 3.11, Pyth

[issue45026] More compact range iterator

2021-08-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR provides more compact implementation of the range iterator. It consumes less memory and produces smaller pickles. It is presumably faster because it performs simpler arithmetic operations on iteration (no multiplications

[issue45026] More compact range iterator

2021-08-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26433 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27986 ___ Python tracker <https://bugs.python.org/issu

[issue45026] More compact range iterator

2021-08-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Currently the range iterator contains four integers: index, start, step and len. On iteration index is increased until achieve len, the result is calculated as start+index*step. In the proposed PR the range iterator contains only three integers: index was

[issue45026] More compact range iterator

2021-08-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: step can be negative. So the condition should be more complex: ((r->stop > 0) ? (result < r->stop) : (result > r->stop)). And it would look much more complex for longrangeiterobject. --

[issue45029] tkinter doc, hello world example - quit button clobbers method

2021-08-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I get different result: >>> app.quit >>> help(app.quit) Help on Button in module tkinter object: class Button(Widget) | Button(master=None, cnf={}, **kw) | | Button widget. | ... -- nosy:

<    11   12   13   14   15   16   17   18   19   20   >