[issue37883] threading.Lock.locked is not documented

2019-08-18 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : As far as I can tell, it has never been documented. I'm not sure if it is deprecated but it has a docstring so it seems to me, that it just needs documentation in Doc/Library/threading.rst PS: I don't know how to set the beginner fri

[issue42722] Add --debug command line option to unittest to enable post-mortem debugging

2021-04-13 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue42722> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44166] Make IndexError messages for list more informative

2021-05-20 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue44166> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44169] Add HTTPS support to http.server

2021-05-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This is already proposed in issue 40990 for which I am working on a PR. -- nosy: +remi.lapeyre versions: +Python 3.11 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue44

[issue45644] Make json.tool soak up input before opening output for writing

2021-11-07 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: The proposed path does not work for `python -m json.tool --json-lines test.json test.json`. There is also https://github.com/python/cpython/pull/7865 that aims to fix this bug but I did not have the time to get back to it. -- nosy: +remi.lapeyre

[issue38998] dict.setdefault (setdefault of dictionary)

2019-12-08 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > > > def __init__(self): > vars(self).setdefault('default', self.set_default()) > vars(self).setdefault('default', self.set_default()) > This code is equivalent to def __init__(self): x

[issue38998] dict.setdefault (setdefault of dictionary)

2019-12-08 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: The documentation is correct, in Python argument are computed before the call to a function, not when they are used. You can try other functions than dict.setdefault() and see that the behaviour is always the same. Le dim. 8 déc. 2019 à 22:47, da-dada a écrit

[issue39759] os.getenv documentation is misleading

2020-02-26 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : The documentation states that "*key*, *default* and the result are str." at https://github.com/python/cpython/blame/3.8/Doc/library/os.rst#L224 but either I'm missing something or it's not actually true: $ python -c 'import os;

[issue39759] os.getenv documentation is misleading

2020-02-26 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I don't really have a preference regarding saying that `default` should be a string or not but the phrase should still be reworded to be less confusing. In typeshed it's documented with a generic type: https://github.com/python/typeshed/blob/master/s

