[issue38627] Add copy() method to pathlib

2019-10-28 Thread Sebastian Linke
New submission from Sebastian Linke : pathlib.Path() could wrap shutil.copy() with something like this: def copy(self, target): if not self.is_file(): # No support for directories here raise ValueError("Path must point to a regular file") # copy() appends filename when

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

2019-10-28 Thread Daniel Hillier
Daniel Hillier added the comment: Here's the script I used for profiling and the results I observed with and without the closed check in read: 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

[issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py

2019-10-28 Thread Larry Hastings
Change by Larry Hastings : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py

2019-10-28 Thread Larry Hastings
Larry Hastings added the comment: New changeset 3fe1b19265b55c290fc956e9aafcf661803782de by larryhastings (Victor Stinner) in branch '3.5': bpo-38243, xmlrpc.server: Escape the server_title (GH-16373) (GH-16441) (#16516)

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

2019-10-28 Thread Wei-Cheng Pan
Wei-Cheng Pan added the comment: > Usually, it is a sign of a problem in user code, e.g. something should be > pushed into executor. Sometimes also happens on low-end CI machines. And the message is somewhat unclear to me. I have to grep cpython sources to understand that it is coming from

[issue38626] small change at bisect_left function for easy understanding

2019-10-28 Thread miss-islington
miss-islington added the comment: New changeset 3c88199e0be352c0813f145d7c4c83af044268aa by Miss Skeleton (bot) (Raymond Hettinger) in branch 'master': bpo-38626: Add comment explaining why __lt__ is used. (GH-16978)

[issue34790] Deprecate passing coroutine objects to asyncio.wait()

2019-10-28 Thread Kyle Stanley
Kyle Stanley added the comment: > Is this whatsnew/3.8.rst entry correct and complete? > The :func:`asyncio.coroutine` :term:`decorator` is deprecated and will be > removed in version 3.10. Instead of ``@asyncio.coroutine``, use > :keyword:`async def` instead. (Contributed by Andrew

[issue38626] small change at bisect_left function for easy understanding

2019-10-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +16504 pull_request: https://github.com/python/cpython/pull/16978 ___ Python tracker ___

[issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject()

2019-10-28 Thread hai shi
hai shi added the comment: Thanks for your patience, Serhiy. IMHO, i called the moving operation `clean code`: Consistent understanding, Consistent code. And the `clean code` should be a part of `enhancement`. -- ___ Python tracker

[issue34790] Deprecate passing coroutine objects to asyncio.wait()

2019-10-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is this whatsnew/3.8.rst entry correct and complete? ''' The :func:`asyncio.coroutine` :term:`decorator` is deprecated and will be removed in version 3.10. Instead of ``@asyncio.coroutine``, use :keyword:`async def` instead. (Contributed by Andrew

[issue38626] small change at bisect_left function for easy understanding

2019-10-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Tim. Thank you for the suggestion though. -- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue38626] small change at bisect_left function for easy understanding

2019-10-28 Thread Tim Peters
Tim Peters added the comment: So as far as possible, CPython only uses __lt__ ("<") element comparisons for its order-sensitive algorithms. This is documented for list.sort(), but the bisect and heapq modules strive to do the same. The point is to minimize the number of comparison methods

[issue38626] small change at bisect_left function for easy understanding

2019-10-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38626] small change at bisect_left function for easy understanding

2019-10-28 Thread Windson Yang
New submission from Windson Yang : bisect_left should be similar to bisect_right. However, the current implement didn't reflect it. A little bit update for the bisect_left function could make the user easy to understand their relation. def bisect_left(a, x, lo=0, hi=None): if lo < 0:

[issue38125] Can' build document in Sphinx v2.2.0

2019-10-28 Thread Windson Yang
Change by Windson Yang : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38624] pathlib .suffix, .suffixes, .stem unexpected behavior for pathname with trailing dot

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

[issue34790] Deprecate passing coroutine objects to asyncio.wait()

2019-10-28 Thread Kyle Stanley
Kyle Stanley added the comment: GH-16977 Implements the deprecation warning, adds tests, and adds the 3.9 whatsnew entry. Once this PR is finalized, I think this issue can be closed. -- stage: patch review -> ___ Python tracker

[issue34790] Deprecate passing coroutine objects to asyncio.wait()

2019-10-28 Thread Kyle Stanley
Change by Kyle Stanley : -- pull_requests: +16503 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16977 ___ Python tracker ___

[issue38334] zipfile: Seeking encrypted file breaks after seeking backwards

2019-10-28 Thread Daniel Hillier
Daniel Hillier added the comment: Thanks for your help! Good point, I'll create a new change for the refactoring. -- ___ Python tracker ___

[issue34790] Deprecate passing coroutine objects to asyncio.wait()

2019-10-28 Thread Kyle Stanley
Kyle Stanley added the comment: GH-16975 Is a simple fix for the asyncio.wait() whatsnew entry for 3.8. I'll implement the deprecation warning and add a 3.9 whatsnew entry in a separate PR, since those changes won't be backported. -- stage: patch review ->

[issue34790] Deprecate passing coroutine objects to asyncio.wait()

2019-10-28 Thread Kyle Stanley
Change by Kyle Stanley : -- pull_requests: +16502 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16975 ___ Python tracker ___

[issue38625] SpooledTemporaryFile does not seek correctly after being rolled over

2019-10-28 Thread Graham Coster
New submission from Graham Coster : Hi there, As demonstrated in the attached script, I found that a StopIteration exception occurs once a SpooledTemporaryFile has been rolled over from memory to disk, even though seek(0) had move the file position to the top of the file. I had previously

[issue38625] SpooledTemporaryFile does not seek correctly after being rolled over

2019-10-28 Thread Graham Coster
Change by Graham Coster : -- components: Library (Lib) files: spooled-temp-file-does-not-seek-correctly-after-being-rolled.py nosy: Gary Fernie, James Hennessy, graham.coster, inada.naoki, martin.panter, nubirstein, r.david.murray, serhiy.storchaka, terry.reedy priority: normal

[issue38599] Deprecate creation of asyncio object when the loop is not running

2019-10-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'm pretty happy with asyncio.run() functionalit. I used run() for the bug demonstration, but the example can be rewritten easily without this function. The problem is not in run() but in an object lifecycle. Implicit loop creation plus module-level

[issue38624] pathlib .suffix, .suffixes, .stem unexpected behavior for pathname with trailing dot

2019-10-28 Thread Inyeol Lee
New submission from Inyeol Lee : Python3.8 pathlib treats dot between path stem and suffix as part of suffix in general: >>> a = pathlib.Path('foo.txt') >>> a.stem, a.suffix ('foo', '.txt') >>> a.with_suffix('') PosixPath('foo') However, if pathname ends with dot, it treats the trailing dot

[issue38623] Python documentation should mention how to find site-packages

2019-10-28 Thread Peter Bittner
Change by Peter Bittner : -- keywords: +patch pull_requests: +16500 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16974 ___ Python tracker ___

[issue38623] Python documentation should mention how to find site-packages

2019-10-28 Thread Peter Bittner
New submission from Peter Bittner : A popular question on StackOverflow is, "How do I find the location of my Python site-packages directory?" [1] While this may hint at a deeper problem that needs to be solved, a user suggested [2] the accepted answer to be added to Python's official

[issue38599] Deprecate creation of asyncio object when the loop is not running

2019-10-28 Thread Yury Selivanov
Yury Selivanov added the comment: > Well, I'm basically using a run method defined as a shorthand for > self.loop.run_until_complete (without closing loop, reusing it throughout). > It would be nice if asyncio.run could simply be used instead, but I > understand you're saying this is easier

[issue38599] Deprecate creation of asyncio object when the loop is not running

2019-10-28 Thread Berry Schoenmakers
Berry Schoenmakers added the comment: Well, I'm basically using a run method defined as a shorthand for self.loop.run_until_complete (without closing loop, reusing it throughout). It would be nice if asyncio.run could simply be used instead, but I understand you're saying this is easier

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

2019-10-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16499 pull_request: https://github.com/python/cpython/pull/16972 ___ Python tracker ___

[issue38589] Bad target address assigned in Python Manuals shortcut on Python installation

2019-10-28 Thread miss-islington
miss-islington added the comment: New changeset 2267cb9da4a1fd8bb4962beb893e1f69a37909a7 by Miss Skeleton (bot) in branch '3.8': bpo-38589: Fixes HTML Help shortcut when Windows is not installed to C drive (GH-16968)

[issue38589] Bad target address assigned in Python Manuals shortcut on Python installation

2019-10-28 Thread miss-islington
miss-islington added the comment: New changeset 379b55b526a04e6db40c7070fd70f0d7d37bba64 by Miss Skeleton (bot) in branch '3.7': bpo-38589: Fixes HTML Help shortcut when Windows is not installed to C drive (GH-16968)

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

2019-10-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-10-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject()

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no bug. We can add Py_INCREF/Py_DECREF in ast.c. We can remove Py_INCREF/Py_DECREF from compile.c. But all this would just add code churn. -- resolution: -> rejected stage: -> resolved status: open -> closed

[issue38589] Bad target address assigned in Python Manuals shortcut on Python installation

2019-10-28 Thread Steve Dower
Change by Steve Dower : -- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38589] Bad target address assigned in Python Manuals shortcut on Python installation

2019-10-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +16498 pull_request: https://github.com/python/cpython/pull/16971 ___ Python tracker ___

[issue38589] Bad target address assigned in Python Manuals shortcut on Python installation

2019-10-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +16497 pull_request: https://github.com/python/cpython/pull/16970 ___ Python tracker ___

[issue38589] Bad target address assigned in Python Manuals shortcut on Python installation

2019-10-28 Thread Steve Dower
Steve Dower added the comment: New changeset 0ac6137dd3d1e2c8f9558153ad63021f57e05e73 by Steve Dower in branch 'master': bpo-38589: Fixes HTML Help shortcut when Windows is not installed to C drive (GH-16968) https://github.com/python/cpython/commit/0ac6137dd3d1e2c8f9558153ad63021f57e05e73

[issue38494] Add assert_not_called_with

2019-10-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36723] Unittest Discovery for namespace subpackages dot notation fails

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc)

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35617] unittest discover does not work with implicit namespaces

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38505] Mock.call_args and Mock.call_args_list not propagated to parent Mock

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37052] Add examples for mocking async for and async context manager in unittest.mock docs

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38494] Add assert_not_called_with

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38122] AsyncMock force always creating an AsyncMock for child mocks

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38384] An assertion failure in test_pickle

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7897] Support parametrized tests in unittest

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38091] Import deadlock detection causes deadlock

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30587] Mock with spec object does not ensure method call signatures

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32092] mock.patch with autospec does not consume self / cls argument

2019-10-28 Thread Phil Connell
Change by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-10-28 Thread Cooper Lees
Cooper Lees added the comment: Updated PR to use venv.ini. Will fix any CI errors encountered. -- ___ Python tracker ___ ___

[issue31026] test_dbm fails when run directly

2019-10-28 Thread Larry Hastings
Larry Hastings added the comment: For what it's worth, I'm cherry-picking this back into 3.5 for 3.5.8 final. I (finally?) got bit by this, and since the patch is literally only changes in the Lib/test directory I consider it safe to merge even after 3.5.8rc2. (I was in a bit of a hurry,

[issue35448] ConfigParser .read() - handling of nonexistent files

2019-10-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: FWIW, I agree with closing this. I already changed my mind from my earlier comment and decided that IDLE should maybe switch to using open and read_file in different places, for the reasons given above. It might make testing without depending on a local

[issue38599] Deprecate creation of asyncio object when the loop is not running

2019-10-28 Thread Yury Selivanov
Yury Selivanov added the comment: > It would be nice if asyncio.run() uses the default loop if it's available > (and not running), and that the default loop remains intact after the call > returns. Unfortunately it's not possible to implement that reliably and without a bunch of

[issue38599] Deprecate creation of asyncio object when the loop is not running

2019-10-28 Thread Berry Schoenmakers
Berry Schoenmakers added the comment: The current implementation of asyncio.run() is focused quite a bit on one-shot use. After the call returns, the default event loop is even gone: calling asyncio.get_event_loop() gives "RuntimeError: There is no current event loop in thread

[issue34975] start_tls() difficult when using asyncio.start_server()

2019-10-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: I think it should be closed; Yuri thinks that current streams API is frozen for the sake of shiny brand new streams (don't exist yet). -- resolution: -> wont fix status: open -> closed ___ Python tracker

[issue34975] start_tls() difficult when using asyncio.start_server()

2019-10-28 Thread Ian Good
Ian Good added the comment: #36889 was reverted, so this is not resolved. I'm guessing this needs to be moved to 3.9 now too. Is my original PR worth revisiting? https://github.com/python/cpython/pull/13143/files -- resolution: fixed -> status: closed -> open

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

2019-10-28 Thread Netzeband
Netzeband added the comment: Hello, I'm very sorry, I was not able to find the time to finish the patch in the quality I wanted to have. So @benedwards14 please feel free to provide a pull request. Best regards, André -- ___ Python tracker

[issue38615] imaplib has no timeout setting

2019-10-28 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a reasonable request. It would have to be a 3.9 feature. Perhaps some code (and tests) can be stolen from poplib. -- nosy: +eric.smith stage: -> needs patch versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8

[issue38622] _ctypes.dlsym (py_dl_sym) does not trigger audit hooks

2019-10-28 Thread tholl
New submission from tholl : The dlsym operation generally (e.g. when done through a ctypes.CDLL object) triggers the "ctypes.dlsym" audit event. However, using _ctypes.dlsym directly does not trigger this event. This appears to be an oversight, given that _ctypes.dlopen *does* trigger the

[issue38534] Version 3.8.0 has released with a wrong MS KB number reference

2019-10-28 Thread miss-islington
miss-islington added the comment: New changeset a4ee7abd2056c4956df45125fcf451a531247017 by Miss Skeleton (bot) in branch '3.8': bpo-38534: Replace wrong KB number references (GH-16955) https://github.com/python/cpython/commit/a4ee7abd2056c4956df45125fcf451a531247017 -- nosy:

[issue34938] Fix mimetype.init() to account for from import

2019-10-28 Thread Ashley Whetter
Ashley Whetter added the comment: Maybe updating the dictionaries isn't right at all. I think if you were experienced enough you would have the intuition that mutable attributes like this are not going to change in your local scope if you import them into it. But relying on this knowledge

[issue38534] Version 3.8.0 has released with a wrong MS KB number reference

2019-10-28 Thread Steve Dower
Steve Dower added the comment: Thanks for the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38534] Version 3.8.0 has released with a wrong MS KB number reference

2019-10-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +16496 pull_request: https://github.com/python/cpython/pull/16969 ___ Python tracker ___

[issue38534] Version 3.8.0 has released with a wrong MS KB number reference

2019-10-28 Thread Steve Dower
Steve Dower added the comment: New changeset 794616f837c254c68d8384ab48fb78123a3c8a8b by Steve Dower (benedwards14) in branch 'master': bpo-38534: Replace wrong KB number references (GH-16955) https://github.com/python/cpython/commit/794616f837c254c68d8384ab48fb78123a3c8a8b --

[issue38597] C Extension import limit

2019-10-28 Thread Steve Dower
Steve Dower added the comment: There is an implicit cap due to the C runtime (specifically vcruntime140.dll) allocating fibre local storage on load, which seems like the one you are hitting. However, we discovered this before the first 3.5 release and fixed it. How are you compiling your

[issue38589] Bad target address assigned in Python Manuals shortcut on Python installation

2019-10-28 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +16495 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16968 ___ Python tracker ___

[issue38589] Bad target address assigned in Python Manuals shortcut on Python installation

2019-10-28 Thread Steve Dower
Steve Dower added the comment: Thanks. Turns out it's a typo that's been around forever, but is really not obvious until you install Windows somewhere other than C:\Windows. Apparently that's far less common than it used to be :) We'll get it fixed in the next round of releases. --

[issue38619] [Doc] UUID.hex is lowercase

2019-10-28 Thread Fred Drake
Fred Drake added the comment: While I don't know Felipe's use case, I would expect the documentation to be clear that the representation won't change in the future so users will know that this can be relied on to generate keys into some other persistent structure. -- nosy: +fdrake

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

2019-10-28 Thread Steve Dower
Steve Dower added the comment: I also had to special-case "realpath('nul')" to maintain the behaviour that we deliberately maintained in another bug, and I think isabs() should always return true for "\\?\" prefixed paths (given that join() will promote a "\\?\" prefixed path to the root).

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

2019-10-28 Thread Steve Dower
Steve Dower added the comment: PR 16967 should fix the relative path resolution property, by joining with cwd if the original path is unprefixed and not absolute, and then joining with any symlink directories if their link is not absolute. -- ___

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

2019-10-28 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +16494 pull_request: https://github.com/python/cpython/pull/16967 ___ Python tracker ___

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

2019-10-28 Thread Anthony Sottile
Anthony Sottile added the comment: should we backport a documentation change for this? (the deprecatedremoved says 4.0 currently) -- nosy: +Anthony Sottile ___ Python tracker

[issue17446] doctest test finder doesnt find line numbers of properties

2019-10-28 Thread daniel hahler
daniel hahler added the comment: The PR appears to need a better test according to https://github.com/python/cpython/pull/3419#issuecomment-350570083. -- nosy: +blueyed ___ Python tracker

[issue38519] Internal include files missing on Windows

2019-10-28 Thread miss-islington
miss-islington added the comment: New changeset 07eee640cb3a4eaf1df942bc31a891e7517de763 by Miss Skeleton (bot) in branch '3.8': bpo-38519: Internal include files missing on Windows (GH-16921) https://github.com/python/cpython/commit/07eee640cb3a4eaf1df942bc31a891e7517de763 --

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

2019-10-28 Thread Brett Cannon
Change by Brett Cannon : -- title: Bug in traceback.py -> ElementTree.ParseError does not implement SyntaxError interface as expected ___ Python tracker ___

[issue38593] Python 3.7 does not catch infinite recursion for some values of sys.getrecursionlimit()

2019-10-28 Thread Brett Cannon
Brett Cannon added the comment: Can you provide a small reproducer? Otherwise the recursion check is mostly best effort if you have recursion in C code which never goes out to Python code where the recursion check is implemented. -- nosy: +brett.cannon

[issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject()

2019-10-28 Thread hai shi
hai shi added the comment: > I don't understand the purpose of this issue. The bug tracker is not the > right place to ask question. If you think that it's a bug, please explain how > to trigger the bug. Hi, victor. What i want to express is that the refcount operation of filename should

[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 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38519] Internal include files missing on Windows

2019-10-28 Thread Steve Dower
Steve Dower added the comment: New changeset edb172a87296d9359593a23cd9a09f5867ea1f0e by Steve Dower (Zackery Spytz) in branch 'master': bpo-38519: Internal include files missing on Windows (GH-16921) https://github.com/python/cpython/commit/edb172a87296d9359593a23cd9a09f5867ea1f0e

[issue38519] Internal include files missing on Windows

2019-10-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +16493 pull_request: https://github.com/python/cpython/pull/16966 ___ Python tracker ___

[issue38619] [Doc] UUID.hex is lowercase

2019-10-28 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, it's always guaranteed to be lowercase. I don't think it would hurt to mention lowercase briefly (like add just one word!). -- nosy: +eric.smith ___ Python tracker

[issue28029] Replace and empty strings

2019-10-28 Thread STINNER Victor
STINNER Victor added the comment: > What result would you expect of `"" in ""` and `"".count("")`? I don't suggest to change these operator and method: >>> "" in "" True >>> "".count("") 1 -- ___ Python tracker

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

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

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

2019-10-28 Thread Fred Drake
Fred Drake added the comment: It's worth noting that dealing with this header eventually causes the header parser to enter an infinite loop. -- ___ Python tracker ___

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

2019-10-28 Thread Fred Drake
New submission from Fred Drake : I've encountered a problem parsing an email with this Subject: header: Subject: Be sure to redeem your =?utf-8?Q?$?=201.71 credit card reward certificate by the end of the year email._header_value_parser.get_unstructured defers to get_encoded_word, passing

[issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject

2019-10-28 Thread hai shi
hai shi added the comment: Got it, thanks, Serhiy. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-10-28 Thread Géry
Change by Géry : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28029] Replace and empty strings

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What result would you expect of `"" in ""` and `"".count("")`? -- ___ Python tracker ___ ___

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

2019-10-28 Thread STINNER Victor
New submission from STINNER Victor : When the shell script implementation of python-config was introduced, $PLATINCDIR variable was added: commit 874211978c8097b8e747c90fa3ff41aacabe340f Author: d...@python.org Date: Sat Jan 26 11:39:31 2013 +0100 - Issue #16235: Implement

[issue35448] ConfigParser .read() - handling of nonexistent files

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > There is a use case of this (which some of tools depends) about checking if > configuration exists and if not, raising an error. Now, they can solve this > by just adding check_exist argument. No, it can be solved by using open() and read_file(). It can

[issue37948] get_type_hints fails if there are un-annotated fields in a dataclass

2019-10-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure what can be done with this. The problem is that the decorator doesn't know what's in the caller's namespace. The type being added is "typing.Any". If the caller doesn't import typing, then get_type_hints will fail (as demonstrated here). The

[issue28029] Replace and empty strings

2019-10-28 Thread STINNER Victor
STINNER Victor added the comment: Well, in fact, I would expect that "".replace(...) would always return "": for any argument passed to replace(). -- ___ Python tracker ___

[issue35448] ConfigParser .read() - handling of nonexistent files

2019-10-28 Thread STINNER Victor
STINNER Victor added the comment: > I would expect that this basic usage is very popular. If the file doesn't > exist, the normal usage pattern fails in a confusing way: (...) Well, the configparser is well defined. As you wrote: "If a file named in filenames cannot be opened, that file

[issue28029] Replace and empty strings

2019-10-28 Thread STINNER Victor
STINNER Victor added the comment: The current behavior is really surprising. >>> "".replace("", "|") '|' >>> "".replace("", "|", -1) '|' vs >>> "".replace("", "|", 0) '' >>> "".replace("", "|", 1) '' >>> "".replace("", "|", 1000) '' I always expect "|". --- This behavior makes sense to

  1   2   >