Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
UTF-8 mode. Please address UTF-8 mode explicitly in open() or elsewhere. The locale module is about the state of the lib C, not what Python enforces via options in its own I/O layers. As mentioned, both should ideally be synchronized, though, so UTF-8 mode in Python should trigger setting a UTF-8 enc

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
gs :-) So this is unnecessary as well. > > The problem is that there are two different "locale encodings", what I call: > > * "current locale encoding": nl_langinfo(CODESET) in short > * "Python locale encoding": "UTF-8" in some cases, nl_langi

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
dows or gives wrong results. Is that incorrect ? If it does work, getencoding() could just be a shim over nl_langinfo(CODESET) on all platforms. -- Marc-Andre Lemburg eGenix.com ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
ogic and not add encoding details which are specific to Python's view on I/O (sys or io) or the file system (os). Hopefully, in a few years, we can get rid of all this and standardize on UTF-8 everywhere. -- Marc-Andre Lemburg eGenix.com ___

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 12:05, STINNER Victor wrote: > I'm not sure what to do with locale.getdefaultlocale(). Should we deprecate > it? I never used this function. How is it used? For which purpose? > > I undertand that in 2000, locale.getdefaultlocale() was interesting to avoid > calling setlocale(LC_CTY

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
eeds to return what the lib C currently >> knows and uses as encoding. > > This is locale.get_current_locale_encoding(). I would like to put "current" > in the name, because there is a lot of confusion between > get_current_locale_encoding() encoding and locale.getp

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
cale settings. I had added locale.getdefaultlocale() to give applications a chance to determine the locale setting defined by the process environment *without* calling setlocale(LC_ALL, '') and causing problems in other threads. I used the X11 database for locale encodings, which was the cl

Re: [issue43115] locale.getlocale fails if locale is set

2021-02-18 Thread M.-A. Lemburg
On 17.02.2021 15:02, Anders Munch wrote: >> BTW: What is wxWidgets doing with the returned values ? > > wxWidgets doesn't call getlocale, it's a C++ library (wrapped by wxPython) > that uses C setlocale. > > What does use getlocale is time.strptime and datetim

Re: [issue43115] locale.getlocale fails if locale is set

2021-02-17 Thread M.-A. Lemburg
On 17.02.2021 10:55, Anders Munch wrote: import locale locale.setlocale(locale.LC_ALL, 'en_DE') > 'en_DE' locale.getlocale() > Traceback (most recent call last): > File "", line 1, in > File "C:\flonidan\env\Python38-64\lib\locale.py", line 591, in getlocale > return _parse_

Re: [issue42967] Web cache poisoning - `;` as a query args separator

2021-01-20 Thread M.-A. Lemburg
On 20.01.2021 12:07, STINNER Victor wrote: > Maybe we should even go further in Python 3.10 and only split at "&" by > default, but let the caller to opt-in for ";" separator as well. +1. Personally, I've never seen URLs encoded with ";" as query parameter separator in practice on the server sid

[issue42728] Typo in documentation: importlib.metadata

2020-12-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for the report and fix! -- stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/i

[issue42728] Typo in documentation: importlib.metadata

2020-12-31 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry, jaraco ___ Python tracker <https://bugs.python.org/issue42728> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42122] macOS complains about how fonts are accessed

2020-12-19 Thread Christopher A. Chavez
Christopher A. Chavez added the comment: This was already reported to Tcl/Tk: https://core.tcl-lang.org/tk/info/855049e799 . They determined it was caused by a bug in macOS 10.15.1. There are workarounds implemented for this in Tcl/Tk 8.6.10 and the upcoming 8.6.11 releases

[issue28468] Add platform.freedesktop_os_release()

2020-11-30 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: This issue was brought to the Python Steering Council, and we deliberated it at today's SC meeting. With a vote of 4 approvals and one abstention, we have approved the addition of this API. -- nosy: +