[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: There is the _closed attribute thought that is mutated by some methods. -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue39

[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > Decorating __new__ with lru_cache would likely run into memory leakage > problems? I think the LRU cache would be for returning the same instance when called with the same string. I don't think it would be needed to return the same instance when

[issue39817] CRITICAL: TypeError: cannot pickle 'generator'

2020-03-01 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Oscar, can you attach a small program that reproduce the error? It's probable that the error is in your code and not in Python. -- nosy: +remi.lapeyre -paul.moore, steve.dower, tim.golden, zach.ware ___ P

[issue39828] json.tool should catch BrokenPipeError

2020-03-02 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue39828> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39841] "as" variable in except block deletes local variables with same name

2020-03-03 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Alan, this is documented at https://docs.python.org/3/reference/compound_stmts.html#the-try-statement: > When an exception has been assigned using as target, it is cleared at the end > of the except clause. This is as if > > except E as N: >

[issue39912] warnings.py should not raise AssertionError when validating arguments

2020-03-09 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : Currently simplefilter() and filterwarnings() don't validate their arguments when using -O and AssertionError is not the most appropriate exception to raise. I will post a PR shortly. -- components: Library (Lib) messages: 363732 nosy: remi.la

[issue39912] warnings.py should not raise AssertionError when validating arguments

2020-03-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +18236 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18878 ___ Python tracker <https://bugs.python.org/issu

[issue39913] Document warnings.WarningMessage ?

2020-03-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: warnings.WarningMessage was added in https://bugs.python.org/issue26568 at the same time than _showwarnmsg_impl() and _formatwarnmsg_impl(). The goal was to have public functions that took them instead of multiple arguments so it could be easily extended in

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This is not how timeit works, you just measured the time taken by an empty loop, you can look at `python3 -m timeit -h` to get help how to call it. I think a correct invocation would be: (venv) ➜ ~ python3 -m timeit -s 'from os import scandir' &qu

[issue35775] Add a general selection function to statistics

2020-03-09 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35775> ___ ___ Pyth

[issue40123] append() works not correct

2020-03-31 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi merli, there is no bug here, you always append the same list to Liste so when modifying it you override previous values. You could make a copy of it by using `Liste.append(list(StringL))` instead of `Liste.append(StringL)` and you would get the behaviour

[issue40132] Mechanism to control who owns package names on PyPI?

2020-04-01 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Chris, this is explicitly forbidden in the Terms of use of Pypi and the PEP 451 at https://www.python.org/dev/peps/pep-0541/#invalid-projects: > Invalid projects > A project published on the Package Index meeting ANY of the following is > c

[issue40168] import pandas error[python 3.8.]

2020-04-03 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Harish, it looks like you are having an issue related to Pandas and not Python itself. This bug tracker is for issues related to Python, for issues related to Pandas you will want to open a new issue at https://github.com/pandas-dev/pandas -- nosy

[issue40200] count 0 crash

2020-04-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Talha, you are using floating points division which convert its operands to floats so it loose precision for large numbers. The syntax for integer division in Python 3 is // and it will not change the type of its operands. Notice the difference below

[issue40206] Multiplying 4.6*100 will result in 459.99999999999994

2020-04-06 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi ahmad, calculation with floating points in Python uses the IEE 754 (https://fr.wikipedia.org/wiki/IEEE_754) standard and will result in such quirks. If you want to not loose precision you can use the decimal module: >>> from decimal impor

[issue40206] Multiplying 4.6*100 will result in 459.99999999999994

2020-04-06 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: @Steven Yes that's true, I only meant that in the context of the issue where only the multiplication is used. FWIW Fraction also would have issues with e.g. trigonometric functions right? @ahmad, that's because you did Decimal(4.6) which first pars

[issue40225] recursive call within generator expression is O(depth)

2020-04-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi brendon, can you write a complete minimal example that shows the issue, it seems that you are heving an issue when consuming recursive generators and that it's actually not related to max(). I'm confused about the details and have not been able t

[issue40225] recursive call within generator expression is O(depth)

2020-04-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I'm unable to run the example as it segfaults on my computer because of the linear recursion but do you notice the same behavior with: from time import time from sys import setrecursionlimit setrecursionlimit(1000) def recurse(i): if

[issue40239] Add a function for merging sorted iterables

2020-04-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Serhiy, do you plan on writing a PR for this feature? If not I would love to have a go at it. -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue40

[issue40225] recursive call within generator expression is O(depth)

2020-04-11 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I've been looking at this, I find the effect more visible when you don't do the division in the last print(). After bisecting, it looks like ae3087c6382011c47db82fea4d05f8bbf514265d may account for most of the performance gap between 3

[issue40303] argparse parse_args args parameter bug or intended

2020-04-16 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Gharg, this is expected, both because your program would not actually receive `--boolean=''` but `--boolean=`: ➜ ~ cat test.py import sys print(sys.argv) ➜ ~ python test.py --boolean='' ['test.py', '--boolean='] an

[issue40310] If use element from for in while loop it will have bad iterate.

2020-04-17 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Maks, when you report a bug please write a minimal example that show the bug so we don't have to read the whole application (https://stackoverflow.com/help/minimal-reproducible-example). I think in this case that the issue is that you overrride mod

[issue40325] Random.seed does not affect string hash randomization leading to non-intuitive results

2020-04-18 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: String hash randomization is a security feature so it may be better to not disable it unless explicitly asked for. Maybe a note in random's documentation could be added? -- nosy: +remi.lapeyre ___ Python tr

[issue40255] Fixing Copy on Writes from reference counting

2020-04-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: >> We also have the real world app that is Instagram. > I don't think Instagram is a single app. What is Python used for at Instagram? According to their engineering blog (https://instagram-engineering.com/static-analysis-at-scale-an-i

[issue40351] How to edit "python --help"?

2020-04-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Nino, the text for `python --help` is here : https://github.com/python/cpython/blob/master/Python/initconfig.c#L28-L130 -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue40

[issue40352] SocketHandler silently drops log messages on re-connect

2020-04-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: On one hand it's bad messages get lost, one the other retrying to send the message would take a lot of time and make `SocketHandler` very slow. Maybe we could had the record to a very short queue so we can retry to send it with the next me

[issue40355] The ast module fails to reject certain malformed nodes

2020-04-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue40355> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40363] shlex.quote applied to a glob pattern disables glob matching

2020-04-22 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: shlex.quote makes the string safe to pass a command, what if it's rm 'var/log/syslog*' instead? You make sure that only the file given would be removed but then shlex.quote() shoot you in the foot. This would also cause issues for fi

[issue40363] shlex.quote applied to a glob pattern disables glob matching

2020-04-22 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- type: -> behavior versions: +Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue40363> ___ ___ Python-bugs-lis

[issue39385] Add an assertNoLogs context manager to unittest TestCase

2020-04-23 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This makes sense, should assertNoWarns() be added too? -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue39

[issue40387] queue example it does not work

2020-04-25 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: In general examples in the documentation may lack some things like imports as they are implicit but in this case it also lack do_work(), source() and num_worker_threads. You could use os.cpu_count() instead of your hard-coded value and the comment. Can you

[issue40372] doctest example programs should exit 1 if any test fails

2020-04-26 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre, tim.peters versions: -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker <https://bugs.python.org/issue40

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-04-27 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue31122> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40402] multiprocessing/connection.py broken handle

