[issue38689] IDLE crashes when KeyError is raised during calltip generation

2019-11-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Further experiments suggest a fix for the hang, which is not specific to this example. See new issue #38695. -- stage: -> test needed type: -> behavior versions: +Python 3.7, Python 3.9 ___ Python tracker

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread Chris Angelico
On Tue, Nov 5, 2019 at 6:26 PM R.Wieser wrote: > > It is considered totally OK to use exception handling as a control > > flow mechanism in Python. > > I'm not sure what exactly you mean with "a control flow mechanism", but as > several methods throw exceptions themselves I will have no choice in

[issue38695] IDLE should restart instead of hanging when subprocess exits

2019-11-04 Thread Terry J. Reedy
New submission from Terry J. Reedy : This is a spinoff from #38689, about 'strange_callable(' in Shell hanging, because there is an uncaught exception is the run process. (See issue for 'strange_callable'.) Running IDLE from Windows Command Prompt, Windows eventually shows the circle

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread R.Wieser
Luciano, > In this context, what I mean by that quote is to say that Python > never forces you to wrap anything in try/except blocks. True. But /not/ doing it means that the casted exeption in the __init__ block will just abort the whole program - in a user unfriendly way. And thats normally

[issue38689] IDLE crashes when KeyError is raised during calltip generation

2019-11-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since isinstance(Object.__call__, types.MethodType) is False, the 'fob' in 'inspect.signature(fob)' is Object. (See the initial get_argspec code.) Indeed, 'inspect.signature(Object)' results in the traceback following inspect.signature(fob) and

Re: __instancecheck__ metaclasses, how do they work: why do I get True when I tuple, why doesn't print run?

2019-11-04 Thread Chris Angelico
On Tue, Nov 5, 2019 at 5:43 PM dieter wrote: > I suppose that "isinstance" (at least under Python 2) does not > behave exactly as stated in PEP 3119. Instead, "isinstance" > first directly checks for the instance to be an instance of the > class *AND ONLY IF THIS FAILS* calls the class'

[issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True

2019-11-04 Thread pascalhofmann
pascalhofmann added the comment: 0.0.0.0/0 is a network with addresses from 0.0.0.0 to 255.255.255.255. 0.0.0.0/8 is a network with addresses from 0.0.0.0 to 0.255.255.255. So 4278190080 out of 4294967296 addresses in 0.0.0.0/0 clearly are no private addresses. --

[issue38694] docs.python.org does not switch version properly

2019-11-04 Thread Dong-hee Na
New submission from Dong-hee Na : 1. open https://docs.python.org/3.8/whatsnew/3.8.html 2. choose dev (3.9) 3. 3.9 whats news should be shown but still showing 3.8 -- assignee: docs@python components: Documentation messages: 356006 nosy: corona10, docs@python priority: normal severity:

Re: __instancecheck__ metaclasses, how do they work: why do I get True when I tuple, why doesn't print run?

2019-11-04 Thread dieter
Veek M writes: I simplify your code to demonstrate what goes on: >>> class MA(type): ... def __instancecheck__(cls, inst): ... print "MA", cls, inst ... >>> class AM(list): __metaclass__ = MA ... >>> am = AM() >>> isinstance(am, AM) True As you can see, even with a class (rather than a

[issue38693] Use f-strings instead of str.format within importlib

2019-11-04 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +16569 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17058 ___ Python tracker

[issue38590] argparse unexpected behavior with argument group inside mutually exclusive group

2019-11-04 Thread paul j3
paul j3 added the comment: With one exception, groups are not designed or intended to be nested. But by inheritance (from _ActionsContainer) nesting isn't blocked nor does it raise any errors. As you surmise, an ArgumentGroup, is used only for grouping the help lines. By default that are

[issue38693] Use f-strings instead of str.format within importlib

2019-11-04 Thread Gregory P. Smith
New submission from Gregory P. Smith : importlib is full of str.format calls, modernizing it to use f-strings is a slight performance win and much more readable. -- assignee: gregory.p.smith messages: 356005 nosy: gregory.p.smith priority: normal severity: normal status: open title:

[issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll

2019-11-04 Thread miss-islington
miss-islington added the comment: New changeset 4c22e1665c4d8e8fa31bd7aa7b403480d9be5ce2 by Miss Islington (bot) in branch '3.8': closes bpo-37633: Reëxport some function compatibility wrappers for macros in ``pythonrun.h``. (GH-17056)

[issue38591] Deprecate Process Child Watchers

2019-11-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: FWIW, I started implementing a pidfd-based child process watcher over on #38692. -- nosy: +benjamin.peterson ___ Python tracker ___

[issue38692] add a pidfd child process watcher

2019-11-04 Thread Benjamin Peterson
New submission from Benjamin Peterson : Recent versions of Linux has built out support for pidfd, a way to do process management with file descriptors. I wanted to try it out, so implemented a pidfd-based child watcher for asyncio. My WIP progress patch is attached. It passes all asyncio

[issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll

2019-11-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +16568 pull_request: https://github.com/python/cpython/pull/17057 ___ Python tracker ___

[issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll

2019-11-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 62161ce989d7d4fe2b0e6899a54da20feeddc798 by Benjamin Peterson in branch 'master': closes bpo-37633: Reëxport some function compatibility wrappers for macros in ``pythonrun.h``. (GH-17056)

[issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll

2019-11-04 Thread Benjamin Peterson
Change by Benjamin Peterson : -- keywords: +patch pull_requests: +16567 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17056 ___ Python tracker

[issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True

2019-11-04 Thread Ammar Askar
Ammar Askar added the comment: Aah actually I was looking at an older version of the docs, the documentation now says, "if the address is allocated for private networks" which is actually misleading. The addresses here aren't all private networks:

[issue38655] ipaddress.ip_network('0.0.0.0/0').is_private == True

2019-11-04 Thread Ammar Askar
Ammar Askar added the comment: The documentation for is_private notes: Returns: A boolean, True if the address is reserved per RFC 4193. iana-ipv4-special-registry or iana-ipv6-special-registry. If we take a look at the iana-ipv4-special-registry then 0.0.0.0/8 does show up there:

[issue38475] Break Statement

2019-11-04 Thread Zachary Ware
Zachary Ware added the comment: Absent any response from the OP, I'm going to go with yes. Devor, if you can reduce your example to show a bug in the Python interpreter or standard library, please reopen with that example. -- resolution: -> not a bug stage: -> resolved status:

Re: Is there some python libary for edit iso file drectly?

2019-11-04 Thread Michael Torrie
On 11/4/19 4:11 PM, Hongyi Zhao wrote: > Is there some python libary for edit iso file drectly? Isn't an ISO image a read-only sort of thing? If you want to modify files don't you have to create a whole new image? -- https://mail.python.org/mailman/listinfo/python-list

[issue27994] In the argparse help(argparse) prints weird comments instead of good docstrings

2019-11-04 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

Fwd: permission denied using python 3.8

2019-11-04 Thread Francois van Lieshout
Outlook voor Android downloaden Van: Francois van Lieshout Verstuurd: maandag 4 november 2019 18:19 Aan: python-list@python.org Onderwerp: permission denied using python 3.8 Hi, i installed python 3.8 the latest version but it doesn’t

[issue38691] importlib: PYTHONCASEOK should be ignored when using python3 -E

2019-11-04 Thread STINNER Victor
New submission from STINNER Victor : When using python3 -E or python3 -I, PYTHONCASEOK environment variable should be ignored by importlib. See an email sent in 2012: https://mail.python.org/pipermail/python-dev/2012-December/123403.html See importlib._bootstrap_external._relax_case attribute

[issue27994] In the argparse help(argparse) prints weird comments instead of good docstrings

2019-11-04 Thread Lewis Gaul
Change by Lewis Gaul : -- nosy: +aeros ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27994] In the argparse help(argparse) prints weird comments instead of good docstrings

2019-11-04 Thread Lewis Gaul
Lewis Gaul added the comment: This doesn't seem to be the case [anymore] to me, should this be closed? -- nosy: +Lewis Gaul ___ Python tracker ___

[issue16575] ctypes: unions as arguments

2019-11-04 Thread STINNER Victor
STINNER Victor added the comment: Same issue on x86 Gentoo Refleaks 3.7: test_ctypes leaked [174, 174, 174] references, sum=522 test_ctypes leaked [76, 78, 76] memory blocks, sum=230 https://buildbot.python.org/all/#/builders/114/builds/631 --

[issue16575] ctypes: unions as arguments

2019-11-04 Thread STINNER Victor
STINNER Victor added the comment: This change introduced a reference leak on Windows. Example on 3.7: https://buildbot.python.org/all/#/builders/132/builds/645 test_ctypes leaked [174, 174, 174] references, sum=522 test_ctypes leaked [76, 77, 77] memory blocks, sum=230 -- nosy:

[issue36084] Threading: add builtin TID attribute to Thread objects

2019-11-04 Thread STINNER Victor
STINNER Victor added the comment: > I have encountered a minor bug with this new feature. Please open a new issue. -- ___ Python tracker ___

[issue36439] Inconsistencies with datetime.fromtimestamp(t) when t < 0

2019-11-04 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37373] Configuration of windows event loop for libraries

2019-11-04 Thread STINNER Victor
STINNER Victor added the comment: > Is it be possible to backport this inside the standard ProactorEventLoop of > Python-3.8.1 ? As things are currently broken, no kitten would be armed > https://github.com/python-trio/trio/pull/1269 No, we don't add features to minor releases. If you need

[issue38430] Memory leak in ThreadPoolExecutor + run_in_executor

2019-11-04 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-04 Thread STINNER Victor
STINNER Victor added the comment: > IMO this punches a big hole in the Python execution model, but provides no > benefit. This PEP is about fixing a Python 3.8 regression. In Python 3.7, it was possible to get and set frame_eval. In Python 3.8, it's no longer possible. One option to fix

Re: What's the difference between running a script under command box and interpreter?

2019-11-04 Thread jfong
Grant Edwards於 2019年11月5日星期二 UTC+8上午12時41分24秒寫道: > On 2019-11-04, Dennis Lee Bieber wrote: > > Using > > > >from module import * > > > > is often the worst thing one can do. > > I agree 100%. > > Unfortunately, most of the official standard library documentation is > written assuming you do

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

2019-11-04 Thread Matthew Barnett
Matthew Barnett added the comment: It's been many years since I looked at the code, and there have been changes since then, so some of the details might not be correct. As to have it should behave: re.match('(?:()|(?(1)()|z)){1,2}(?(2)a|z)', 'a') Iteration 1. Match the repeated part. Group

[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16566 pull_request: https://github.com/python/cpython/pull/17052 ___ Python tracker ___

[issue25522] IDLE: warn if save-as name matches stdlib name

2019-11-04 Thread Zackery Spytz
Zackery Spytz added the comment: I have created a pull request for this issue. -- nosy: +ZackerySpytz ___ Python tracker ___ ___

[issue25522] IDLE: warn if save-as name matches stdlib name

2019-11-04 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +16565 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17051 ___ Python tracker

[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset 17269090940aa20f6079a6b9f27ae319f8cdae14 by Victor Stinner in branch 'master': bpo-38644: Pass tstate to _Py_CheckFunctionResult() (GH-17050) https://github.com/python/cpython/commit/17269090940aa20f6079a6b9f27ae319f8cdae14 --

[issue38475] Break Statement

2019-11-04 Thread Lewis Gaul
Lewis Gaul added the comment: Should this issue be closed? -- nosy: +Lewis Gaul ___ Python tracker ___ ___ Python-bugs-list

[issue38690] Command line option with &/or without a space results in the same outcome

2019-11-04 Thread jason gors
New submission from jason gors : The syntax in the Command line documentation was unexpected regarding the `-m` option (specifically `python -mtimeit`) [0]. Showing this: ``` python -mtimeit "range(100)" # behaving equivalent to this: python -m timeit "range(100)" ``` This led me to

[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16564 pull_request: https://github.com/python/cpython/pull/17050 ___ Python tracker ___

[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset be434dc0380d9f5c7c800de9943cc46d55fd9491 by Victor Stinner in branch 'master': bpo-38644: Pass tstate to Py_EnterRecursiveCall() (GH-16997) https://github.com/python/cpython/commit/be434dc0380d9f5c7c800de9943cc46d55fd9491 --

[issue38689] IDLE crashes when KeyError is raised during calltip generation

2019-11-04 Thread Dan Snider
New submission from Dan Snider : When the following program has been input (into 32 bit 3.8.0 Python running on windows 10), all IDLE processes and windows will immediately and irrevocably hang the instant the open parentheses at the end of the statement "Object(" is rendered. However

Is there some python libary for edit iso file drectly?

2019-11-04 Thread Hongyi Zhao
Is there some python libary for edit iso file drectly? -- https://mail.python.org/mailman/listinfo/python-list

Re: __instancecheck__ metaclasses, how do they work: why do I get True when I tuple, why doesn't print run?

2019-11-04 Thread Peter J. Holzer
On 2019-11-04 14:54:23 +, Rhodri James wrote: > On 04/11/2019 14:33, Veek M wrote: > > __metaclass__ = whatever; # is python2.x syntax > > But not Python3: see PEP 3115 Doesn't "X is python2.x syntax" imply "X is not python3 syntax"? hp -- _ | Peter J. Holzer| Story must

Re: Friday finking: TDD and EAFP

2019-11-04 Thread Peter J. Holzer
On 2019-11-03 18:51:25 -0500, Terry Reedy wrote: > On 11/3/2019 3:44 PM, Peter J. Holzer wrote: > > > On 2019-11-04 07:41:32 +1300, DL Neil via Python-list wrote: > > > Agreed: (in theory) TDD is independent of language or style. However, I'm > > > wondering if (in practice) it creates a mode of

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

2019-11-04 Thread Jackson Riley
Jackson Riley added the comment: I've got a bit confused and am doubting myself - is the below output expected? >>> m = re.match('(?:()|(?(1)()|z)){1,2}(?(2)a|z)', 'a') >>> m.groups() ('', '') >>> m = re.match('(?:()|(?(1)()|z)){1,2}(?(1)a|z)', 'a') >>> m.groups() ('', None) The first pattern

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-04 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-04 Thread Christian Boltz
New submission from Christian Boltz : The following test script works with Python 3.7 (and older), but triggers an endless loop with Python 3.8: #!/usr/bin/python3 import shutil import os os.mkdir('/dev/shm/t') os.mkdir('/dev/shm/t/pg') with open('/dev/shm/t/pg/pol', 'w+') as f:

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread Luciano Ramalho
On Mon, Nov 4, 2019 at 5:52 PM R.Wieser wrote: > I was thinking of (the needed) wrapping of the "newObject = classObject()" > line in such a try..except block (to capture the re-casted exception). I > take it that that that means that the full contents of the __init__ block > are wrapped too.

Re: What's the difference between running a script under command box and interpreter?

2019-11-04 Thread MRAB
On 2019-11-04 21:05, Peter J. Holzer wrote: On 2019-11-03 16:34:39 -0800, jf...@ms4.hinet.net wrote: I innocently thought that when import module through "from test import *", I am working on test's globals under REPL. I didn't noticed the REPL has its own globals. Well, you imported every

Re: What's the difference between running a script under command box and interpreter?

2019-11-04 Thread Peter J. Holzer
On 2019-11-03 16:34:39 -0800, jf...@ms4.hinet.net wrote: > I innocently thought that when import module through "from test import > *", I am working on test's globals under REPL. I didn't noticed the > REPL has its own globals. Well, you imported every global from test. So you are (kind of)

[issue37633] Py_CompileString and PyParser_SimpleParseString not exported in python38.dll

2019-11-04 Thread Brett Cannon
Brett Cannon added the comment: I've flagged this as a release blocker so the Release Manager can make a call about whether this should hold up future releases. -- nosy: +brett.cannon priority: normal -> release blocker ___ Python tracker

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread R.Wieser
Rob, > That's why if you for instance, open a serial port in an __init__ routine, > and something fails, you want to catch the exception there in __init__, > explicitly close that serial port, and reraise the exception. Otherwise > that port still has an object open against it until Python

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread Rob Gaddi
On 11/4/19 10:59 AM, R.Wieser wrote: Rob, Returning None will specifically NOT accomplish the thing you want; nothing ever checks the return value of __init__. I thought to have read that when you return a none from it the object itself would return a placeholder singleton. Raise an

[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2019-11-04 Thread Malversán
Malversán added the comment: In my scenario that buffer overrun never happens, maybe because I use messages that are not big enough to overflow the default recv() buffer size. But I think I can confirm that multiple messages are never received in an atomic read, even if they are being issued

Re: What PEPs are worth reading after you've read a textbook/Beazley but want to understand details/innerworkings

2019-11-04 Thread Chris Angelico
On Tue, Nov 5, 2019 at 3:16 AM Veek M wrote: > > sez it all really, among the Finished PEPs, which ones should I pore > through to teach Python competently! > > What PEPs are considered de rigueur? What PEPs do you guys consider note- > worthy? > > https://www.python.org/dev/peps/ That's a

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-04 Thread Kyle Stanley
Kyle Stanley added the comment: > since the new threads are spawned in ThreadPoolExecutor *after* > executor.submit() is called It's also worth mentioning that ThreadPoolExecutor only spawns up to one additional thread at a time for each executor.submit() called. --

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

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

[issue38687] Expose 'adler32_combine' function from zlib

2019-11-04 Thread Callum Attryde
Change by Callum Attryde : -- keywords: +patch pull_requests: +16561 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17048 ___ Python tracker ___

Re: Trouble trying to get started with pygame

2019-11-04 Thread MRAB
On 2019-11-04 05:21, originallmo...@gmail.com wrote: On Sunday, November 3, 2019 at 9:40:05 PM UTC-5, MRAB wrote: On 2019-11-04 01:52, originallmo...@gmail.com wrote: > On Friday, November 1, 2019 at 11:17:42 PM UTC-4, MRAB wrote: >> On 2019-11-02 02:28, originallmo...@gmail.com wrote: >> > I

[issue38687] Expose 'adler32_combine' function from zlib

2019-11-04 Thread Callum Attryde
New submission from Callum Attryde : zlib contains a function for combining Adler32 checksums which is not currently exposed by the Python module. This enhancement adds that function to Python -- components: Extension Modules messages: 355977 nosy: callumattryde priority: normal

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread R.Wieser
Luciano, > """A failed __init__ should raise an appropriate exception. A bare > return or returning None is what any __init__ is expected to do in the > normal case, so it signals success.""" Ah, that settles it than. Somehow I thought that a return (of "none") there indicated an error result,

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

2019-11-04 Thread Kyle Stanley
Kyle Stanley added the comment: > Hey, I've done the change and opened a pull request for it (I'm working with > Ben and I've let him know) Make sure to change the title of the PR to "bpo-: ", this will automatically attach the PR to the associated bpo issue. For example, if your PR title

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread R.Wieser
Rob, > Returning None will specifically NOT accomplish the thing you want; > nothing ever checks the return value of __init__. I thought to have read that when you return a none from it the object itself would return a placeholder singleton. > Raise an exception. Yeah, that was what I was

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread Rob Gaddi
On 11/4/19 10:36 AM, Luciano Ramalho wrote: Sorry, I responded only to the OP. My response: """A failed __init__ should raise an appropriate exception. A bare return or returning None is what any __init__ is expected to do in the normal case, so it signals success.""" Actually, the Python

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-04 Thread Kyle Stanley
Kyle Stanley added the comment: > Nice work! This is a great excercise, but we can really just use > concurrent.futures.ThreadPool as is. Spawning threads is fast. As I mentioned > before all we need to do is to design *our* API to NOT initialize pools in > __init__, that's it. The design

[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset f4b1e3d7c64985f5d5b00f6cc9a1c146bbbfd613 by Victor Stinner in branch 'master': bpo-38644: Add Py_EnterRecursiveCall() to the limited API (GH-17046) https://github.com/python/cpython/commit/f4b1e3d7c64985f5d5b00f6cc9a1c146bbbfd613 --

[issue38665] Crash when running SQLAlchemy with pyodbc

2019-11-04 Thread Brett Cannon
Brett Cannon added the comment: Basically you have to figure out where that bad memory came from and that's just plain hard in C short of slowly cutting out code until you get a small reproducer. Typically these sorts of issues are almost always in the extension modules, but your case is

[issue38665] Crash when running SQLAlchemy with pyodbc

2019-11-04 Thread Dave Johansen
Dave Johansen added the comment: I can't. I just know that I'm running this process and this crash happens. Any recommendations on how to diagnose that? -- ___ Python tracker

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-04 Thread Brett Cannon
Brett Cannon added the comment: @Mark are you strongly opposed because we're providing an API for changing the eval function in the CPython API and you think it should be in the private API? Or you objecting to PEP 523 all-up (based on your list of objections)? Either way the PEP was

[issue38662] Decouple ensurepip from pip's internals using runpy

2019-11-04 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread Luciano Ramalho
Sorry, I responded only to the OP. My response: """A failed __init__ should raise an appropriate exception. A bare return or returning None is what any __init__ is expected to do in the normal case, so it signals success.""" Actually, the Python interpreter *does* check the return of __init__.

[issue38671] pathlib.Path.resolve(strict=False) returns relative path on Windows if the entry does not exist

2019-11-04 Thread Brett Cannon
Change by Brett Cannon : -- components: +Library (Lib) nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38665] Crash when running SQLAlchemy with pyodbc

2019-11-04 Thread Brett Cannon
Brett Cannon added the comment: Can you trace this to actually being Python's fault? Unfortunately you're using two extension modules who both could be at fault with this. -- nosy: +brett.cannon ___ Python tracker

[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2019-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: Can recv() get two messages at once? What is the behavior if the buffer size passed into recv() is smaller than the message length? -- ___ Python tracker

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

2019-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure there is much in common between this and issue33721. There are many ways to get a file path unrepresentable at the OS level. But I do not know any valid case for getting an out-of-range file descriptor. I am not convinced there is a bug

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

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

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

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

Re: OOP - how to abort an __init__ when the initialisation code fails ?

2019-11-04 Thread Rob Gaddi
On 11/4/19 7:32 AM, R.Wieser wrote: Hello all, The whole question: How should I handle failed initialisation code inside the __init__ of an object ? I've seen an example doing a plain "return" (of the value "none""), but have no idea if that is all it takes. Also, I wonder what happens to the

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

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

[issue31857] Make the behavior of USE_STACKCHECK deterministic

2019-11-04 Thread STINNER Victor
STINNER Victor added the comment: This issue added this FIXME: /* Due to the macros in which it's used, _Py_CheckRecursionLimit is in the stable ABI. It should be removed therefrom when possible. */ FYI I proposed PR 17046 to fix it ;-) -- nosy: +vstinner

[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16559 pull_request: https://github.com/python/cpython/pull/17046 ___ Python tracker ___

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

2019-11-04 Thread STINNER Victor
STINNER Victor added the comment: This issue reminds me bpo-33721: "os.path functions that return a boolean result like exists(), lexists(), isdir(), isfile(), islink(), and ismount() now return False instead of raising ValueError or its subclasses UnicodeEncodeError and UnicodeDecodeError

[issue15243] Misleading documentation for __prepare__

2019-11-04 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9495] argparse unittest tracebacks are confusing if an error is raised when not expected

2019-11-04 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

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

[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2019-11-04 Thread Malversán
Malversán added the comment: I do not have the answer about getting message boundaries at lower levels, but from a high-level point of view SOCK_SEQ_PACKET gives atomic reads, with no need to check for message boundaries yourself. Every time you read from a SOCK_SEQ_PACKET socket you get an

Re: What's the difference between running a script under command box and interpreter?

2019-11-04 Thread Grant Edwards
On 2019-11-04, Dennis Lee Bieber wrote: > Using > >from module import * > > is often the worst thing one can do. I agree 100%. Unfortunately, most of the official standard library documentation is written assuming you do _exactly_that_. Though it makes the documetnation more succinct, I

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

2019-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: At first, would be nice to figure out what "invalid line reported" does mean. What text is reported and what is expected? -- ___ Python tracker

[issue11354] argparse: nargs could accept range of options count

2019-11-04 Thread Alex
Alex added the comment: I've had a look at the most recent patch and the code surrounding it, and I would be happy to take on the work to update the code and testing. However, > - It's easy to test for this range after parsing, with '*' or '+' nargs. So > the main thing this patch adds is

[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2019-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: Another question: does SSL/TLS make sense for seqpacket? -- ___ Python tracker ___ ___

[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2019-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: How to get the message boundary without recvmsg()? Sorry, I'm not familiar with seqpacket. -- ___ Python tracker ___

[issue32309] Implement asyncio.run_in_executor shortcut

2019-11-04 Thread Yury Selivanov
Yury Selivanov added the comment: > I'm going to have to rescind the above statements. I was able to implement a > new prototype of asyncio.ThreadPool (using ThreadPoolExecutor) that spawns > it's threads asynchronously on startup. Since this one a bit more involved > than the previous code

What PEPs are worth reading after you've read a textbook/Beazley but want to understand details/innerworkings

2019-11-04 Thread Veek M
sez it all really, among the Finished PEPs, which ones should I pore through to teach Python competently! What PEPs are considered de rigueur? What PEPs do you guys consider note- worthy? https://www.python.org/dev/peps/ -- https://mail.python.org/mailman/listinfo/python-list

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2019-11-04 Thread Ethan Furman
Ethan Furman added the comment: I came across this /32 issue today trying to iterate over the hosts in 127.0.0.1/32. I think it's fair to say that any /32 network has precisely one host, and that host should by returned by IPv4Network().hosts(). -- nosy: +ethan.furman

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

2019-11-04 Thread Jackson Riley
Jackson Riley added the comment: Ah thank you very much Serhiy, that's super helpful! -- ___ Python tracker ___ ___

[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2019-11-04 Thread Malversán
Malversán added the comment: It has a certain logic to recommend recvmsg() in place of recv(), as SOCK_SEQ_PACKET is characterized by transmitting entire messages only. But it has to be noted that my current hack (described above) is working for SOCK_SEQ_PACKET sockets with no modification

  1   2   >