[issue46110] `eval("-"*3000000 + "4")` in cmd causes hard crash
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue32758 -- nosy: +serhiy.storchaka, xtreak ___ Python tracker <https://bugs.python.org/issue46110> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46110] `eval("-"*3000000 + "4")` in cmd causes hard crash
Karthikeyan Singaravelan added the comment: https://bugs.python.org/issue42609 too -- ___ Python tracker <https://bugs.python.org/issue46110> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46124] Deprecation warning in zoneinfo module
New submission from Karthikeyan Singaravelan : zoneinfo module currently emits deprecation warnings due to API changes in importlib.resources ./python -Wonce -m test test_zoneinfo 0:00:00 load avg: 0.73 Run tests sequentially 0:00:00 load avg: 0.73 [1/1] test_zoneinfo /home/karthikeyan/stuff/python/cpython/Lib/zoneinfo/_tzpath.py:121: DeprecationWarning: open_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice. with resources.open_text("tzdata", "zones") as f: /home/karthikeyan/stuff/python/cpython/Lib/zoneinfo/_common.py:12: DeprecationWarning: open_binary is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice. return importlib.resources.open_binary(package_name, resource_name) /home/karthikeyan/stuff/python/cpython/Lib/zoneinfo/_tzpath.py:121: DeprecationWarning: open_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice. with resources.open_text("tzdata", "zones") as f: /home/karthikeyan/stuff/python/cpython/Lib/zoneinfo/_common.py:12: DeprecationWarning: open_binary is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice. return importlib.resources.open_binary(package_name, resource_name) == Tests result: SUCCESS == 1 test OK. Total duration: 376 ms Tests result: SUCCESS A fix would be to adapt the _legacy module changes inline like below patch though normalize_path is not public API and need to be inlined too. diff --git a/Lib/zoneinfo/_common.py b/Lib/zoneinfo/_common.py index 4c24f01bd7..bfe3fe4c3c 100644 --- a/Lib/zoneinfo/_common.py +++ b/Lib/zoneinfo/_common.py @@ -2,14 +2,15 @@ def load_tzdata(key): -import importlib.resources +from importlib.resources import files +from importlib._common import normalize_path components = key.split("/") package_name = ".".join(["tzdata.zoneinfo"] + components[:-1]) resource_name = components[-1] try: -return importlib.resources.open_binary(package_name, resource_name) +return (files(package_name) / normalize_path(resource_name)).open('rb') except (ImportError, FileNotFoundError, UnicodeEncodeError): # There are three types of exception that can be raised that all amount # to "we cannot find this key": diff --git a/Lib/zoneinfo/_tzpath.py b/Lib/zoneinfo/_tzpath.py index 672560b951..b1efe5d99e 100644 --- a/Lib/zoneinfo/_tzpath.py +++ b/Lib/zoneinfo/_tzpath.py @@ -111,14 +111,15 @@ def available_timezones(): determine if a given file on the time zone search path is to open it and check for the "magic string" at the beginning. """ -from importlib import resources +from importlib.resources import files +from importlib._common import normalize_path valid_zones = set() # Start with loading from the tzdata package if it exists: this has a # pre-assembled list of zones that only requires opening one file. try: -with resources.open_text("tzdata", "zones") as f: +with (files("tzdata") / normalize_path("zones")).open('r') as f: for zone in f: zone = zone.strip() if zone: -- components: Library (Lib) messages: 408851 nosy: jaraco, p-ganssle, xtreak priority: normal severity: normal status: open title: Deprecation warning in zoneinfo module type: behavior versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue46124> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46118] Migrate importlib.resources into a package
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46118> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46167] Parse assert (x == y, "Descriptive text") as statement params instead of a tuple
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46167> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46124] Deprecation warning in zoneinfo module
Karthikeyan Singaravelan added the comment: I just copied the implementation and normalize_path function was part of it. Looking into the implementation of normalize_path it validates the given argument to be a filename without any separator. I will leave it to Jason for a better understanding of the API and compatibility here. -- ___ Python tracker <https://bugs.python.org/issue46124> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46363] Two typos in versions 3.7 document translation of zh_CN
Karthikeyan Singaravelan added the comment: Translated documentation is maintained at https://github.com/python/python-docs-zh-cn/issues -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46363> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46448] TypedDict inspect.signature error
Karthikeyan Singaravelan added the comment: This could be due to issue40187 -- nosy: +serhiy.storchaka, xtreak ___ Python tracker <https://bugs.python.org/issue46448> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46577] Hostname spoofing via backslashes in URL
Karthikeyan Singaravelan added the comment: This seems to be similar to https://bugs.python.org/issue35748 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46577> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46576] test_peg_generator is extremely slow
Karthikeyan Singaravelan added the comment: See also issue46524 for a similar discussion. -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46576> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46524] test_peg_generator takes 8 minutes on Windows
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue46576 and https://github.com/python/cpython/pull/31015 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46524> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46688] Add sys.is_interned
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue34392 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46688> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46692] match case does not support regex
Karthikeyan Singaravelan added the comment: > There were ideas for exotic matchers such as IsInstance(), InRange(), > RegexMatchingGroup() and so on. https://www.python.org/dev/peps/pep-0622/#custom-matching-protocol The PEP has some mention about a similar use case in custom match protocol section. -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46692> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46690] create_autospec() doesn't respect configure_mock style kwargs
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46690> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46689] `list(FunctionType(a.gi_code, {})(0))` crashes Python
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue36956 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46689> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46690] create_autospec() doesn't respect configure_mock style kwargs
Karthikeyan Singaravelan added the comment: I guess the problem is that during the initial mock creation kwargs is passed so calling test_method immediately after mock creation raises ValueError. But as we loop through the attributes and create new child mock for the attributes the original configured mock for the method that raises ValueError is overridden by another object without the configuration info. Probably it makes sense to call configure_mock again after all children mock are constructed. Something like below works and I don't see any test failures in mock related test cases. index 2719f74d6f..585e875c95 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -2637,6 +2637,7 @@ def create_autospec(spec, spec_set=False, instance=False, _parent=None, f'[object={spec!r}]') is_async_func = _is_async_func(spec) _kwargs = {'spec': spec} +original_kwargs = kwargs if spec_set: _kwargs = {'spec_set': spec} elif spec is None: @@ -2740,6 +2741,9 @@ def create_autospec(spec, spec_set=False, instance=False, _parent=None, if isinstance(new, FunctionTypes): setattr(mock, entry, new) +if _is_instance_mock(mock): +mock.configure_mock(**original_kwargs) + return mock -- components: +Library (Lib) -Tests nosy: +cjw296, lisroach, mariocj89, michael.foord ___ Python tracker <https://bugs.python.org/issue46690> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46709> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46681] gzip.compress does not forward compresslevel to zlib.compress
Change by Karthikeyan Singaravelan : -- nosy: +lukasz.langa ___ Python tracker <https://bugs.python.org/issue46681> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46730] Please consider mentioning property without setter when an attribute can't be set
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue46730> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46752] Introduce task groups to asyncio and change task cancellation semantics
Change by Karthikeyan Singaravelan : -- nosy: +njs ___ Python tracker <https://bugs.python.org/issue46752> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46757] dataclasses should define an empty __post_init__
Change by Karthikeyan Singaravelan : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue46757> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.
Karthikeyan Singaravelan added the comment: This looks similar to a previous proposal https://discuss.python.org/t/enum-for-open-modes/2445 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46766> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46066] Deprecate keyword args syntax for TypedDict definition
Karthikeyan Singaravelan added the comment: This change has introduced deprecation warning in tests PYTHONWARNINGS=always ./python -Wall -X dev -m test.test_typing s./home/karthikeyan/stuff/python/cpython/Lib/test/test_typing.py:4589: DeprecationWarning: The kwargs-based syntax for TypedDict definitions is deprecated in Python 3.11, will be removed in Python 3.13, and may not be understood by third-party type checkers. TypedDict('Emp', _fields={'name': str, 'id': int}) ./home/karthikeyan/stuff/python/cpython/Lib/test/test_typing.py:4602: DeprecationWarning: The kwargs-based syntax for TypedDict definitions is deprecated in Python 3.11, will be removed in Python 3.13, and may not be understood by third-party type checkers. TypedDict('Hi', x=1) -- Ran 451 tests in 0.105s OK (skipped=1) -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46066> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46730] Please consider mentioning property without setter when an attribute can't be set
Karthikeyan Singaravelan added the comment: The test introduces a deprecation warning. It might be fixed by using raw string like the msg_format used in other test. ./python -Wall -m py_compile Lib/test/test_property.py Lib/test/test_property.py:345: DeprecationWarning: invalid escape sequence '\.' msg_format = "^property of 'PropertyUnreachableAttributeNoName\.cls' object {}$" -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46730> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46807] Wrong class __annotations__ when field name and type are equal
Karthikeyan Singaravelan added the comment: This looks similar to https://bugs.python.org/issue36363 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46807> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42760] inspect.iscoroutine returns False for asynchronous generator methods
Karthikeyan Singaravelan added the comment: This seems to be a duplicate of https://bugs.python.org/issue37190 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue42760> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46877] unittest.doModuleCleanups() does not exist
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46877> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46907] Update Windows and MacOS installer to SQLite 3.38.0.
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46907> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46918] The vulnerability is included in /lib/python3.9/ensurepip after python 3.9.2 is installed.
Karthikeyan Singaravelan added the comment: https://nvd.nist.gov/vuln/detail/CVE-2020-14422 Lib/ipaddress.py in Python through 3.8.3 improperly computes hash values in the IPv4Interface and IPv6Interface classes, which might allow a remote attacker to cause a denial of service if an application is affected by the performance of a dictionary containing IPv4Interface or IPv6Interface objects, and this attacker can cause many dictionary entries to be created. This is fixed in: v3.5.10, v3.5.10rc1; v3.6.12; v3.7.9; v3.8.4, v3.8.4rc1, v3.8.5, v3.8.6, v3.8.6rc1; v3.9.0, v3.9.0b4, v3.9.0b5, v3.9.0rc1, v3.9.0rc2. This CVE is listed as fixed in 3.9.0RC2 though you have added 3.9.2 and also mentioned ensurepip which doesn't seem to be relevant. Can you please add more detail over how we can reproduce the vulnerability in latest master or latest stable 3.9 release and how this is related to ensurepip. -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46918> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46903] Crash when setting attribute with string subclass as the name (--with-pydebug)
Karthikeyan Singaravelan added the comment: The PR introduced some deprecation warnings in tests. ./python -Wall -m test test_unicode 0:00:00 load avg: 1.54 Run tests sequentially 0:00:00 load avg: 1.54 [1/1] test_unicode /home/karthikeyan/stuff/python/cpython/Lib/test/test_unicode.py:3058: DeprecationWarning: Please use assertEqual instead. self.assertEquals(o.name, 1) /home/karthikeyan/stuff/python/cpython/Lib/test/test_unicode.py:3060: DeprecationWarning: Please use assertEqual instead. self.assertEquals(list(o.__dict__), [name]) /home/karthikeyan/stuff/python/cpython/Lib/test/test_unicode.py:3067: DeprecationWarning: Please use assertEqual instead. self.assertEquals(o.name2, 3) /home/karthikeyan/stuff/python/cpython/Lib/test/test_unicode.py:3069: DeprecationWarning: Please use assertEqual instead. self.assertEquals(list(o.__dict__), [name, name2]) == Tests result: SUCCESS == 1 test OK. Total duration: 952 ms Tests result: SUCCESS -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue46903> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47002] argparse - "expected one argument" when used -: in argument
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue47002> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47002] argparse - "expected one argument" when used -: in argument
Karthikeyan Singaravelan added the comment: Seems related to https://bugs.python.org/issue9334 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue47002> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47061] Deprecate modules listed in PEP 594
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue47061> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47117] repl segfaults on non utf-8 input
Karthikeyan Singaravelan added the comment: This looks similar to https://bugs.python.org/issue46206 -- nosy: +pablogsal, xtreak ___ Python tracker <https://bugs.python.org/issue47117> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47126] Update to canonical PEP URLs
Karthikeyan Singaravelan added the comment: Sphinx also changed the URL in https://github.com/sphinx-doc/sphinx/pull/10267 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue47126> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45171] stacklevel handling in logging module is inconsistent
Karthikeyan Singaravelan added the comment: The commit seems to emit a deprecation warning in test_logging. Probably the warning needs to be handled while setting trigger = self.logger.warn PYTHONWARNINGS=always ./python -Wall -m test test_logging 0:00:00 load avg: 1.63 Run tests sequentially 0:00:00 load avg: 1.63 [1/1] test_logging /home/karthikeyan/stuff/python/cpython/Lib/test/test_logging.py:5056: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead trigger('test', stacklevel=the_level) == Tests result: SUCCESS == 1 test OK. Total duration: 20.1 sec Tests result: SUCCESS -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue45171> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47160] round function is not working as expected
Karthikeyan Singaravelan added the comment: This is documented https://docs.python.org/3/library/functions.html#round > The behavior of round() for floats can be surprising: for example, > round(2.675, 2) gives 2.67 instead of the expected 2.68. This is not a bug: > it’s a result of the fact that most decimal fractions can’t be represented > exactly as a float. See Floating Point Arithmetic: Issues and Limitations for > more information. -- nosy: +xtreak resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue47160> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47191] inspect - getasyncgeneratorstate, getasyncgeneratorlocals
Karthikeyan Singaravelan added the comment: Seems to be duplicate of https://bugs.python.org/issue35759 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue47191> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47192] sys._getframe audit event has frame as argument in 3.8-3.10
Change by Karthikeyan Singaravelan : -- nosy: +steve.dower ___ Python tracker <https://bugs.python.org/issue47192> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, levkivskyi ___ Python tracker <https://bugs.python.org/issue37838> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20861] datetime argument handling inconsistent; should accept logical integers, not coercible values
Change by Karthikeyan Singaravelan : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue20861> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37852] Pickling doesn't work for name-mangled private methods
Change by Karthikeyan Singaravelan : -- nosy: +pitrou ___ Python tracker <https://bugs.python.org/issue37852> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37855] Compiling Python 3.7.4 with Intel compilers 2019
Karthikeyan Singaravelan added the comment: Seems related : https://bugs.python.org/issue35473 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37855> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37861] Install fails on MacOS X 10.6 with python >= 3.7.1
Change by Karthikeyan Singaravelan : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker <https://bugs.python.org/issue37861> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37865] tempfile.NamedTemporaryFile() raises exception on close() when file is absent
Karthikeyan Singaravelan added the comment: I think this is same as https://bugs.python.org/issue29573 . -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37865> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37867] docs says subprocess.run accepts a string but this does not work on linux
Change by Karthikeyan Singaravelan : -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue37867> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.
Change by Karthikeyan Singaravelan : -- Removed message: https://bugs.python.org/msg349997 ___ Python tracker <https://bugs.python.org/issue32545> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37894] [win] shutil.which can not find the path if 'cmd' include directory path and not include extension name
Change by Karthikeyan Singaravelan : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <https://bugs.python.org/issue37894> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37901] 21 tests fail when run on an IPv6-only host
Change by Karthikeyan Singaravelan : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue37901> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37873] unittest: execute tests in parallel
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37873> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37873] unittest: execute tests in parallel
Karthikeyan Singaravelan added the comment: See also https://mail.python.org/pipermail/python-ideas/2017-September/047100.html . One of the ideas in the thread was to move test.regrtest parallel execution functionality into unittest. I think this would be good to have it in unittest like support in pytest for -j. -- ___ Python tracker <https://bugs.python.org/issue37873> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37905] Remove NormalDist.overlap() or improve documentation?
Change by Karthikeyan Singaravelan : -- nosy: +steven.daprano ___ Python tracker <https://bugs.python.org/issue37905> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37911] Minor error in PEP567 code example
Karthikeyan Singaravelan added the comment: PEPs have their own GitHub issue tracker though I am not sure of edits to this PEP. GitHub : https://github.com/python/peps/issues . This can be closed as third party. -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37911> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37910] argparse wrapping fails with metavar="" (no metavar)
Change by Karthikeyan Singaravelan : -- nosy: +paul.j3 ___ Python tracker <https://bugs.python.org/issue37910> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37914] class timedelta, support the method hours and minutes in field accessors
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker <https://bugs.python.org/issue37914> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37915] Segfault in comparison between datetime.timezone.utc and putz.utc
Karthikeyan Singaravelan added the comment: I am adding 3.8 regression since the code works with 3.7 though it involves pytz. -- keywords: +3.8regression nosy: +belopolsky, p-ganssle, xtreak ___ Python tracker <https://bugs.python.org/issue37915> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc
Change by Karthikeyan Singaravelan : -- title: Segfault in comparison between datetime.timezone.utc and putz.utc -> Segfault in comparison between datetime.timezone.utc and pytz.utc ___ Python tracker <https://bugs.python.org/issue37915> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37915] Segfault in comparison between datetime.timezone.utc and pytz.utc
Karthikeyan Singaravelan added the comment: Seems this is due to issue37685 (dde944f9df) on bisecting datetime related changes. Adding Serhiy. I guess this could be marked as release blocker. Here is a simplified reproducer on extracting pytz.utc source [0] which is an object of simple subclass of datetime.tzinfo : import sys import datetime print(sys.version) class UTC(datetime.tzinfo): pass print(datetime.timezone.utc == UTC()) datetime.timezone.utc == datetime.tzinfo() # This also segfaults without a subclass and should be False # Segfaults ➜ cpython git:(dde944f9df) git checkout dde944f9df && make -s -j4 > /dev/null HEAD is now at dde944f9df bpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. (GH-14996) ➜ cpython git:(dde944f9df) ./python.exe ../backups/bpo37915.py 3.8.0b3+ (tags/v3.8.0b3-30-gdde944f9df:dde944f9df, Aug 22 2019, 17:55:14) [Clang 7.0.2 (clang-700.1.81)] [1]33988 segmentation fault ./python.exe ../backups/bpo37915.py # Commit before works fine ➜ cpython git:(dde944f9df) git checkout dde944f9df~1 && make -s -j4 > /dev/null Previous HEAD position was dde944f9df bpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. (GH-14996) HEAD is now at 4e402d37eb Correct description of HTTP status code 308. (GH-15098) ➜ cpython git:(4e402d37eb) ./python.exe ../backups/bpo37915.py 3.8.0b3+ (tags/v3.8.0b3-30-gdde944f9df:dde944f9df, Aug 22 2019, 17:55:14) [Clang 7.0.2 (clang-700.1.81)] False [0] https://github.com/stub42/pytz/blob/62f872054dde69e5c510094093cd6e221d96d5db/src/pytz/__init__.py#L256 -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue37915> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37917] Warning regarding collections ABCs still present in 3.9
Karthikeyan Singaravelan added the comment: Please see discussion at issue36953 and issue37324. It's currently blocked by Jinja that doesn't have a release with the fix to be used in CI. -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37917> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37922] inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes)
Karthikeyan Singaravelan added the comment: This looks like a duplicate of https://bugs.python.org/issue35113 . I have created a PR for the issue but didn't have time to debug the Windows issue. -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37922> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33830] Error in the output of one example in the httplib docs
Karthikeyan Singaravelan added the comment: Closing this since PRs have been merged. Thanks Aifu LIU for the report. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue33830> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37927] No Instantiation Restrictions for AbstractBaseClasses derived from builtin types
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue37927> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37927] No Instantiation Restrictions for AbstractBaseClasses derived from builtin types
Karthikeyan Singaravelan added the comment: This looks like a duplicate of issue35362. I would prefer closing one of them to keep the discussion in one place. This looks like a variant of this issue : issue35063 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37927> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37664] Update bundled pip and setuptools
Karthikeyan Singaravelan added the comment: Added lukasz since last beta is by Monday. -- nosy: +lukasz.langa ___ Python tracker <https://bugs.python.org/issue37664> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37940] Add xml.tool to pretty print XML like json.tool
New submission from Karthikeyan Singaravelan : Now that XML has pretty print option with issue14465 would it be handy to add a command line tool pretty printer similar to json.tool? This can be written as one-liner similar to json pretty printing but I think it's a good option and having a command line tool also helps in piping the output to other commands like filtering particular tags. I tried searching mailing list and couldn't find any discussions along these lines. There were some concerns around using external tools and in https://bugs.python.org/issue14465#msg324098 . I thought to open this to gather feedback. Branch : https://github.com/tirkarthi/cpython/tree/bpo14465-xml-tool python -m xml.tool /tmp/person.xml Idly Dosa # Get all breakfast tags python -m xml.tool /tmp/person.xml | grep breakfast Idly Dosa -- components: Library (Lib) messages: 350372 nosy: eli.bendersky, rhettinger, scoder, serhiy.storchaka, xtreak priority: normal severity: normal status: open title: Add xml.tool to pretty print XML like json.tool type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue37940> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'
Karthikeyan Singaravelan added the comment: I guess '\f' translates to \x0c and using raw string helps with this. >>> ord('\f') 12 >>> '\f' '\x0c' >>> var = "d:\stuff\morestuff\furtherdown\THEFILE.txt" >>> var 'd:\\stuff\\morestuff\x0curtherdown\\THEFILE.txt' >>> print(os.path.normpath(var)) d:\stuff\morestuff urtherdown\THEFILE.txt >>> os.path.normpath(var) 'd:\\stuff\\morestuff\x0curtherdown\\THEFILE.txt' # Use raw string >>> var = r"d:\stuff\morestuff\furtherdown\THEFILE.txt" >>> var 'd:\\stuff\\morestuff\\furtherdown\\THEFILE.txt' >>> print(os.path.normpath(var)) d:\stuff\morestuff\furtherdown\THEFILE.txt >>> os.path.normpath(var) 'd:\\stuff\\morestuff\\furtherdown\\THEFILE.txt' # Or escape back slashes >>> var = "d:\\stuff\\morestuff\\furtherdown\\THEFILE.txt" >>> var 'd:\\stuff\\morestuff\\furtherdown\\THEFILE.txt' >>> print(os.path.normpath(var)) d:\stuff\morestuff\furtherdown\THEFILE.txt -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37939> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23423] XPath Support in ElementTree doc omission
Change by Karthikeyan Singaravelan : -- nosy: +scoder ___ Python tracker <https://bugs.python.org/issue23423> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37940] Add xml.tool to pretty print XML like json.tool
Karthikeyan Singaravelan added the comment: Thanks Stefan for the link. XPath support sounds cool to me given that there is already support in stdlib. It could help with filtering using xml.tool itself instead of passing the output to another command to filter. My initial approach was to take it from command line --xpath argument and apply it to root node to pretty print the elements that match the XPath query. I have pushed the xpath changes also to https://github.com/tirkarthi/cpython/tree/bpo14465-xml-tool. I will try to add docstrings with xpath examples and tests to raise a PR for this. # Sample XML $ python -m xml.tool /tmp/person.xml Idly Dosa # Select person with name as Kate $ python -m xml.tool --xpath './person[@name="Kate"]' /tmp/person.xml Idly # Get all unavailable breakfast items python -m xml.tool --xpath './/breakfast[@available="false"]' /tmp/person.xml Dosa It could also mask the traceback to return error when the XPath is invalid and raises exception. # Error messages $ python -m xml.tool --xpath './person/[breakfast='Dosa']' /tmp/person.xml invalid predicate $ python -m xml.tool --xpath './/[breakfast=Dosa]' /tmp/person.xml invalid descendant -- ___ Python tracker <https://bugs.python.org/issue37940> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37940] Add xml.tool to pretty print XML like json.tool
Karthikeyan Singaravelan added the comment: There are several modules that expose some of their uses through command line like json.tool, zipfile, tarfile, gzip, webbrowser etc. The initial proposal was to expose the newly added indent function over the command line to provide the same guarantees and semantics. The lxml link lead me to have xpath search looks more useful to me. I understand that there was always discussion over writing few lines of Python code to do the task and to achieve it via command line. Recent addition were around * --json-lines added to json.tool in issue31553 * Add --fast, --best to gzip CLI in issue34969 There were similar discussion where improvements were merged on a case by case basis as seen to be a good use case. Some where more on the side of rejection like --indent to specify indentation length for json.tool in issue29636. There was no xml.tool in the past so there is more consideration to this. I see it good that xml also can expose some of its tasks via command line and not to be left just because it never had a command line interface from the start. The command line API also exposes only the functions already present so I see the maintenance cost to be minimal with indent and xpath search in this case. I will leave it to you as per the examples and use cases mentioned. If it needs a wider discussion on posting to python-ideas/discourse I would be okay to start a thread . -- ___ Python tracker <https://bugs.python.org/issue37940> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37944] About json.load(s
New submission from Karthikeyan Singaravelan : Can you please add a description to explain the report? -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37944> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37945] test_locale failing
Change by Karthikeyan Singaravelan : -- components: +Windows nosy: +eryksun, paul.moore, steve.dower, xtreak, zach.ware ___ Python tracker <https://bugs.python.org/issue37945> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37961] Tracemalloc traces do not include original stack trace length
Change by Karthikeyan Singaravelan : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue37961> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37962] Improve ISO 8601 timezone support in the datetime.fromisoformat() method
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker <https://bugs.python.org/issue37962> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37967] release candidate is not gpg signed (and missing release workflow)?
Change by Karthikeyan Singaravelan : -- nosy: +lukasz.langa, ned.deily ___ Python tracker <https://bugs.python.org/issue37967> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37972] unittest.mock.call does not chain __getitem__ to another _Call object
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37972> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36871] Misleading error from unittest.mock's assert_has_calls
Karthikeyan Singaravelan added the comment: Closing this as fixed since all PRs are merged. Thank you all :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36871> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37974] zip() docstring should say 'iterator' instead of 'object with __next__()'
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger type: -> behavior ___ Python tracker <https://bugs.python.org/issue37974> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37975] Typo in the documentation by C-API DateTime Objects¶
Karthikeyan Singaravelan added the comment: Thanks for the report. This was fixed in 82cd3cede804ca694fb0657fd985d5eff84a414f (https://bugs.python.org/issue31678). It was not merged to 3.5 at that time. Now 3.5 only accepts security fixes so I would propose closing this as duplicate of issue31678. -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37975> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37975] Typo in the documentation by C-API DateTime Objects¶
Change by Karthikeyan Singaravelan : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Incorrect C Function name for timedelta ___ Python tracker <https://bugs.python.org/issue37975> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37944] Adjacent escape character in json.load()
Change by Karthikeyan Singaravelan : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue37944> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37988] Issue found during language name processing in a list
Karthikeyan Singaravelan added the comment: Can you please attach the code snippet as text instead of screenshot so that it would be helpful to copy paste and run. In the issue please add a description of what's the output you are expecting and what's the actual output? Thanks -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37988> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37995] Multiline ast.dump()
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37995> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37992] Change datetime.MINYEAR to allow for negative years
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker <https://bugs.python.org/issue37992> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37943] mimetypes.guess_extension() doesn’t get JPG right
Karthikeyan Singaravelan added the comment: I think this is fixed with 2a99fd911ebeecedbb250a05667cd46eca4735b9 which would be included in 3.7.5 since this missed 3.7.4RC1 . There is also a test for this at https://github.com/python/cpython/blob/daa82d019c52e95c3c57275307918078c1c0ac81/Lib/test/test_mimetypes.py#L103 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue37943> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37997] Segfault when using pickle with exceptions and dynamic class inheritance
Change by Karthikeyan Singaravelan : -- nosy: +pitrou ___ Python tracker <https://bugs.python.org/issue37997> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38000] importlib can not handle module file names with periods
Change by Karthikeyan Singaravelan : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue38000> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38001] Unexpected behaviour of 'is' operator
Karthikeyan Singaravelan added the comment: This will emit a SyntaxWarning in Python 3.8 to use == instead of using is for literals. This is not a bug but an implementation detail over caching a range of integers at https://github.com/python/cpython/blob/1f21eaa15e8a0d2b0f78d0e3f2b9e5b458eb0a70/Objects/longobject.c#L19 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue38001> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38003] Incorrect "fixing" of isinstance tests for basestring
Karthikeyan Singaravelan added the comment: https://docs.python.org/3.0/whatsnew/3.0.html > The builtin basestring abstract type was removed. Use str instead. The str > and bytes types don’t have functionality enough in common to warrant a shared > base class. The 2to3 tool (see below) replaces every occurrence of basestring > with str. For a longer explanation of this and other changes you might find below link useful. In Python 2 str is used to represent both text and bytes. Hence to check the type is str in python 2 you have to check it to be basestring and then check it to be unicode. In python 3 all strings are unicode with str and bytes being two different types. Hence there is no basestring and unicode string since they are both unified to be str itself in Python 3. https://portingguide.readthedocs.io/en/latest/strings.html Hope this helps. -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue38003> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38004] Duplicated sections in changelog
Change by Karthikeyan Singaravelan : -- nosy: +ned.deily ___ Python tracker <https://bugs.python.org/issue38004> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38006] _PyFunction_Vectorcall() can segfault on process exit
Change by Karthikeyan Singaravelan : -- nosy: +jdemeyer ___ Python tracker <https://bugs.python.org/issue38006> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file
Change by Karthikeyan Singaravelan : -- nosy: +scoder ___ Python tracker <https://bugs.python.org/issue38011> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38012] Python Fuction min is case sentive ?
Karthikeyan Singaravelan added the comment: Here min uses the ASCII value of the letters for comparison. So for 'Infinity' 'I' (73) has the lowest value and for 'inFinity' 'F' (70) has the lowest value as seen below. >>> list(map(lambda c: (c, ord(c)), 'Infinity')) [('I', 73), ('n', 110), ('f', 102), ('i', 105), ('n', 110), ('i', 105), ('t', 116), ('y', 121)] >>> list(map(lambda c: (c, ord(c)), 'inFinity')) [('i', 105), ('n', 110), ('F', 70), ('i', 105), ('n', 110), ('i', 105), ('t', 116), ('y', 121)] -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue38012> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38018] Increase Code Coverage for multiprocessing.shared_memory
Change by Karthikeyan Singaravelan : -- nosy: +davin ___ Python tracker <https://bugs.python.org/issue38018> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38024] adding or subtracting decimals
Karthikeyan Singaravelan added the comment: Please include the text of the repl session in issue so that it would be easy to copy past and also more accessible. The issue is as below in the attached image. I guess this is due to floating point representation and has some possible solutions in this page : https://docs.python.org/3/tutorial/floatingpoint.html and https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate $ python3 Python 3.8.0b4 (v3.8.0b4:d93605de72, Aug 29 2019, 21:47:47) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 17.5 + 6169.90760 6186.90764999 >>> from decimal import Decimal >>> Decimal('17.5') + Decimal('6169.90760') Decimal('6186.90765') -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue38024> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37669] Make mock_open return per-file content
Karthikeyan Singaravelan added the comment: Using a side_effect is one way to achieve this currently if I understand the use case correctly. For every open side_effect will be called and hence it will return a new mock_open with read_data for the given filename used inside the context. This can handle nested calls since each will have it's own mock_open object. PR seems to do similar approach to refactor out to created predefined mock_open per filename and to return objects from a dictionary. from unittest.mock import mock_open, patch DEFAULT_MOCK_DATA = "default mock data" data_dict = {"file1": "data1", "file2": "data2"} def open_side_effect(name): return mock_open(read_data=data_dict.get(name, DEFAULT_MOCK_DATA))() with patch(f"{__name__}.open", side_effect=open_side_effect): with open("file1") as file1: assert file1.read() == "data1" with open("file2") as file2: assert file2.read() == "data2" with open("file1") as file3: assert file3.read(1) == "d" assert file1.read() == "" with open("defaultfile") as file4: assert file4.read() == "default mock data" -- ___ Python tracker <https://bugs.python.org/issue37669> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38034] Typo on logging.handlers.QueueListener documentation
Karthikeyan Singaravelan added the comment: Thanks for the report. Would you be able to make a PR for this? I think this is a good newcomer friendly issue. -- nosy: +vinay.sajip, xtreak versions: -Python 3.5, Python 3.6 ___ Python tracker <https://bugs.python.org/issue38034> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18049] Re-enable threading test on macOS
Karthikeyan Singaravelan added the comment: @aeros167 The build log failures due to timeout in the linked Azure pipeline failure seem to be similar to report at issue37245 -- nosy: +xtreak ___ Python tracker <https://bugs.python.org/issue18049> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37383] call count in not registered in AsyncMock till the coroutine is awaited
Karthikeyan Singaravelan added the comment: I just checked the behavior with asynctest. The _mock_call implementation where the call is recorded is similar except that in asynctest it's a synchronous function [0] and in AsyncMock it's an async function [1] thus needs to be awaited to register call count. Agreed it's more of a confusion over does call mean a function call or something that should be recorded only once awaited given that there is call_count and await_calls. But would be good to have this documented that call_count is recorded only after await. Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import asynctest >>> m = asynctest.CoroutineMock() >>> m(1) .proxy at 0x1023c8b88> >>> m.mock_calls [call(1)] Python 3.9.0a0 (heads/master:a6563650c8, Sep 9 2019, 14:53:16) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from unittest.mock import AsyncMock >>> m = AsyncMock() >>> m.mock_calls [] [0] https://github.com/Martiusweb/asynctest/blob/d1d47ecb8220371284230d6d6fe642649ef82ab2/asynctest/mock.py#L584 [1] https://github.com/python/cpython/blob/19052a11314e7be7ba003fd6cdbb5400a5d77d96/Lib/unittest/mock.py#L2120 -- ___ Python tracker <https://bugs.python.org/issue37383> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38064] Agen Poker Online Terpercaya
Karthikeyan Singaravelan added the comment: This looks like spam to me. Feel free to reopen the issue if incorrect with a better description and example of the problem. -- nosy: +xtreak resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38064> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37383] call count in not registered in AsyncMock till the coroutine is awaited
Karthikeyan Singaravelan added the comment: > I wonder if `await_count` is really necessary, since it is essentially the > same as `call_count`. Would it be too late or confusing to remove it now? IMO if we are to document that mock_calls is recorded over await then we can have both call_count and await_count because if users start using AsyncMock then they can keep using the call_* functions. Removing it would mean there are also other counterparts as below to make sure we keep or remove all to remove discrepancy. I am more leaned towards keeping them and document it. >>> m.await m.await_args m.await_args_list m.await_count m.awaited >>> m.call m.call_args m.call_args_list m.call_count m.called With respect to removal I think the window is still open till the 3.8.0RC1. -- ___ Python tracker <https://bugs.python.org/issue37383> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com