2020-04-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Maxi, Python 3.5 now only accept security fixes. Can you reproduce this issue with recent releases and post an example here? -- nosy: +remi.lapeyre type: crash -> behavior ___ Python tracker <

[issue40402] Race condition in multiprocessing/connection.py: broken handle

2020-04-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: A call to self._check_closed() is already present in Python 3.5 https://github.com/python/cpython/blob/3.5/Lib/multiprocessing/connection.py#L202-L206 It is possible for some issues to appear when mixing multiprocessing and multithreading thought: In [17

[issue40402] Race condition in multiprocessing/connection.py: broken handle

2020-04-29 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +19113 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19790 ___ Python tracker <https://bugs.python.org/issu

[issue40437] add string.snake function

2020-04-29 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I don't understand the motivation, why would it be very useful when working with titles of columns that are to be used in databases columns? Databases can handle columns with spaces in their name: postgres=# create temporary table foo ("column w

[issue36825] Make TestCase aware of the command line arguments given to TestProgram

2020-05-01 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Bumping this issue as issue 37873 that wants to add a new -j argument to unittest got some attention lately. This PR makes the Test Cases aware of the command line arguments given to unittest.main() and is needed to add the --pdb argument proposed in issue

[issue40471] Grammar typo in issubclass docstring

2020-05-01 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Alex, thanks for reporting this. A PR will be needed to fix those indeed. Regarding argument clinic, the file you will need to change is Python/bltinmodule.c and you can run `make regen-all` to regenerate the other file. There is more information about this

[issue40471] Grammar typo in issubclass docstring

2020-05-01 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- versions: +Python 3.9 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue40471> ___ ___ Python-bugs-list mailing list Unsub

[issue40476] Write file failed on OS X 10.15.4

2020-05-02 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, I can't reproduce the issue but the fact that you did not close the file is suspicious. What does with open('test_output','w') as f: length = 195364 for i in range(length): f.write(str(i)+'\r\n') giv

[issue40497] subprocess.check_output() accept the check keyword argument

2020-05-04 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : The subprocess.check_output() raises TypeError when given the `check` keyword-argument: Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or

