[issue32313] Wrong inspect.getsource for datetime

2020-08-25 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి
Srinivas Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) added the comment: Looks like for `getfile` docs should be updated. On python2.7.17_1, import inspect, datetime print(inspect.getfile(datetime.datetime)) outputs, /usr/local/Cellar/python@2/2.7.17_1/Frameworks/Python.framework/Ver

[issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved

2020-08-25 Thread Wolfgang Fahl
Wolfgang Fahl added the comment: see also https://stackoverflow.com/questions/61788055/sqlite3-error-you-did-not-supply-a-value-for-binding-1 -- ___ Python tracker ___ __

[issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved

2020-08-25 Thread Wolfgang Fahl
Wolfgang Fahl added the comment: The full workaround is in https://github.com/WolfgangFahl/DgraphAndWeaviateTest/commit/f1a58d75f459bf78db327acddaf01d5cf64eb7d4 def testBindingError(self): ''' test list of Records with incomplete record leading to "You did not supply a

[issue41639] Unpickling derived class of list does not call __init__()

2020-08-25 Thread Andy Maier
New submission from Andy Maier : Unpickling an object of a user class that derives from list seems to miss calling the user class's __init__() method: Consider this script, which defines a derived class of the built-in list for the purpose of creating a case insensitive list. The real example

[issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved

2020-08-25 Thread Wolfgang Fahl
Wolfgang Fahl added the comment: see https://github.com/WolfgangFahl/DgraphAndWeaviateTest/issues/7 and https://github.com/WolfgangFahl/DgraphAndWeaviateTest/commit/cc7dbc4c3ade4dd6b2e74f41410e19bc21450490 -- ___ Python tracker

[issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved

2020-08-25 Thread Wolfgang Fahl
Wolfgang Fahl added the comment: My workaround starts with: try: self.c.executemany(insertCmd,listOfRecords) self.c.commit() except sqlite3.ProgrammingError as pe: msg=pe.args[0] if "You did not supply a value for binding" in msg:

[issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved

2020-08-25 Thread Wolfgang Fahl
New submission from Wolfgang Fahl : def testBindingError(self): ''' test list of Records with incomplete record leading to "You did not supply a value for binding 2" ''' listOfRecords=[{'name':'Pikachu', 'type':'Electric'},{'name':'Raichu' }] resul

[issue41548] Tk Window rendering on macOS Big Sur

2020-08-25 Thread Roger Meier
Roger Meier added the comment: The latest macOS Big Sur Public Beta (5, Build 20A5354i) fixes the issue with TK Window rendering. -- resolution: -> works for me ___ Python tracker _

[issue41637] Calling a function with an infinite number of parameters is not detected and crash the interpreter instead of causing an exception

2020-08-25 Thread Camion
New submission from Camion : The following code will obviously cause a memory leak, but this will not be detected and crash the interpreter: def inf(): while True: yield 0 def use(*parm): for i in parm: print(i) and then use(*inf()) or print(*int()) The reaso

[issue41598] Adding support for rounding modes to builtin round

2020-08-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Like Mark, I'm not convinced this is a good idea. Outside of finance calculations which typically already use decimal, the need for it is somewhat rare. Also, the API doesn't fit neatly with existing the __round__ dunder methods, so the new feature cou

[issue41634] Typo in curses documentation

2020-08-25 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +21068 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21958 ___ Python tracker

[issue41636] distutils.util.strtobool documented behaviour

2020-08-25 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +dstufft, eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue30434] multiprocessing AuthenticationError "digest sent was rejected"

2020-08-25 Thread Xiang Zhang
Change by Xiang Zhang : -- resolution: -> out of date stage: test needed -> resolved status: open -> closed ___ Python tracker ___

[issue41636] distutils.util.strtobool documented behaviour

2020-08-25 Thread Graham Oliver
New submission from Graham Oliver : Here is the text https://docs.python.org/3.6/distutils/apiref.html#distutils.util.strtobool Convert a string representation of truth to true (1) or false (0). True values are y, yes, t, true, on and 1; false values are n, no, f, false, off and 0. Raises V

[issue25229] distutils doesn't add "-Wl, " prefix to "-R" on Linux if the C compiler isn't named 'gcc'

2020-08-25 Thread Kenta Tsubouchi
Change by Kenta Tsubouchi : -- pull_requests: +21067 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21957 ___ Python tracker ___ _

[issue37980] regression when passing numpy bools to sorted(..., reverse=r)

2020-08-25 Thread lizardlizard
lizardlizard added the comment: I found this bug searching after noticing weird behaviour in an error message saying sorted expects the reverse flag to be an integer, after it rejected None. This is very surprising. Why isn't it just casting the reverse parameter using bool() to discover it'

[issue41635] flaky test.test_asyncio.test_events.ProactorEventLoopTests.test_call_later

2020-08-25 Thread Thomas Grainger
New submission from Thomas Grainger : == FAIL: test_call_later (test.test_asyncio.test_events.ProactorEventLoopTests) -- Traceback (most recent call last): Fi

[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

2020-08-25 Thread Jonathan Lahav
Jonathan Lahav added the comment: Thank you for checking it so quickly, and answering nicely. I indeed forgot to mention that it happened to me on Windows. Sorry for that. The issue seems similar to the one you linked. I will try and take this to the TCL community since it impacts our produc

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-08-25 Thread Thomas Grainger
Thomas Grainger added the comment: I've confirmed that the pymain_run_module fails on master in the same way with Mac, Windows and Ubuntu -- ___ Python tracker ___ __

[issue41513] High accuracy math.hypot()

2020-08-25 Thread Tim Peters
Tim Peters added the comment: One more implication: since the quality of the initial square root doesn't really much matter, instead of result = sqrt(to_float(parts)) a, b = split(result) parts = add_on(-a*a, parts) parts = add_on(-2.0*a*b, parts) parts = add_on(-b*b, part

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2020-08-25 Thread jack1142
Change by jack1142 : -- nosy: +jack1142 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module)

2020-08-25 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +21065 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21956 ___ Python tracker ___

[issue41585] policy.max_line_length is incorrectly assumed to never be None

2020-08-25 Thread Sebastien Williams-Wynn
Change by Sebastien Williams-Wynn : -- keywords: +patch nosy: +s.williams-wynn nosy_count: 6.0 -> 7.0 pull_requests: +21064 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21955 ___ Python tracker

[issue41634] Typo in curses documentation

2020-08-25 Thread pipythonmc
New submission from pipythonmc : https://docs.python.org/3/library/curses.html#curses.window.addch "overwriting any character previously painter" I believe it should be "overwriting any character previously painted" Also this is my first issue so if I made any mistakes please tell me. I am u

[issue41630] Enable curses support on Windows

2020-08-25 Thread Steve Dower
Steve Dower added the comment: The curses module is currently not supported on Windows, and this patch is far more than just updating the VS build. I've updated the title. Refer to issue31951 for more context. This will need more work than what's been done in the pull request, as _curses is

[issue41625] Add splice() to the os module

2020-08-25 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-08-25 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue40573] inspect.iscorutinefunction() returns False for unittest.mock.AsyncMock instances

2020-08-25 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue37369] Issue with pip in venv on Powershell in Windows

2020-08-25 Thread Steve Dower
Steve Dower added the comment: > The problem is that Powershell has case-sensitive commands and pip is trying > to call path completely in minor case This is not normal configuration. I'm not sure what you've done here, but please open a new issue with details about how you enabled case-sens

[issue41633] pydoc skips methods of nested classes

2020-08-25 Thread Bob Kline
Bob Kline added the comment: Here is the generated documentation. Note that no mention is made of the inner class's method. -- Added file: https://bugs.python.org/file49429/Screen Shot 2020-08-25 at 11.26.39 AM.png ___ Python tracker

[issue41633] pydoc skips methods of nested classes

2020-08-25 Thread Bob Kline
New submission from Bob Kline : Although the documentation for the pydoc says that it produces documentation of the classes recursively, this isn't actually true. -- components: Library (Lib) files: repro.py messages: 375891 nosy: bkline priority: normal severity: normal status: open t

[issue41594] Intermittent failures of loop.subprocess_exec() to capture output

2020-08-25 Thread Yaroslav Halchenko
Yaroslav Halchenko added the comment: Might (although unlikely) be related to https://bugs.python.org/issue40634 which is about BlockingIOError being raised (and ignored) if SelectorEventLoop is reused (not the case here) also in the case of short lived processes. -- nosy: +Yaroslav.

[issue40077] Convert static types to PyType_FromSpec()

2020-08-25 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +21063 pull_request: https://github.com/python/cpython/pull/21954 ___ Python tracker ___ _

[issue40077] Convert static types to PyType_FromSpec()

2020-08-25 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +21062 pull_request: https://github.com/python/cpython/pull/21953 ___ Python tracker ___ _

[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

2020-08-25 Thread E. Paine
E. Paine added the comment: I am struggling to reproduce. On Linux the window shows exactly as expected (it does take a while to close, though, which is understandable) and on Windows the window never shows (it gets stuck before the mainloop). This is, however, not a tkinter problem as I get

[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

2020-08-25 Thread Jonathan Lahav
New submission from Jonathan Lahav : Observation: After creating around 1 widgets (verified with ttk.Label), no more widgets get created, and sometimes graphical artifacts appear outside the application window. No error message or exception is raised. Expected: Either the limit can be re

[issue41598] Adding support for rounding modes to builtin round

2020-08-25 Thread Vedran Čačić
Vedran Čačić added the comment: > I'd rather add whatever bells and whistles we need (if any) to make it easier > for users who care about this to use Decimal. This made me think. (I have tons of these ideas, but usually am afraid of voicing them unless encouraged by comments such as this one

[issue40573] inspect.iscorutinefunction() returns False for unittest.mock.AsyncMock instances

2020-08-25 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue40573] inspect.iscorutinefunction() returns False for unittest.mock.AsyncMock instances

2020-08-25 Thread Irit Katriel
Irit Katriel added the comment: The two implementations of iscoroutinefunction are implemented differently: in inspect: def iscoroutinefunction(obj): """Return true if the object is a coroutine function. Coroutine functions are defined with "async def" syntax. """ return _has_

[issue41598] Adding support for rounding modes to builtin round

2020-08-25 Thread Mark Dickinson
Mark Dickinson added the comment: > I don't think that this will be a very difficult feature to implement. Agreed that it shouldn't be hard to implement, if we do the obvious thing (rounding the exact value that the float represents, rather than trying to do some sort of Do What I Mean round

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-08-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Given how close are we to a release for 3.9 we should try to maximize stability. -- ___ Python tracker ___ ___

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-08-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-08-25 Thread STINNER Victor
STINNER Victor added the comment: One option is to revert all AST changes of bpo-38113 (and following changes), to move back to the state before bpo-38113, until all issues are addressed. -- ___ Python tracker

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-08-25 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue38113] Remove statics from ast.c

2020-08-25 Thread STINNER Victor
STINNER Victor added the comment: > This change introduced a subtle regression: bpo-41194. I modified the _ast > module to use again a global state: (...) Sadly, my fix doesn't work in all cases, there is yet another bug: bpo-41631 "_ast module: get_global_ast_state() doesn't work with Mercu

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-08-25 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-08-25 Thread STINNER Victor
New submission from STINNER Victor : Building Mercurial with Python 3.9.0rc1 fails with the error: SystemError: returned NULL without setting an error The problem comes from the PyAST_Check() function. This function calls get_global_ast_state() which gets the state of the _ast module. If the

[issue41630] Visual Studio does not build the curses and curses.panel module

2020-08-25 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +Windows -Library (Lib) nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue41629] __class__ not set defining 'X' as . Was __classcell__ propagated to type.__new__?

2020-08-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Related SO questions : * https://stackoverflow.com/questions/61543768/super-in-a-typing-namedtuple-subclass-fails-in-python-3-8 * https://stackoverflow.com/questions/41343263/provide-classcell-example-for-python-3-6-metaclass --

[issue41629] __class__ not set defining 'X' as . Was __classcell__ propagated to type.__new__?

2020-08-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: The example used to raise deprecation warning in python 3.7 python3.7 -Wall ../backups/bpo41629.py ../backups/bpo41629.py:4: DeprecationWarning: __class__ not set defining 'X' as . Was __classcell__ propagated to type.__new__? class X(NamedTuple):

[issue40912] _PyOS_SigintEvent is never closed on Windows

2020-08-25 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue41625] Add splice() to the os module

2020-08-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Since it is Linux-specific API, would not be better to add a purposed module > linux? This is an interesting point, but I think that at this particular point it would be more confusing for users than not (normally people go to the os module for sys

[issue41625] Add splice() to the os module

2020-08-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > OpenBSD uses a different API: The semantics are considerably different (splice() is about pipes while sosplice() talks about general sockets). Also, the point of splice() is to skip copying from kernel buffers, but sosplice() does not mention that i

[issue41625] Add splice() to the os module

2020-08-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > The API of splice() looks complicated. How would you use it in Python? It has the same API as copy_file_range and other similar system calls that we already expose, so we just need to do the same thing we do there. > Are off_in and off_out adjusted

[issue41625] Add splice() to the os module

2020-08-25 Thread STINNER Victor
STINNER Victor added the comment: OpenBSD uses a different API: https://man.openbsd.org/sosplice.9 int sosplice(struct socket *so, int fd, off_t max, struct timeval *tv); int somove(struct socket *so, int wait); "The function sosplice() is used to splice together a source and a drain socket.

[issue37369] Issue with pip in venv on Powershell in Windows

2020-08-25 Thread Federico Tabbò
Federico Tabbò added the comment: Hello and sorry for reopening this issue but I have it as well. The problem is that Powershell has case-sensitive commands and pip is trying to call path completely in minor case PS C:\Users\federico.Tabbo\git\nexus2aci\env\Scripts> .\Activate.ps1 (env) PS C:\

[issue41625] Add splice() to the os module

2020-08-25 Thread STINNER Victor
STINNER Victor added the comment: > Are you going to add vmsplice() and tee() too? Since it is Linux-specific > API, would not be better to add a purposed module linux? It's not uncommon that a syscall added to the Linux kernel is later added to other platforms. Example: getrandom() exists

[issue41628] All unittest.mock autospec-generated methods are coroutine functions

2020-08-25 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +lisroach, xtreak versions: +Python 3.10, Python 3.9 -Python 3.7 ___ Python tracker ___ __

[issue41625] Add splice() to the os module

2020-08-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The API of splice() looks complicated. How would you use it in Python? Are off_in and off_out adjusted as in copy_file_range() and sendfile()? It is not clear from the man page. If they are, how would you return updated values? Are you going to add vmsplic