[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2020-10-26 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- keywords: +patch pull_requests: +21901 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22987 ___ Python tracker

[issue42097] Python 3.7.9 logging/threading/fork hang

2020-10-26 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: By the way, I don't see a direct relation between `test.py` (which doesn't use `subprocess` directly) and your comment describing `subprocess` usage with threads. So if you think that the bug in `test.py` is unrelated to the problem you face, feel free to

[issue42097] Python 3.7.9 logging/threading/fork hang

2020-10-26 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: (Restored test.py attachment) The issue happens due to an incorrect usage of `multiprocessing.Pool`. ``` # Set up multiprocessing pool, initialising logging in each subprocess with multiprocessing.Pool(initializer=process_setup,

[issue42097] Python 3.7.9 logging/threading/fork hang

2020-10-26 Thread Alexey Izbyshev
Change by Alexey Izbyshev : Added file: https://bugs.python.org/file49531/test.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-10-26 Thread STINNER Victor
STINNER Victor added the comment: New changeset 47e1afd2a1793b5818a16c41307a4ce976331649 by Victor Stinner in branch 'master': bpo-1635741: _PyUnicode_Name_CAPI moves to internal C API (GH-22713) https://github.com/python/cpython/commit/47e1afd2a1793b5818a16c41307a4ce976331649 --

[issue42156] Currency not correct for all locales

2020-10-26 Thread Eric V. Smith
Eric V. Smith added the comment: p_cs_precedes == 1 means "the currency_symbol or int_curr_symbol strings should precede the value of a monetary amount", per https://www.gnu.org/software/libc/manual/html_node/Currency-Symbol.html (I couldn't find a more authoritative source, but I think

[issue42156] Currency not correct for all locales

2020-10-26 Thread Stefan Völkl
Stefan Völkl added the comment: >>> locale.localeconv() {'int_curr_symbol': 'EUR ', 'currency_symbol': '€', 'mon_decimal_point': ',', 'mon_thousands_sep': '.', 'mon_grouping': [3, 3, 0], 'positive_sign': '', 'negative_sign': '-', 'int_frac_digits': 2, 'frac_digits': 2, 'p_cs_precedes': 1,

[issue42156] Currency not correct for all locales

2020-10-26 Thread Eric V. Smith
Eric V. Smith added the comment: What does locale.localeconv() return? >>> locale.localeconv() {'int_curr_symbol': '', 'currency_symbol': '', 'mon_decimal_point': '', 'mon_thousands_sep': '', 'mon_grouping': [], 'positive_sign': '', 'negative_sign': '', 'int_frac_digits': 127,

[issue42147] Micro optimization for longrange iteration if step is 1

2020-10-26 Thread Dong-hee Na
Dong-hee Na added the comment: I close this issue with rejected status. Thank you serhiy, pablogsal and Inada-san for discussion ;) -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue42156] Currency not correct for all locales

2020-10-26 Thread Stefan Völkl
New submission from Stefan Völkl : I found that the currency formatting does not work correctly for all locales. For example: {{{ import locale amount = 24.99 locale.setlocale(locale.LC_ALL, 'it_IT.UTF-8') price = locale.currency(amount) print(price) }}} returns "€ 24,99". It should return

[issue26954] Add Guido's rejection notice to the "with" FAQ

2020-10-26 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___

[issue15339] document the threading "facts of life" in Python

2020-10-26 Thread Irit Katriel
Change by Irit Katriel : -- priority: low -> normal stage: -> needs patch type: -> behavior versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker

[issue21510] fma documentation should provide better example.

2020-10-26 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker ___

[issue42155] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2020-10-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Documentation says that parsedate_to_datetime() performs the same function as parsedata(), but on success returns a datetime. parsedata() returns None when date cannot be parsed, but parsedate_to_datetime() raises TypeError. >>>

[issue42097] Python 3.7.9 logging/threading/fork hang

2020-10-26 Thread Andrew de Quincey
Andrew de Quincey added the comment: Hi, sorry, I was ill on Friday, apologies for the delayed reply. We're not using os.fork() directly, and I'm afraid the multiprocessing thing I mentioned was a bit of a red herring. We're using a capped pool of threads to spawn subprocesses (using

[issue42152] Use PyDict_Contains() and PyDict_SetDefault() instead of PyDict_GetItemWithError()

2020-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b510e101f8b5b31276bf97b921ca9247162881d2 by Serhiy Storchaka in branch 'master': bpo-42152: Use PyDict_Contains and PyDict_SetDefault if appropriate. (GH-22986) https://github.com/python/cpython/commit/b510e101f8b5b31276bf97b921ca9247162881d2

[issue4297] Add error_log attribute to optparse.OptionParser

2020-10-26 Thread Irit Katriel
Irit Katriel added the comment: Following issue9938, argparse now offers a convenient way to handle errors. I propose to close this issue as out of date. -- nosy: +iritkatriel status: open -> pending ___ Python tracker

[issue42154] Bad proxy returned immediately after BaseManager server restarted

2020-10-26 Thread john ryan
New submission from john ryan : I am building an application that is made up of several separate processes, where each process is a python program. They are all started by the supervisord utility and execute within a venv running Python 3.8.5 (default, Aug 13 2020, 15:42:06) [GCC 7.5.0] on

[issue12737] str.title() is overzealous by upcasing combining marks inappropriately

2020-10-26 Thread Irit Katriel
Irit Katriel added the comment: You're right, I see that too when I don't tamper with the test. -- components: +Library (Lib) ___ Python tracker ___

[issue42147] Micro optimization for longrange iteration if step is 1

2020-10-26 Thread Dong-hee Na
Dong-hee Na added the comment: I will close this issue by tomorrow with rejected ;) -- ___ Python tracker ___ ___ Python-bugs-list

[issue42147] Micro optimization for longrange iteration if step is 1

2020-10-26 Thread Dong-hee Na
Dong-hee Na added the comment: > Sometimes the work of the core developer is to say "No" to his own code. Thank you for the careful sentence. For clear the air, I never think that my patch should be accepted. This is why I always get reviews from other core devs and I always accept the

[issue42153] doc: library imaplib a url not available

2020-10-26 Thread Hitansh K Doshi
Hitansh K Doshi added the comment: hello, I am new to python repo, I would like to contribute here. I checked the page to told and it is showing that https://www.washington.edu/imap/ is not found. I tried to find the url to their documentation but I couldn't found one. can you please guide

[issue42096] zipfile.is_zipfile incorrectly identifying a gzipped file as a zip archive

2020-10-26 Thread Alex Roussel
Alex Roussel added the comment: OK understood. Thanks for the explanation, I wasn't aware of those and will take a look. -- ___ Python tracker ___

[issue42147] Micro optimization for longrange iteration if step is 1

2020-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that In sum(range(1 << 1000, (1 << 1000) + 100)) it is dwarfed by repeated addition of long integers in sum(). I expect the the effect of this optimization is even less that 13% in this case. In any case, for sum(range(a, b)) it is better to use

[issue1490929] urllib.retrieve's reporthook called with non-helpful value

2020-10-26 Thread Irit Katriel
Change by Irit Katriel : -- stage: test needed -> versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2 ___ Python tracker ___

[issue42153] doc: library imaplib a url not available

2020-10-26 Thread Chris Xiao
New submission from Chris Xiao : jump to https://docs.python.org/3/library/imaplib.html#imap4-objects, in the "See also" text, the url(https://www.washington.edu/imap/) of the University of Washington’s IMAP Information Center is not available. -- assignee: docs@python components:

[issue1490929] urllib.retrieve's reporthook called with non-helpful value

2020-10-26 Thread Senthil Kumaran
Senthil Kumaran added the comment: > so was this fixed? Irit, not really. This is adding another hook called "progress hook" in addition to the "report hook". We need to evaluate if this is really required. -- status: pending -> open ___ Python

[issue42152] Use PyDict_Contains() and PyDict_SetDefault() instead of PyDict_GetItemWithError()

2020-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The code uses also _PyDict_ContainsId() added in issue42006 instead of _PyDict_GetItemIdWithError(). Few uses of _PyDict_GetItemStringWithError() are left as is. I do not think it is worth to introduce _PyDict_ContainsString(). They could be rewritten

[issue42152] Use PyDict_Contains() and PyDict_SetDefault() instead of PyDict_GetItemWithError()

2020-10-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21900 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22986 ___ Python tracker

[issue42152] Use PyDict_Contains() and PyDict_SetDefault() instead of PyDict_GetItemWithError()

2020-10-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : It was common to use the code PyDict_GetItem(dict, key) == NULL to check whether the key is in the dict. PyDict_GetItem() returns borrowed reference, so no clean up is needed. And if we need to check only existence of the key, we do not need to store a

[issue42146] subprocess.Popen() leaks cwd in case of uid/gid overflow

2020-10-26 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thanks for merging! I've rebased PR 22970. -- ___ Python tracker ___ ___ Python-bugs-list

[issue42152] Use PyDict_Contains() and PyDict_SetDefault() instead of PyDict_GetItemIdWithError

2020-10-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: serhiy.storchaka priority: normal severity: normal status: open title: Use PyDict_Contains() and PyDict_SetDefault() instead of PyDict_GetItemIdWithError ___ Python tracker

[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My plan is to deprecate PyDict_GetItem() and functions with same design flaw and finally remove them (in 4.0?). We cannot start to ignore exceptions in PyDict_GetItem(). It would not fix the original flaw when the user code does not check an exception

[issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition

2020-10-26 Thread Denis S. Otkidach
Change by Denis S. Otkidach : -- nosy: +ods ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40255] Fixing Copy on Writes from reference counting

2020-10-26 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40255] Fixing Copy on Writes from reference counting

2020-10-26 Thread Inada Naoki
Inada Naoki added the comment: I'm big -1 too. But I am interested in Instagram usage. * How % of heap are CoW-ed with gc.freeze()? * When CoW happen? in execution time, or shutdown? * Which type cause CoW? I have two ideas to reduce CoW: * Fast shutdown option Currently Python try to

[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fb5db7ec58624cab0797b4050735be865d380823 by Serhiy Storchaka in branch 'master': bpo-42006: Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId. (GH-22648)

[issue39189] Use io.DEFAULT_BUFFER_SIZE for filecmp BUFSIZE variable

2020-10-26 Thread Inada Naoki
Inada Naoki added the comment: I concur with Benjamin. Although two variables are similar, they are used in the different layer. -- nosy: +methane resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

<    1   2