Re: [issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread M.-A. Lemburg
On 25.11.2020 11:13, STINNER Victor wrote: > Platform was always a thin wrapper to OS functions. For example, there is no > unified API to retrieve OS name and version on Windows, macOS or Linux. You > need to pick the proper function. For me, freedesktop_os_release() just > follow

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

2020-10-26 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.or

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

2020-10-26 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42155> ___ ___ Python-bugs-list

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

2020-10-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Hi Serhiy. I believe this is a duplicate of bpo-30681 which is active and has a good PR IMHO. The only hold up is whether to backport that PR to 3.9 and 3.8. See the bug and PR for details. -- resolution: -> duplicate superse

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

2020-10-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Aside: I noticed that on _parseaddr.py:68, there's a bare `return`. That should really be `return None` (EIBTI). Can you fix that in your PR? I think it's confusing to raise both TypeError and ValueError. I suggest we check the `None` r

[issue42129] Support resources in namespace packages

2020-10-23 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue42129> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38486] Dead links in mailbox doc

2020-10-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for the PR @ZackerySpytz - this has landed in git head and is currently being backported to 3.9 and 3.8 (3.7 is in security-fix only mode). -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -P

[issue38486] Dead links in mailbox doc

2020-10-22 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue38486> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-10-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @sim0n - I added a comment to your open PR. My main question for the rest of the group is whether we can and should backport this. Given the new defect class being introduced, it seems like this should only land in 3.10. Thoughts

[issue31522] _mboxMMDF.get_string() fails to pass param to get_bytes()

2020-10-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Actually, it looks to me like the PR *does* include unittests, and I see them in the repo, so I'm closing this bug. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-10-22 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue42115> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2020-10-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @maggyero - I haven't merged PR 10016, but I left some additional comments. Are you still interested in shepherding this PR? -- ___ Python tracker <https://bugs.python.org/is

