[issue36971] Add subsections in C API "Common Object Structures" page

2019-10-29 Thread Dino Viehland
Dino Viehland added the comment: @BTaskaya Seems done, I'll go ahead and close it -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0

2019-10-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: Thank you for your comments, but accepting non-floats like Decimal and Fraction (and int, of course!) is a hard requirement for the statistics module. fmean will naturally convert any data to float for speed, but the other means will attempt to keep the

[issue36993] zipfile: tuple IndexError on extract

2019-10-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +16506 pull_request: https://github.com/python/cpython/pull/16980 ___ Python tracker ___

[issue36993] zipfile: tuple IndexError on extract

2019-10-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +16505 pull_request: https://github.com/python/cpython/pull/16979 ___ Python tracker ___

[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 4c155f738dc2e70ccb574f5169ad89c01753c6f7 by Raymond Hettinger (Géry Ogam) in branch 'master': bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520)

[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

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

[issue37523] zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile

2019-10-29 Thread Daniel Hillier
Daniel Hillier added the comment: Good point. Thanks for the advice. I've updated it to use timeit. Does that give a better indication? import zipfile test_zip = "time_test.zip" test_name = "test_name.txt" # with zipfile.ZipFile(test_zip, "w") as zf: # zf.writestr(test_name, "Hi there!

[issue38627] Add copy() method to pathlib

2019-10-29 Thread Sebastian Linke
Sebastian Linke added the comment: Docstring could be: Copy file content and permission bits of this path to the target path and return a new Path instance pointing to the target path. If target is a directory, the base filename of this path is added to the target and a new file corresponding

[issue38613] Optimize some set operations in dictkeys object

2019-10-29 Thread Inada Naoki
Inada Naoki added the comment: > How does it work with dict subclasses? PySet_New(iterable) uses fast path only when `PyDict_CheckExact(iterable)` is true. So there is no change for dict subclasses. -- ___ Python tracker

[issue38613] Optimize some set operations in dictkeys object

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But what if a dict subclass overrides __iter__? You can get different result if set(d) != set(d.keys()). -- ___ Python tracker ___

[issue38541] Performance degradation of attribute accesses in Python 3.7.4

2019-10-29 Thread ttrd
ttrd added the comment: I just ran the test with Python 3.7.5: As expected, I got the same results as in Python 3.7.4. Nevertheless, thanks for the response. So we will stay with Python 3.7.3 for now and switch to Python 3.8 as soon as possible. --

[issue31026] test_dbm fails when run directly

2019-10-29 Thread Larry Hastings
Larry Hastings added the comment: New changeset d7b336fe5d54f73c758802df426e06e8a674bd63 by Larry Hastings (Serhiy Storchaka) in branch '3.5': [3.5] bpo-31026: Fix test_dbm if dbm.ndbm is build with Berkeley DB. (GH-6632)

[issue37523] zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Daniel. But profiling is not good for benchmarking, it adds too much overhead. It can help to find narrow places, but for measuring effect of optimization you need to measure the raw time on non-debug build. Semantically your changes are

[issue36993] zipfile: tuple IndexError on extract

2019-10-29 Thread miss-islington
miss-islington added the comment: New changeset 3801b2699eb9441ca31c6ec8fa956fc0fe755ef7 by Miss Skeleton (bot) in branch '3.8': bpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. (GH-14656)

[issue36993] zipfile: tuple IndexError on extract

2019-10-29 Thread miss-islington
miss-islington added the comment: New changeset f7d50f8f997fbfce1556991a3700826536871fe7 by Miss Skeleton (bot) in branch '3.7': bpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. (GH-14656)

[issue28029] Replace and empty strings

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that no tests were affected by this change. -- ___ Python tracker ___ ___

[issue28029] Replace and empty strings

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are expected some relations between str methods. For example, s.replace(a, b, n) == s.replace(a, b) if n >= s.count(a) len(s.replace(a, b, n)) == len(s) + (len(b)-len(a)) * n if 0 <= n <= s.count(a) len(s.replace(a, b, n)) == len(s) +

[issue36971] Add subsections in C API "Common Object Structures" page

2019-10-29 Thread Batuhan
Batuhan added the comment: PR 13446 is merged, anything else is needed or can this issue be closed? -- nosy: +BTaskaya ___ Python tracker ___

[issue36666] threading.Thread should have way to catch an exception thrown within

2019-10-29 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Ran Benita
Ran Benita added the comment: You can take it - thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38628] Issue with ctypes in AIX