[issue40497] subprocess.check_output() accept the check keyword argument

2020-05-04 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +19208 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19897 ___ Python tracker <https://bugs.python.org/issu

[issue40496] re.findall() takes a long time (100% cup usage) on Python 3.6.10

2020-05-04 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I don't think this is a deadlock rather it is certainly related to the number of '*' there is in your pattern, the regexp has to search an exponentially growing number of patterns. You could try a simple pattern to match your attribute and it s

[issue40497] subprocess.check_output() accept the check keyword argument

2020-05-04 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > check_output() should not accept check=False. I thought about raising ValueError instead but `subprocess.check_output([...], check=False)` is actually a convenient shortcut over `subprocess.run([...], stdout=subprocess.PIPE).stdout` and I can't think

[issue40497] subprocess.check_output() accept the check keyword argument

2020-05-04 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > Now a reviewer has to check that a developer uses the validate_result() > function *and* the developer is not passing validate=False into the function. Fair enough, I updated the PR to raise ValueError i

[issue40028] Math module method to find prime factors for non-negative int n

2020-05-05 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre nosy_count: 7.0 -> 8.0 pull_requests: +19232 pull_request: https://github.com/python/cpython/pull/19918 ___ Python tracker <https://bugs.python.org/issu

[issue40028] Math module method to find prime factors for non-negative int n

2020-05-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: >> Regardless, how can we best move forward with this idea? > Provide a pull request. Hi, I looked into what scientific programs where doing. Most of them uses a form of the Baillie–PSW primality test which is a probabilistic primality test that'

[issue40028] Math module method to find prime factors for non-negative int n

2020-05-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I can't mark the issue as open thought, can someone do this? -- ___ Python tracker <https://bugs.python.org/issue40028> ___ ___

[issue40516] GCC 9 compiler warnings on MacOS Catalina

2020-05-05 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : Building master with GCC 9.3.0 gives some warnings on posix and nis: ./Modules/posixmodule.c: In function 'os_chown_impl': ./Modules/posixmodule.c:3397:39: warning: the comparison will always evaluate as 'false' for the address of 'l

[issue40516] GCC 9 compiler warnings on MacOS Catalina

2020-05-05 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +19240 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19925 ___ Python tracker <https://bugs.python.org/issu

[issue40531] Adding the method find() to list

2020-05-06 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi João, ideas like this can also be proposed first on the python-ideas mailing list but as you said in your post there is already a method to do this and it raises ValueError when it is not found which is a common idiom in Python. Other objects don't

[issue40560] uuid.uuid4().hex not random

2020-05-08 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This is expected, while part of them are randomly generated, some bits are always set: https://tools.ietf.org/html/rfc4122#section-4.1.3. This let you know that the UUID you have is a version 4 just by looking at it, it's not a bug. -- compo

[issue40579] Second argument to iterator.next not described

2020-05-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: It's documented here: https://docs.python.org/3/library/functions.html#next -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/is

[issue40580] Macintosh Documentation Still Bad

2020-05-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Gleen, this looks like there already exists an issue for this problem, please use it instead of opening a new one. Can you please open a new Pull-Request for solving this issue? -- nosy: +remi.lapeyre ___ Python

[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2020-05-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Gleen, the best way forward is to propose an improvement to the current documentation. It will get reviewed and merge if appropriate. The source for this part is at https://github.com/python/cpython/blob/master/Doc/using/mac.rst and you can find the

[issue40603] slice not hashable

2020-05-12 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I think slices were explicitly made not hashable to avoid issues to avoid issues with dictionaries, see discussion at https://mail.python.org/pipermail/python-list/2001-March/076101.html and issue 408326. The commit that did this is https://github.com/python

[issue40331] Increase test coverage for the statistics module

2020-05-13 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: >> Perhaps you missed it because you're not in the CODEOWNERS so don't >> automatically get notified by GitHub? > That's quite possible. I can't fix that as Github considers everything to do with my computer and browser too

[issue40624] add support for != (not-equals) in ElementTree XPath

2020-05-14 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue40624> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40649] [Errno 1]