[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2020-10-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Apologies for the long delay in reviewing this bug. I'm looking at it now, however since Python 3.7 is in security-only mode, this will only apply to 3.10, 3.9, and 3.8. -- versions: +Python 3.10, Python 3.9 -Pytho

[issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart

2020-10-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Actually, I think I am going to close this as won't fix, for two reasons. First, this only potentially affects the legacy API, and second, in Python 3, the error you get when you do it like the original repro example seems obvious to me. ``` &

[issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart

2020-10-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: The other question is what to do about `EmailMessage` objects, which don't have a `set_charset()` method. For now, I'll ignore that. -- ___ Python tracker <https://bugs.python.

[issue41988] No hyphen in broken up word in documentation

2020-10-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I am seeing this in Brave (a Chrome derivative). Many examples in https://docs.python.org/3/library/email.html See the words "in\nterface" and "ob\nject' in the attached screenshot. -- nosy: +barry Added file: https://bugs.

[issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart

2020-10-19 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- assignee: -> barry ___ Python tracker <https://bugs.python.org/issue1823> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart

2020-10-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Updating the Python versions to the only active ones on which this bug could conceivably be fixed. I haven't validated that it's still a problem, and I haven't decided whether it's appropriate to backport to 3.9 and 3.8. I'll wo

[issue11414] Add import fix for email.Message

2020-10-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for the PR @iritkatriel but I'm inclined to close this as won't fix. There are plenty of other changes someone would need to migrate to Python 3 for the email package, so I think this is of limited benefit. -- resolution: -> w

[issue27321] Email parser creates a message object that can't be flattened

2020-10-19 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.or

[issue33972] AttributeError in email.message.iter_attachments()

2020-10-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thank you all for the fix. Closing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37461] email.parser.Parser hang

2020-10-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks everyone for the fixes; I think this bug is now resolved. Closing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2020-10-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: My understanding is that this is specifically a problem with the Objective-C runtime that _scproxy.c accesses. The runtime is not thread safe and whereas in earlier versions of macOS, it silently failed, now macOS is explicitly aborting the process

[issue42092] test_host_resolution_bad_address does not always fail as expected

2020-10-19 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : This is very likely caused by something janky my ISP (AT&T) is doing with IPv6, but the above named test fails for me because IPv6 addresses like `::1q` do not fail to resolve as the test expects. I'm not sure what can or should be done about i

[issue42089] Better message in PackageNotFoundError

2020-10-19 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch nosy: +barry nosy_count: 1.0 -> 2.0 pull_requests: +21740 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22775 ___ Python tracker <https://bugs.python.org/i

[issue37741] importlib.metadata docs not showing up in the module index

2020-10-19 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue37741> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2020-10-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I agree that we should close this issue, possibly with a documentation fix. I wrote a blog posting about my investigations: https://wefearchange.org/2018/11/forkmacos.rst.html I don't think there's really much Python itself can do, and devel

Re: [issue41842] Add codecs.unregister() to unregister a codec search function

2020-09-23 Thread M.-A. Lemburg
Just found an internal API which already takes care of unregistering a search function: _PyCodec_Forget(). All that needs to be done is to expose this as codecs.unregister() and add the clearing of the lookup cache. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from

Re: [issue41842] Add codecs.unregister() to unregister a codec search function

2020-09-23 Thread M.-A. Lemburg
On 23.09.2020 14:56, STINNER Victor wrote: > Marc-Andre Lemburg explained: > > "There is no API to unregister a codec search function, since deregistration > would break the codec cache used by the registry to speedup codec > lookup." > > One simple solut

[issue37873] unittest: execute tests in parallel

2020-08-10 Thread D. A. Pellegrino
D. A. Pellegrino added the comment: Leveraging GNU Parallel (https://www.gnu.org/software/parallel/) might help simplify implementation. Perhaps that could be used as a subprocess call? -- ___ Python tracker <https://bugs.python.org/issue37

[issue41516] venv activate scripts do not pass ShellCheck

2020-08-10 Thread D. A. Pellegrino
New submission from D. A. Pellegrino : The activate scripts created by the venv module do not pass checks by ShellCheck (https://www.shellcheck.net/). ShellCheck generally has a point for each warning and note generated against the venv activate scripts. Addressing the ShellCheck reports

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-08-04 Thread Howard A. Landman
Howard A. Landman added the comment: As far as we can tell, this is a known Py_DECREF problem with spidev==3.4. Testing on spidev==3.5 has not triggered the bug so far, so it appears to be already fixed. Under 3.4, changing the list to a tuple did not affect the behavior

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-08-03 Thread Howard A. Landman
Howard A. Landman added the comment: OK, this has been filed against the spidev library: https://github.com/doceme/py-spidev/issues/107 Do you want it closed, or left open until that gets resolved? -- resolution: -> third party ___ Python trac

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-08-03 Thread Howard A. Landman
Howard A. Landman added the comment: It appears to be in the spidev library xfer method, when used for reading. Calling that 107.4M times (using the same code as inside my read_regs24() method) causes the free() error. Breakpoint 1, malloc_printerr (str=0x76e028f8 "free(): invalid po

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-08-03 Thread Howard A. Landman
Howard A. Landman added the comment: Getting closer to isolating this. A small program that does nothing but call read_regs24() over and over dies with the same error after about 107.4M iterations. So it seems to be definitely in that method. But that only takes a few hours, not half a day

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-08-02 Thread Howard A. Landman
Howard A. Landman added the comment: Made some progress. By running it under gdb and breaking in malloc_printerr(), I got a better stack trace: Breakpoint 1, malloc_printerr (str=0x76e028f8 "free(): invalid pointer") at malloc.c:5341 5341malloc.c: No such file or directory

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-27 Thread Howard A. Landman
Howard A. Landman added the comment: I'm running under 32-bit Raspbian, so let's assume the magic number is 13. There are only two places in my own code where the number 13 appears: (1) My result_list is 14 items long, i.e. 0 to 13. Relevant code from qtd.py: cum_results = [0, 0,

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-26 Thread Howard A. Landman
Howard A. Landman added the comment: After a quick glance at the source code for the spidev library, I think it is unlikely but not impossible to be the home for the bug. It does do malloc() and free(), but only for data that is greater than 256 bytes. Short tx and rx data is kept in static

[issue12423] signal handler doesn't handle SIGABRT from os.abort

2020-07-22 Thread Howard A. Landman
Howard A. Landman added the comment: I don't think changing the documentation makes this not be a bug. My situation: I have a Python 3.7.3 program that reliably dies (after about 13 hours, having called its measure() method between 118.6M and 118.7M times) with free(): invalid po

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-22 Thread Howard A. Landman
Howard A. Landman added the comment: This is not a memory leak problem. "Top" reports VIRT 21768 RES 13516 for the whole run, and Python internal resource reporting says 13564 kb for the whole run. So that's less than 1 kb leaked in 118.6M measurement cycles; mo

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-18 Thread Howard A. Landman
Change by Howard A. Landman : -- hgrepos: -389 ___ Python tracker <https://bugs.python.org/issue41335> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-18 Thread Howard A. Landman
New submission from Howard A. Landman : I have a program qtd.py that reliably dies with free(): invalid pointer after about 13 hours of runtime (on a RPi3B+). This is hard to debug because (1) try:except: will not catch SIGABRT (2) signal.signal(signal.SIGABRT, sigabrt_handler) also fails to

[issue35919] multiprocessing: shared manager Pool fails with AttributeError

2020-07-09 Thread Felipe A. Hernandez
Change by Felipe A. Hernandez : -- components: +Library (Lib) type: -> behavior versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issu

[issue35919] multiprocessing: shared manager Pool fails with AttributeError

2020-07-09 Thread Felipe A. Hernandez
Felipe A. Hernandez added the comment: import traceback import multiprocessing.managers class MyManager(multiprocessing.managers.SyncManager): pass class DictList(multiprocessing.managers.BaseProxy): _method_to_typeid_ = {'__getitem__': 'dict'} def _

[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-09 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for keeping the first 'F' in FLUFL! :D -- ___ Python tracker <https://bugs.python.org/issue41251> ___ ___

[issue41111] Convert a few stdlib extensions to the limited C API

2020-06-28 Thread Gustavo J. A. M. Carneiro
Change by Gustavo J. A. M. Carneiro : -- nosy: +gustavo ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsub

[issue33725] Python crashes on macOS after fork with no exec

2020-05-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I don't think there's really anything more to do here. I'm closing the issue. Let's open a new one if needed at some future point. -- resolution: -> fixed stage: patch review -> resol

[issue22652] Add suggestion about keyword arguments to this error message: "builtins.TypeError: my_func() takes 1 positional argument but 2 were given"

2020-05-15 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: If the patch requires a rewrite and its value is uncertain then I'll excuse myself from this issue. -- ___ Python tracker <https://bugs.python.org/is

[issue40543] Tamil locale is using outdated encoding

2020-05-07 Thread Muthu A
New submission from Muthu A : Tamil locale (TA_IN, TA_SL, TA_SG, TA_MY) is using outdated encoding of TSCII. Tamil community is widely using UTF-8 encoding. Further, the 'locale' standard library package in Python3 should be updated with these strings. Should the maintain

[issue40453] Add PyConfig._isolated_interpreter: isolated subinterpreters

2020-04-30 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue40453> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40439] Error in an external reference

2020-04-29 Thread Patrick A.
New submission from Patrick A. : This URL doesn't exist anymore. If you click on this URL you have a 404 not found. https://www.dcl.hpi.uni-potsdam.de/home/loewis/table-3131.html The website was changed and Dr. Martin v. Löwis is not hosted on the new site. Regards -- assignee:

[issue39791] New `files()` api from importlib_resources.

2020-02-28 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue39791> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-30 Thread Ananthakrishnan A S
Ananthakrishnan A S added the comment: Yes,I want to put together a PR. -- ___ Python tracker <https://bugs.python.org/issue39479> ___ ___ Python-bugs-list m

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-29 Thread Ananthakrishnan A S
Ananthakrishnan A S added the comment: I agree with Vedran Čačić.As the modules are not made for one person but it is for the ease of coding.There are so many functions which i don't use but used by other people.We are using functions to make coding easy and if lcm function is added

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-28 Thread Ananthakrishnan A S
Ananthakrishnan A S added the comment: some problems that needs lcm function: 1:find the least number which when divided by 'a','b','c','d' leaves remainder 'e' in each case. 2:person A exercises every 'n' days and person B every

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-28 Thread Ananthakrishnan A S
Ananthakrishnan A S added the comment: Should i proceed with adding a pull request for adding a 'lcm' function in python's math module. -- ___ Python tracker <https://bugs.pyt

[issue39479] [RFE] Add math.lcm() function: Least Common Multiple

2020-01-28 Thread Ananthakrishnan A S
Ananthakrishnan A S added the comment: I created this issue as i came across the following question: There are n students in class A,and m students in class B.each class divides into teams for a competition.What is the biggest possible team size that can be divided,such that each team has

[issue39479] can we add a lcm and gcd function.

2020-01-28 Thread Ananthakrishnan A S
New submission from Ananthakrishnan A S : can we add an lcm and gcd function that can work as: lcm(4,6) # returns 12 gcd(4,6) # returns 2 -- components: Library (Lib) messages: 360875 nosy: Ananthakrishnan A S priority: normal severity: normal status: open title: can we add a lcm and

[issue39478] can we add a median function

2020-01-28 Thread Ananthakrishnan A S
New submission from Ananthakrishnan A S : add a function called 'median' that we can use like: list=[1,2,3,4,5,6,7,8,9] # declaring list median(list) #returns 5 -- components: Library (Lib) messages: 360873 nosy: Ananthakrishnan A S priority: normal severity: nor

[issue39246] shutil.rmtree is inefficient because of using os.scandir instead of os.walk

2020-01-08 Thread Felipe A. Hernandez
Felipe A. Hernandez added the comment: After some tests, due the accumulating nature of fwalk, I've just realised it's not very safe for big directories, so I'll be closing this issue. Alternatively, using py37+ fd based scandir, and dir_fd unlink and rmdir calls would re

[issue39246] shutil.rmtree is inefficient because of using os.scandir instead of os.walk

2020-01-07 Thread Felipe A. Hernandez
New submission from Felipe A. Hernandez : os.rmtree has fd-based symlink replacement protection when iterating with scandir (after bpo-28564). This logic could be greatly simplified simply by os.fwalk in supported platforms, which already implements a similar (maybe safer) protection

[issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum

2019-11-12 Thread Anj-A
Anj-A <2017...@gmail.com> added the comment: Hey, if there is no bug here, could we get this issue closed? Alternatively, I'd be interested in doing the required change in documentation/error type if that's seen to be the right solution. Personally, I think returning False in

[issue36128] ResourceReader for FileLoader inconsistently handles path separators

2019-11-11 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: One simple restriction would be to disallow relative paths outside of the resource anchor location. -- ___ Python tracker <https://bugs.python.org/issue36

[issue38743] configure: on macOS (darwin) add CoreFoundation to flags before checking for gettext

2019-11-08 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue38743> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38652] Remove/update provisional note for asyncio.BufferedProtocol

2019-11-04 Thread Anj-A
Change by Anj-A <2017...@gmail.com>: -- keywords: +patch pull_requests: +16563 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17047 ___ Python tracker <https://bugs.python.or

[issue38652] Remove/update provisional note for asyncio.BufferedProtocol

2019-11-04 Thread Anj-A
Anj-A <2017...@gmail.com> added the comment: Hey, I've done the change and opened a pull request for it (I'm working with Ben and I've let him know) -- nosy: +Anj-A ___ Python tracker <https://bu

[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-11-04 Thread Anj-A
Change by Anj-A <2017...@gmail.com>: -- keywords: +patch pull_requests: +16560 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17047 ___ Python tracker <https://bugs.python.or

[issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum

2019-11-04 Thread Anj-A
Anj-A <2017...@gmail.com> added the comment: Hey, I'm not exactly clear what the required fix is here and would appreciate some guidance, is it in the documentation or in the way the error is handled? -- ___ Python tracker <https://b

[issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum

2019-11-04 Thread Anj-A
Anj-A <2017...@gmail.com> added the comment: Hi all, I'm a newcomer interested in doing a small fix. Wondering if anyone's working on this at the moment? ------ nosy: +Anj-A ___ Python tracker <https://bugs.py

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default before Python 4.0

2019-10-28 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue38605> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38249] Optimize out Py_UNREACHABLE in the release mode

2019-10-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: +1 Serhiy. -- ___ Python tracker <https://bugs.python.org/issue38249> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38295] macOS Catalina test failures

2019-09-27 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : test_py_compile fails on macOS Catalina beta (19A573a) == ERROR: test_relative_path (test.test_py_compile.PyCompileTestsWithSourceEpoch

[issue38289] Add an option to point to an additional "site" directory

2019-09-26 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue38289> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38208] Simplify string.Template by using __init_subclass__()

2019-09-19 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue38208> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37683] Use importlib.resources in venv

2019-09-09 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: See also this ticket: https://gitlab.com/python-devs/importlib_resources/issues/58 We've basically agreed that you should be able to load resources from subdirectories that aren't packages. It turns out to be not a simple change in importlib

[issue38014] Python 3.7 does not compile

2019-09-04 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue38014> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38010] Synchronize importlib.metadata with importlib_metadata 0.20

2019-09-02 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue38010> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34690] Store startup modules as C structures for 20%+ startup speed improvement

2019-08-20 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <https://bugs.python.org/issue34690> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2019-08-17 Thread A. Skrobov
A. Skrobov added the comment: Joannah, I see that under #25314, the docs were updated to match the implementation: https://github.com/python/cpython/commit/b4912b8ed367e540ee060fe912f841cc764fd293 On the other hand, the discussion here (from 2015) and on #25314 (from 2016) includes

[issue37873] unittest: execute tests in parallel

2019-08-16 Thread D. A. Pellegrino
New submission from D. A. Pellegrino : The unittest documentation makes reference to a potential parallelization feature: "Note that shared fixtures do not play well with [potential] features like test parallelization and they break test isolation. They should be used with care.&quo

[issue37813] PEP 7 line-breaking with binary operations contradicts Knuth's rule

2019-08-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I personally don't think we need to change this. C and Python are different, and the PEP 7 rules have been in place for ages. +Guido -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/is

[issue34632] Port importlib_metadata to Python 3.8

2019-08-11 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @jaraco will be able to answer that better than me. I actually thought those did return concrete lists. I also thought that the APIs accepted either a module or a package name, but maybe I'm thinking about importlib.resources. Again, @jaraco can cl

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: > OTOH This would require a PEP change, formal review, etc. It would be trivial though. There are only two references to TargetScopeError in the PEP. One talks about adding the exception and the other just mentions it almost in passing as a subclass

[issue37741] importlib.metadata docs not showing up in the module index

2019-08-06 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch pull_requests: +14887 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15153 ___ Python tracker <https://bugs.python.org/issu

[issue37741] importlib.metadata docs not showing up in the module index

2019-08-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I’ll do a PR for that too. > On Aug 6, 2019, at 14:07, Brett Cannon wrote: > > > Brett Cannon added the comment: > > If there's no porting benefit then let's move it to a single mo

[issue37741] importlib.metadata docs not showing up in the module index

2019-08-05 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @jaraco - Why is the code in `Lib/importlib/metadata/__init__.py` instead of `Lib/importlib/metadata.py`? Is that to make it easier to port between CPython stdlib and the standalone version? -- ___ Python

<    1   2   3   4   5   6   7   8   9   10   >