2019-10-29 Thread Ayappan
New submission from Ayappan : There seems to be a behavioral issue with ctypes in AIX. The specific symptom is that passing structures containing arrays to a C function by value appears to be broken. Consider the below program., #!/usr/bin/env python3 from ctypes import * libc =

[issue14196] Unhandled exceptions in pdb return value display

2019-10-29 Thread Batuhan
Batuhan added the comment: Can't reproducible in py3 (3.8), IMHO can be closed. -- nosy: +BTaskaya ___ Python tracker ___ ___

[issue19510] lib2to3.fixes.fix_import gets confused if implicit relative imports and absolute imports are on the same line

2019-10-29 Thread Batuhan
Batuhan added the comment: > It’s still a bug though :) It gives a warning about this though RefactoringTool: ### In file test/t.py ### RefactoringTool: Line 1: absolute and local imports together If it still counts as a bug, let me know and i'll try to prepare a patch. --

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-10-29 Thread Andrew Svetlov
Change by Andrew Svetlov : -- components: +asyncio nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38316] docs: Code object's "co_stacksize" field is described with mistake

2019-10-29 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +16509 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16983 ___ Python tracker ___

[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-10-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: Well, if the reported line is invalid it should be fixed -- ___ Python tracker ___ ___

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Ran Benita
New submission from Ran Benita : The numbers.Real ABC requires the __ceil__ and __floor__ methods (https://github.com/python/cpython/blob/v3.8.0/Lib/numbers.py#L178-L186), however, the float type does not have them. In regular Python, this is not a problem, because math.ceil() and

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-10-29 Thread STINNER Victor
New submission from STINNER Victor : subprocess.Popen.send_signal() doesn't check if the process exited since the poll() method has been called for the last time. If the process exit just before os.kill() is called, the signal can be sent to the wrong process if the process identified is

[issue23692] Undocumented feature prevents re module from finding certain matches

2019-10-29 Thread Lewis Gaul
Lewis Gaul added the comment: Thanks for the explanation Matthew, I'll take a further look at some point in the coming weeks. -- ___ Python tracker ___

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2019-10-29 Thread STINNER Victor
STINNER Victor added the comment: > should we backport a documentation change for this? (the deprecatedremoved > says 4.0 currently) Done. Thanks for the reminder. -- ___ Python tracker

[issue21142] Daily/weekly ABI scan?

2019-10-29 Thread Batuhan
Batuhan added the comment: Tools/c-globals moved under Tools/c-analyzer -- nosy: +BTaskaya ___ Python tracker ___ ___

[issue30533] missing feature in inspect module: getmembers_static

2019-10-29 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-10-29 Thread STINNER Victor
STINNER Victor added the comment: I noticed this issue by reading subprocess code while working on bpo-38207 ("subprocess: Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe") and bpo-38502 ("regrtest: use process groups"). --

[issue36666] threading.Thread should have way to catch an exception thrown within

2019-10-29 Thread Mark Borgerding
Mark Borgerding added the comment: @pitrou I don't necessarily agree that "current behavior can't be changed". One major selling point of exceptions is that they cannot be accidentally ignored. The exception is how the current threading.Thread ignores them. You are correct that changing

[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-10-29 Thread STINNER Victor
New submission from STINNER Victor : I replaced dozens of Py_FatalError() calls with better error reporting, but there are still many places calling Py_FatalError(). The problem of Py_FatalError() is when Python is embedded into an application: Python must not kill the whole process. Well,

[issue32081] ipaddress should support fast IP lookups

2019-10-29 Thread Batuhan
Change by Batuhan : -- nosy: +BTaskaya, pmoody ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2019-10-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1d2862a323ae1387e306942253b1e487018e2b7f by Victor Stinner in branch '3.8': bpo-37330: open(): "U" mode is removed in Python 3.9 (GH-16972) https://github.com/python/cpython/commit/1d2862a323ae1387e306942253b1e487018e2b7f --

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2019-10-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +16508 pull_request: https://github.com/python/cpython/pull/16982 ___ Python tracker ___

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2019-10-29 Thread Batuhan
Batuhan added the comment: Victor's PR 11507 is closed, what actions are going to be taken next? Close the issue as Mariatta said? -- nosy: +BTaskaya ___ Python tracker ___

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

2019-10-29 Thread Benjamin Edwards
Benjamin Edwards added the comment: Thanks Netzeband, Will get on this. Ben -- ___ Python tracker ___ ___ Python-bugs-list

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2019-10-29 Thread STINNER Victor
STINNER Victor added the comment: Python 2 users have this bug since 2010, I think that it's fine to not fix it. Python 2 support ends at the end of the year. I close the issue. The issue has been fixed in Python 3.6 and newer. -- resolution: -> fixed stage: patch review ->

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2019-10-29 Thread miss-islington
miss-islington added the comment: New changeset 4cb08b6c0ae6989d169dd48c2b24087941f6d0b0 by Miss Skeleton (bot) in branch '3.7': bpo-37330: open(): "U" mode is removed in Python 3.9 (GH-16972) https://github.com/python/cpython/commit/4cb08b6c0ae6989d169dd48c2b24087941f6d0b0 --

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-10-29 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +16510 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16984 ___ Python tracker ___

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Batuhan
Batuhan added the comment: Ran, do you want to work on this or can i take it? -- nosy: +BTaskaya ___ Python tracker ___ ___

[issue38627] Add copy() method to pathlib

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since shutil.copy() accepts path-like object, I do not think there is a need to add the copy method to Path. As for additional limitation, it looks arbitrary and application specific. You can easy implement a simple helper function as you just

[issue36993] zipfile: tuple IndexError on extract

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset da6ce58dd5ac109485af45878fca6bfd265b43e9 by Serhiy Storchaka (Daniel Hillier) in branch 'master': bpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. (GH-14656)

[issue28029] Replace and empty strings

2019-10-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16507 pull_request: https://github.com/python/cpython/pull/16981 ___ Python tracker ___

[issue36993] zipfile: tuple IndexError on extract

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Daniel. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python tracker

[issue38621] Bad decoding of encoded-words in unstructured email headers

2019-10-29 Thread Fred Drake
Fred Drake added the comment: This problem does not exist in Python 3.6 or Python 3.8; it appears to only exist in Python 3.7. -- versions: +Python 3.7 ___ Python tracker

[issue38621] Bad decoding of encoded-words in unstructured email headers

2019-10-29 Thread Ned Deily
Change by Ned Deily : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38633] shutil.copystat fails with PermissionError in WSL

2019-10-29 Thread Peter
New submission from Peter : Using shutil.copystat (and therefore also shutil.copytree) in WSL on any directories from a mounted Windows drive (i.e. /mnt/c/...) raises an shutil.Error "[Errno 13] Permission denied". It seems to fail when copying the extended filesystem attribute

[issue38621] Bad decoding of encoded-words in unstructured email headers

2019-10-29 Thread Fred Drake
Fred Drake added the comment: It turns out this was a problem in 3.7.4; Python 3.7.5 seems to have fixed this. Sorry for the noise. Guess it's time to update my application to use 3.7.5! -- resolution: -> fixed stage: -> resolved status: open -> closed

[issue38632] setup.py sdist should honor SOURCE_DATE_EPOCH

2019-10-29 Thread Zack Weinberg
New submission from Zack Weinberg : Reproducibility has so far been concerned primarily with binary packages, but it's also desirable for source tarballs to be reproducible starting from a version-control checkout. This is particularly important for Python, where 'setup.py sdist' can run

[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-10-29 Thread serge-sans-paille
Change by serge-sans-paille : -- keywords: +patch pull_requests: +16512 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16986 ___ Python tracker

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Batuhan
Change by Batuhan : -- keywords: +patch pull_requests: +16511 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16985 ___ Python tracker ___

[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-10-29 Thread serge-sans-paille
New submission from serge-sans-paille : See https://bugs.llvm.org/show_bug.cgi?id=43830, but basically the follwing code: ``` // a.c #include int main() { Py_Initialize(); PyRun_SimpleString("import readline; print(readline.__doc__)"); return 0; } ``` compiled like this: ``` % gcc

[issue14196] Unhandled exceptions in pdb return value display

2019-10-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Batuhan, thanks for the nudge. For the record ... If __new__ were a normal instance method, then 'some_class.__new__()' would be a correct call, as 'some_class' would be passed to '__new__' as its first and perhaps only argument. But " __new__() is a

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35745] Add import statement in dataclass code snippet

2019-10-29 Thread Eric V. Smith
Eric V. Smith added the comment: Closed in favor of issue 36661 (which I realize was opened later, but has more discussion, so I'm using it going forward). -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue36666] threading.Thread should have way to catch an exception thrown within

2019-10-29 Thread Mark Borgerding
Mark Borgerding added the comment: I'm not trying to disrespect anyone: not users nor certainly Python developers. I have loved Python since I learned it in 2001. I was merely trying to respond to what seemed like an automatic rejection of changing legacy behavior. I certainly agree

[issue36666] threading.Thread should have way to catch an exception thrown within

2019-10-29 Thread Joel Croteau
Joel Croteau added the comment: I'm kind of in agreement with Mark on this, actually. I came across this problem when examining some threaded code that was clearly not working as intended, but was reporting success. Figuring out why that was was not easy. The code had been hastily ported to

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If float.__ceil__ is only needed for typeshed, maybe add a special case for typeshed? I have doubts about adding a C code which is never even executed. -- nosy: +serhiy.storchaka ___ Python tracker

[issue38598] IDLE: Disable F5, etc, in Shell and Output windows.

2019-10-29 Thread Tal Einat
Tal Einat added the comment: As a better design for a long-term fix, I suggest: * Avoiding isinstance() checks by instead using a dedicated class attribute and checking that. (I've recently used this pattern for line numbers.) * Instead of baling out inside the "check module" and "run"

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Mark Dickinson
Mark Dickinson added the comment: > I have doubts about adding a C code which is never even executed. My reading of the PR is that it *would* be executed: the math module first looks for the __floor__ special method, then falls back to using the libm floor if that doesn't exist. Am I

[issue38627] Add copy() method to pathlib

2019-10-29 Thread Brett Cannon
Brett Cannon added the comment: And just to add Serhiy's logic, think of pathlib more as an equivalent to os.path than a be-all solution to anything path-related. -- nosy: +brett.cannon ___ Python tracker

[issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem()

2019-10-29 Thread Raphaël M
Raphaël M added the comment: I stumbled upon this issue while reading Python 3.8 and this made me curious. I've tried writing some Python code to reproduce this bug, but I'm unable to -- I should be missing something. Is there a simple snippet showing the issue? Also, the changelog states

[issue38560] Disallow iterable argument unpacking after a keyword argument?

2019-10-29 Thread Brandt Bucher
Brandt Bucher added the comment: I’ve thought about it and I’m +1 on DeprecationWarning in 3.9 and SyntaxError in 3.10. Removing any type of legal function call is tricky, but this is such obscure, sneaky syntax that it’s likely an accident/bug if it does pop up (that’s how I discovered

[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-10-29 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38620] Shell python-config --includes returns the same path twice

2019-10-29 Thread Miro Hrončok
Change by Miro Hrončok : -- nosy: +hroncok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30548] typo in documentation for create_autospec

2019-10-29 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38620] Shell python-config --includes returns the same path twice

2019-10-29 Thread Matthias Klose
Matthias Klose added the comment: Some distros have two include directories in the path, /usr/include /usr/include/ The latter for architecture specific files, so on these distributions the python config file is installed there. Then you'll need to have both include directories.

[issue36666] threading.Thread should have way to catch an exception thrown within

2019-10-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I'd argue such code deserves to be broken That argument falls flat with me and it doesn't show respect for our users. The proposal would be a major change to the "rules of the game" and would likely require discussion and buy-in on python-dev and

[issue38613] Optimize some set operations in dictkeys object

2019-10-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Consider testing PyDict_CheckExact. -- nosy: +rhettinger ___ Python tracker ___ ___

[issue38560] Disallow iterable argument unpacking after a keyword argument?

2019-10-29 Thread Guido van Rossum
Guido van Rossum added the comment: Well, as you point out, f(z=0, *(1, 2)) is legal, and the parser doesn't know what the names of the keyword arguments are. SO this cannot be changed. -- resolution: -> not a bug stage: -> resolved status: open -> closed

[issue38560] Disallow iterable argument unpacking after a keyword argument?

2019-10-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Changes to the grammar of the language need to be discussed on python-dev (especially ones that can break existing code and ones that change syntax that has worked for many years). Arguably, this is something that should just go into a lint tool.

[issue38637] fix GROWTH_RATE comments bug

2019-10-29 Thread toywei
New submission from toywei : It also exists in 3.7/3.6/3.3. -- assignee: docs@python components: Documentation messages: 355688 nosy: docs@python, toywei priority: normal pull_requests: 16516 severity: normal status: open title: fix GROWTH_RATE comments bug type: resource usage

[issue38611] ElementTree.ParseError does not implement SyntaxError interface as expected

2019-10-29 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38637] fix GROWTH_RATE comments bug

2019-10-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: Please explain the bug here on the bug tracker, people shouldn't have to drill down into the PR to find out what it means. Before fixing the bug, you should find out whether or not it actually is a bug. In my testing, the comment is approximately correct:

[issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0

2019-10-29 Thread gaoxinge
gaoxinge added the comment: I think that three kinds of mean should behave like: - `geometric mean`: input should be float, finite and positive - `harmonic mean`: input should be float, finite and nonzero - `mean` or `fmean`: input should be float, finite Otherwise these mean functions

[issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0

2019-10-29 Thread gaoxinge
gaoxinge added the comment: The document https://github.com/WarrenWeckesser/cpython/blob/master/Lib/statistics.py#L389 in `harmonic_mean` is out-dated. I think we can simply follow the wiki: - [arithemic mean](https://en.wikipedia.org/wiki/Arithmetic_mean) - [geometric

[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-10-29 Thread Ned Deily
Ned Deily added the comment: This appears to be essentially a duplicate of Issue13631 which has long proposed full support of libedit. -- assignee: -> gregory.p.smith nosy: +gregory.p.smith, ned.deily ___ Python tracker

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, you are right. I misunderstood the original issue and thought that the code first checks PyFloat_Check() or PyFloat_CheckExact(). If float.__ceil__ will be executed it will add significant overhead for creating and executing the method object.

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Mark Dickinson
Mark Dickinson added the comment: > If float.__ceil__ will be executed it will add significant overhead for > creating and executing the method object. Yes, I'd definitely like to see timings; I think Victor already asked for those on the PR. --

[issue38635] Simplify decoding the ZIP64 extra field and make it tolerant to extra data

2019-10-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16514 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16988 ___ Python tracker

[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2019-10-29 Thread serge-sans-paille
Change by serge-sans-paille : -- pull_requests: +16513 pull_request: https://github.com/python/cpython/pull/16986 ___ Python tracker ___

[issue24686] zipfile is intolerant of extra bytes

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Interesting, but all extra after the Extended Timestamp field is a UTF-8 encoded text: b"\n\x00

[issue36702] test_dtrace failed

2019-10-29 Thread will rogers
will rogers added the comment: I also encountered this on Scientific Linux 7.4 (Linux 3.10.0-693.11.6.el7.x86_64) while trying to build Python 3.8.0. I think it is due to differences in versions of 'dtrace' on different platforms. On my MacOS-X v10.14.6 (Mojave) system, the 'dtrace' command

[issue38636] "Alt + T" and "Alt + U" Broken in IDLE on Windows

2019-10-29 Thread Stephen Paul Chappell
New submission from Stephen Paul Chappell : In the latest Python 3.8.0 installation when running IDLE on Windows, pressing "Alt + T" generates the following error: Exception in Tkinter callback Traceback (most recent call last): File "C:\Program

[issue38635] Simplify decoding the ZIP64 extra field and make it tolerant to extra data

2019-10-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The decoding code can be much shorter and efficient. Also, the Info-ZIP unzip utility is tolerant to extra bytes. We can be too. -- components: Library (Lib) messages: 355676 nosy: serhiy.storchaka priority: normal severity: normal status: open

[issue28029] Replace and empty strings

2019-10-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: The current docs could certainly use clarification. FWIW, here is a link to my explanation for the existing logic in str.replace(): https://stackoverflow.com/questions/16645083 Perhaps some of that wording may be helpful. -- nosy: +rhettinger

[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-10-29 Thread Steve Dower
Steve Dower added the comment: The discussion on the PR has raised one scenario where our algorithm conflicts with what we can reasonably emulate from the IO manager (which is itself not entirely self-consistent): If you call ntpath.realpath(r"C:\spam\eggs") where "spam" is a

[issue37957] Allow regrtest to receive a file with test (and subtests) to ignore

2019-10-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +16515 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16989 ___ Python tracker

[issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0

2019-10-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Maybe we should hold-off on adding negative number support unless a compelling use case arises. It is telling that scipy.stats.hmean() and that MS Excel's harmean() haven't found justification to add negative number support. In all likelihood, a

[issue37839] makesetup Doesn't Handle Defines with Equal Sign

2019-10-29 Thread Jamie Bliss
Jamie Bliss added the comment: Similarly, stumbled across this working on https://github.com/pyz-dispenser/cpython-static This is particularly problematic because of the SQLite module's MODULE_NAME macro. -- nosy: +astronouth7303 ___ Python

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are also ncurses functions get_tabsize() and get_escdelay(). In other implementations they can be modeled by returning the TABSIZE and ESCDELAY global variables. -- nosy: +serhiy.storchaka ___ Python

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-10-29 Thread Anthony Sottile
Anthony Sottile added the comment: ah, I'll add those too -- I can do that in the current PR -- ___ Python tracker ___ ___

[issue28029] Replace and empty strings

2019-10-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg355681 ___ Python tracker ___ ___ Python-bugs-list

[issue28029] Replace and empty strings

2019-10-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg355679 ___ Python tracker ___ ___ Python-bugs-list

[issue38611] ElementTree.ParseError does not implement SyntaxError interface as expected

2019-10-29 Thread Jim Carroll
Jim Carroll added the comment: This patch solves the issue diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index c3f30c9339..d265021f75 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -2782,6 +2782,7 @@ treebuilder_handle_start(TreeBuilderObject* self,

[issue28029] Replace and empty strings

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Raymond, the link is about str.split(), not str.replace(). -- ___ Python tracker ___ ___

  1   2   >