2020-05-16 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Glenn, this is probably not a bug in Python and more information about the error and the context would be needed if it was. Bugs must be reproducible to be looked at and fixed and your post does not contain enough information to do so. You should redirect

[issue40649] [Errno 1]

2020-05-17 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: The error message you linked does not show an issue with the Python installation but the permissions are wrong on the 'howdy.py' file, that's what the error message says: can't open file 'howdy.py': [Errno 1] Operation not pe

[issue40649] [Errno 1]

2020-05-17 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: It's because application on recent versions of MacOS cannot access files in some directories without being granted permission explicitly, a permission model similar to what iOS and Android. You can grant them additional permission using System Preferences

[issue40670] supplying an empty string to timeit causes an IndentationError

2020-05-18 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Is this different than what you would expect? Supplying garbage to timeit will result in an error: >>> from timeit import timeit >>> timeit('weofinwofinwe') Traceback (most recent call last): File "", line 1, in File

[issue40673] urllib.request.URLopener raises different exceptions based on implementation detail

2020-05-18 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: URLOpener has been deprecated since Python3.3 (https://github.com/python/cpython/blob/master/Lib/urllib/request.py#L1703-L1705) maybe it should just be removed from the codebase? -- nosy: +remi.lapeyre ___ Python

[issue40674] Deprecate urllib.request.urlretrieve() and cleanup()

2020-05-18 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- components: Library (Lib) nosy: remi.lapeyre priority: normal severity: normal status: open title: Deprecate urllib.request.urlretrieve() and cleanup() type: behavior ___ Python tracker <https://bugs.python.org/issue40

[issue40674] Deprecate urllib.request.urlretrieve() and cleanup()

2020-05-18 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +19497 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20197 ___ Python tracker <https://bugs.python.org/issu

[issue40681] shelve.open() should accept pathlib.Path

2020-05-19 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : This should target Python3.10, current behavior is: Python 3.10.0a0 (heads/master:19e3e00264, May 19 2020, 14:40:31) [Clang 11.0.3 (clang-1103.0.32.29)] on darwin Type "help", "copyright", "credits" or "license"

[issue39782] local varible referenced a Exception won't be collected in function

2020-05-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre nosy_count: 2.0 -> 3.0 pull_requests: +19562 pull_request: https://github.com/python/cpython/pull/20288 ___ Python tracker <https://bugs.python.org/issu

[issue29847] Path takes and ignores **kwargs

2020-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: PurePath subclasses cannot support kwargs as __new__() does not accept **kwargs: >>> from pathlib import PurePath >>> class MyPurePath(PurePath): ... def __init__(self, *args, **kargs): pass ... >>> MyPurePath('foo', s

[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-05-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +19563 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20288 ___ Python tracker <https://bugs.python.org/issu

[issue39782] local varible referenced a Exception won't be collected in function

2020-05-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- pull_requests: -19562 ___ Python tracker <https://bugs.python.org/issue39782> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40273] mappingproxy isn't reversible

2020-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I think this issue can be closed thanks to Zackery Spytz. -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue40

[issue40713] _zoneinfo.c can use dst_offset without initialization in parse_tz_str()

2020-05-21 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +19564 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20289 ___ Python tracker <https://bugs.python.org/issu

[issue40713] _zoneinfo.c can use dst_offset without initialization in parse_tz_str()

2020-05-21 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : Here's the warning given by clang: /Users/remi/src/cpython/Modules/_zoneinfo.c:1487:9: warning: variable 'dst_offset' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (*p == '\0'

[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Vitalii, can you give more context about why you are writing this code, what you expect it to do and why is there a bug? -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue40

[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-05-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: There is no official way, you can find both in the Python tree: all caps at https://github.com/python/cpython/blob/master/Lib/ast.py#L615-L636 and snake case at https://github.com/python/cpython/blob/master/Lib/uuid.py#L76-L79. I think it's common to us

[issue40726] ast.Call end_lineno is defined and returns None

2020-05-22 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This was done in b7e9525f9c7ef02a1d2ad8253afdeb733b0951d4 for issue 36287, all attribute should now be defined, even when they are not set. It looks like some parts of the ast module where not updated. If nobody works on this I will send a PR to update the

[issue40028] Math module method to find prime factors for non-negative int n

2020-05-22 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Mark Dickinson, I was waiting for everyone to have a chance to comment on this issue and read their reply before answering. It seems to me that there some core developers are mildly in favor of a new imath module and it's has been proposed on th

[issue40745] Typo in library/typing

2020-05-23 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Héctor, can you open a new PR with those changes? -- nosy: +remi.lapeyre versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue40

[issue40743] [CMake] It's 2020, where is CMake?

2020-05-23 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Can you point to specific issues with the current build system? It seems to me that for 1. it will only make it easier for projects that use CMake, 2. the build system is not the only part needed to support a new OS and for 3. I've not found Python

[issue40752] Implement PurePath.__len__

2020-05-24 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: PurePath is not iterable but I would expect len(Path('/home/remi/src/cpython')) == 4 The fact the the path is stored as a string is an implementation detail, it seems leaky to get the length of the string here. -- nosy: +re

[issue40752] Implement PurePath.__len__

2020-05-24 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > Remi: Your use case is taken care of by `len(path.parts)`. Yes, and your use case is taken care of by `len(str(path))` which works as well. The reason in the PR is to simplify: sorted(paths, key=lambda path: len(str(path)), reverse=True) to sorted(pa

[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-25 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > As an example, if I write character "A" as a byte, i.e b'A' in a csv file But you can't write b'A' in a csv file, what you can't do is write `b'a'.decode()` or `b'a'.decode('latin1'

[issue40768] pyaudio

2020-05-25 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : Hi Mansi, this is not an issue in the Python interpreter but with a third party module. This bug tracker is only for reporting issues with the CPython interpreter. If you read the error message you attached, there is some steps given to fix your issue, you

[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-25 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > in real-life that b-prefixed string is just not readable by another program > in an easy way If another program opens this CSV file, it will read the string "b'A'" which is what this field actually contains. Everything that is not

[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-26 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I don't think this would be accepted but I think you could try to propose that on the python-ideas mailing list to get some feedback on your proposal. -- nosy: +skip.montanaro ___ Python tracker &

[issue40787] Mysql + unittest crash

2020-05-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Lucas, this is probably not an issue with unittest but a bug in the test themselves. Can you attach an example to reproduce the issue? -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue40

[issue40797] multiprocessing.Semaphore has undocumented get_value() method

2020-05-27 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : The threading.Semaphore class does not have this method, it is undocumented and useless on some system (at least MacOS): >>> s.get_value() Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.fr

[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I checked and FunctionTestCase seems to completely break the loader. The tests for FunctionTestCase in the standard library instantiate the class from inside the method of a TestCase so the loader never see them but even the simple test file I attached

[issue40798] The deprecated-removed Sphinx extension need to change the error message based on the Python version

2020-05-27 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : The new deprecated-removed extension in the documentation always produces text like this: Deprecated since version 3.4, will be removed in version 3.8: MD5 as implicit default digest This message should be used in the documentation of 3.4 to 3.7 and then

[issue22250] unittest lowercase methods

2020-05-28 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: See for example https://mail.python.org/archives/list/python-id...@python.org/thread/4HE2GFL27LGBSHGWOBDOOBPEULC52U4D/#RC3QWQUX6VP56K2WXSMRZ5IGNAUBXKRI -- nosy: +remi.lapeyre ___ Python tracker <ht

  1   2   3   4   5   6   >