[issue45348] math.log(243, 3) value issue

2021-10-02 Thread Tim Peters
Tim Peters added the comment: CPython's log() builds on the platform C's libm facilities, and C simply doesn't define primitives capable of producing a worst-case < 1 ulp error 2-argument log in reasonable time. Instead we have to build it out of two separate log operations, and a division.

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-02 Thread Ned Deily
New submission from Ned Deily : ./configure supports using the system or third-party-supplied pkg-config utility to find or override the default location of header and library files when building a few C extensions in the standard library, namely from OpenSSL for the _ssl module, libffi for

[issue45302] 10 built-in functions need non-None .__text_signature__

2021-10-02 Thread Éric Araujo
Change by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Inada Naoki
Inada Naoki added the comment: > So overhead is around 2%. And this 2% is problem only for "creating function > with annotation, without docstring, never called, in loop" situation. My bad, "creating function with docstring, without annotation, nevercalled in loop" situation. --

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Inada Naoki
Inada Naoki added the comment: And as a bonus, creating function without docstring is little faster. ``` $ cpython/release/bin/pyperf timeit --duplicate=100 "def f(): pass" . Mean +- std dev: 62.5 ns +- 1.2 ns $ load-none-remove-docstring/release/bin/pyperf timeit

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Inada Naoki
Inada Naoki added the comment: > The difference 5.1 ns is the cost of additional LOAD_CONST. It is around 8% > (but can be 12% or 2%). The cost of setting docstring externally will be the > same. I don't have bare metal machine for now so I don't know why annotation is so slow. But cost

[issue45349] configparser.ConfigParser: 2 newlines at end of file (EOF)

2021-10-02 Thread Martin Panter
Martin Panter added the comment: Looks like the same as Issue 32917. I presume there are two newlines at the end of the file because there are two newlines following every config section. IMO this is a minor cosmetic annoyance, just like writing a key with an empty value gets you a trailing

[issue45348] math.log(243, 3) value issue

2021-10-02 Thread Dennis Sweeney
Change by Dennis Sweeney : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45349] configparser.ConfigParser: 2 newlines at end of file (EOF)

2021-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: Please provide code that we can run that shows the problem. -- nosy: +eric.smith ___ Python tracker ___

[issue45348] math.log(243, 3) value issue

2021-10-02 Thread Dennis Sweeney
Dennis Sweeney added the comment: It turns out that the current implementation is already very good, within 1ulp in 99.85% of cases and perfect (as good as floats can get) in 65% of cases. So my thinking would be to leave the implementation as is.

[issue45349] configparser.ConfigParser: 2 newlines at end of file (EOF)

2021-10-02 Thread Boštjan Mejak
New submission from Boštjan Mejak : In every Python version that I've tested, writing a config.ini file (utilizing configparser.ConfigParser), the result is such that the config.ini file has 2 newlines at the end of the file. The problem is that source code editors like Sublime Text, or IDEs

[issue43329] Multiprocessing Manager Client Not Reconnecting

2021-10-02 Thread Michael L. Boom
Michael L. Boom added the comment: Is there anything that I can do, or the company I work for can do, to get a developer assigned to fix this bug? It is hard to use multiprocessing remote method calls without this bug being fixed. The software wouldn't be robust enough for production.

[issue45348] math.log(243, 3) value issue

2021-10-02 Thread Dennis Sweeney
Dennis Sweeney added the comment: According to https://docs.python.org/3/library/math.html#math.log : """With two arguments, return the logarithm of x to the given base, calculated as log(x)/log(base).""" Indeed, this is consistent with that: >>> from math import log >>> log(243)

[issue45348] math.log(243, 3) value issue

2021-10-02 Thread Eddie Caraballo
Eddie Caraballo added the comment: Issue seems to be with all power of 3 divisible by 5 (3**5, 3**10, etc). Powers of 7 also seem to have the issue, where math.log(7**5, 7) = 5.01 -- ___ Python tracker

[issue45348] math.log(243, 3) value issue

2021-10-02 Thread Eddie Caraballo
New submission from Eddie Caraballo : math.log(243, 3) should result in 5.0, but instead results in 4.... Can be worked around via base conversion (math.log10(243) / math.log10(3)) -- components: Library (Lib) messages: 403065 nosy: eddiemichaelc priority: normal severity: normal

[issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone

2021-10-02 Thread Ian Fisher
Ian Fisher added the comment: Substitute "UTC offset" for "time zone" in my comment above. I have attached a minimal Python program demonstrating data loss from this bug. -- Added file: https://bugs.python.org/file50324/timestamp.py ___ Python

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

2021-10-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Related: https://bugs.python.org/issue45347 -- ___ Python tracker ___ ___ Python-bugs-list

[issue45347] datetime subject to rounding?

2021-10-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Related: https://bugs.python.org/issue44831 -- nosy: +rhettinger ___ Python tracker ___ ___

[issue45346] Some "truthy" crept in

2021-10-02 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45346] Some "truthy" crept in

2021-10-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 72089f33c0aed391f047b1cbaf19d8da1e51c167 by Miss Islington (bot) in branch '3.10': bpo-45346: Keep docs consistent regarding true and false values (GH-28697) (GH-28698)

[issue45346] Some "truthy" crept in

2021-10-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset db91b058d5d4fbff4185982095d90fe6a2741aed by Raymond Hettinger in branch 'main': bpo-45346: Keep docs consistent regarding true and false values (GH-28697) https://github.com/python/cpython/commit/db91b058d5d4fbff4185982095d90fe6a2741aed

[issue45346] Some "truthy" crept in

2021-10-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27057 pull_request: https://github.com/python/cpython/pull/28698 ___ Python tracker

[issue45346] Some "truthy" crept in

2021-10-02 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +27056 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28697 ___ Python tracker

[issue45346] Some "truthy" crept in

2021-10-02 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger type: enhancement -> ___ Python tracker ___

[issue45346] Some "truthy" crept in

2021-10-02 Thread Stefan Pochmann
Change by Stefan Pochmann : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45347] datetime subject to rounding?

2021-10-02 Thread Daniele Varrazzo
New submission from Daniele Varrazzo : I found two datetimes at difference timezone whose difference is 0 but which don't compare equal. Python 3.9.5 (default, May 12 2021, 15:26:36) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import

[issue18712] Pure Python operator.index doesn't match the C version.

2021-10-02 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I'm confused by your phrase "take data" -- do you mean remove these? Or wht > do you propose we do with them? I thought that function's name and qualname are set in the code that creates a function instead of copying from the code object. Similarly as

[issue45321] Module xml.parsers.expat.errors misses error code constants of libexpat >=2.0

2021-10-02 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Guido van Rossum
Guido van Rossum added the comment: Serhiy: > I propose an opposite change -- take data known at compile time (name, > qualname and annotations). I'm confused by your phrase "take data" -- do you mean remove these? Or wht do you propose we do with them? > It will make the code for creating

[issue45340] Lazily create dictionaries for plain Python objects

2021-10-02 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45346] Some "truthy" crept in

2021-10-02 Thread Stefan Pochmann
New submission from Stefan Pochmann : Python consistently says true/false, not truthy/falsy. But a few "truthy" have crept in now: https://github.com/python/cpython/search?q=truthy - Two in Doc/reference/compound_stmts.rst - One in Doc/library/ast.rst - One in Lib/test/test_builtin.py

[issue45341] Update "Python Package Index" in Docs

2021-10-02 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45341] Update "Python Package Index" in Docs

2021-10-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset d211e87307bb2a0b80e0a489501e892e61d879fc by Miss Islington (bot) in branch '3.9': bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (GH-28687) (GH-28689)

[issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads

2021-10-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: -asyncio nosy: +bquinlan, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads

2021-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can you apply some custom logic by specifying the initializer? -- components: +asyncio nosy: +asvetlov, serhiy.storchaka, yselivanov type: -> enhancement ___ Python tracker

[issue45345] Equalized lists depend to each other after equalizing

2021-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't a bug. In python, the assignment doesn't make a copy, it makes ts and s refer to the same object. So there's really only one list to change, and you can refer to it by either name, ts or s. -- nosy: +eric.smith resolution: -> not a bug

[issue45345] Equalized lists depend to each other after equalizing

2021-10-02 Thread Code7737
Change by Code7737 : Added file: https://bugs.python.org/file50323/Test.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45345] Equalized lists depend to each other after equalizing

2021-10-02 Thread Code7737
Change by Code7737 : Added file: https://bugs.python.org/file50322/Test.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45345] Equalized lists depend to each other after equalizing

2021-10-02 Thread Code7737
New submission from Code7737 : When you make two lists same by using "=" and then change one of them, other changes too -- files: Test.py messages: 403052 nosy: Code7737 priority: normal severity: normal status: open title: Equalized lists depend to each other after equalizing type:

[issue45329] pyexpat: segmentation fault when `--with-system-expat` is specified

2021-10-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45329] pyexpat: segmentation fault when `--with-system-expat` is specified

2021-10-02 Thread miss-islington
miss-islington added the comment: New changeset 22cf6a2f2347b7d4f11e45e557beace55acc79b5 by Miss Islington (bot) in branch '3.10': bpo-45329: Fix freed memory access in pyexpat.c (GH-28649) https://github.com/python/cpython/commit/22cf6a2f2347b7d4f11e45e557beace55acc79b5 --

[issue45329] pyexpat: segmentation fault when `--with-system-expat` is specified

2021-10-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +27055 pull_request: https://github.com/python/cpython/pull/28693 ___ Python tracker ___

[issue45329] pyexpat: segmentation fault when `--with-system-expat` is specified

2021-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0742abdc48886b74ed3b66985a54bb1c32802670 by TAGAMI Yukihiro in branch 'main': bpo-45329: Fix freed memory access in pyexpat.c (GH-28649) https://github.com/python/cpython/commit/0742abdc48886b74ed3b66985a54bb1c32802670 -- nosy:

[issue45329] pyexpat: segmentation fault when `--with-system-expat` is specified

2021-10-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27054 pull_request: https://github.com/python/cpython/pull/28692 ___ Python tracker

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I propose an opposite change -- take data known at compile time (name, qualname and annotations). It will make the code for creating new function smaller and faster. It is what we want to achieve -- reducing import time, but additionally it will reduce

[issue45341] Update "Python Package Index" in Docs

2021-10-02 Thread Steven Hsu
Steven Hsu added the comment: Thanks for the efficient help! -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Irit Katriel
Irit Katriel added the comment: > This not saves only memory usage, but also import time too. Do you see a measurable impact on import time? With LOAD_NONE I saw speedup of 8% on micro benchmarks but it didn’t make any difference overall. -- ___

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Inada Naoki
Inada Naoki added the comment: > For the sqlalchemy example: the saving in co_consts is about 1.6k (200 > pointers), but an increase in bytecode size of 2.4k. Please see number of co_constatns tuples. (d) saved 1307 tuples compared to (b). `sys.getsizeof(())` is 40 on 64bit machine. So 1307

[issue45341] Update "Python Package Index" in Docs

2021-10-02 Thread miss-islington
miss-islington added the comment: New changeset e040adc806aba32c53f4c3d35899d0e5691cab95 by Miss Islington (bot) in branch '3.10': bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (GH-28687) https://github.com/python/cpython/commit/e040adc806aba32c53f4c3d35899d0e5691cab95

[issue45341] Update "Python Package Index" in Docs

2021-10-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27052 pull_request: https://github.com/python/cpython/pull/28688 ___ Python tracker

[issue45341] Update "Python Package Index" in Docs

2021-10-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +27053 pull_request: https://github.com/python/cpython/pull/28689 ___ Python tracker ___

[issue45341] Update "Python Package Index" in Docs

2021-10-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 0be338199fd663f020d833a4db185d0c5a0e0078 by Terry Jan Reedy in branch 'main': bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (#28687) https://github.com/python/cpython/commit/0be338199fd663f020d833a4db185d0c5a0e0078