Re: [Python-Dev] PEP 554 v3 (new interpreters module)
On 14 September 2017 at 11:44, Eric Snow wrote:> Examples> >> Run isolated code> ->> ::>>interp = interpreters.create()>print('before')>interp.run('print("during")')>print('after')> A few more suggestions for examples: Running a module:
Re: [Python-Dev] PEP 554 v3 (new interpreters module)
On 7 October 2017 at 02:29, Koos Zevenhoven wrote:> While I'm actually trying not to say much here so that I can avoid this> discussion now, here's just a couple of ideas and thoughts from me at this> point:>> (A)> Instead of sending bytes and receiving memoryviews, one could consider> sen
Re: [Python-Dev] Investigating time for `import requests`
The easiest workaround at the moment is still pretty clumsy: def import_SLLError(): from requests.exceptions import SLLError return SLLError ... except import_SLLError(): But what happens if that gives you an ImportError? You can't catch a requests exception unless requests
Re: [Python-Dev] Investigating time for `import requests`
On Sun, Oct 8, 2017 at 2:44 PM, Chris Angelico wrote:> On Sun, Oct 8, 2017 at 7:02 PM, David Cournapeau > wrote:>> It is certainly true that for a CLI tool that actually makes any network>> I/O, especially SSL, import times will quickly be negligible. It becomes>> tricky for complex tools
Re: [Python-Dev] Investigating time for `import requests`
On Sun, Oct 8, 2017 at 11:02 AM, David Cournapeau wrote:>> On Mon, Oct 2, 2017 at 6:42 PM, Raymond Hettinger [email protected]> wrote:>>>>>> On Oct 2, 2017, at 12:39 AM, Nick Coghlan wrote:>>>>>> "What requests uses" can identify a useful set of>>> avoidable imports. A
Re: [Python-Dev] Investigating time for `import requests`
On Sun, Oct 8, 2017 at 7:02 PM, David Cournapeau wrote:> It is certainly true that for a CLI tool that actually makes any network> I/O, especially SSL, import times will quickly be negligible. It becomes> tricky for complex tools, because of error management. For example, a common> pattern I h
Re: [Python-Dev] Investigating time for `import requests`
On Mon, Oct 2, 2017 at 6:42 PM, Raymond Hettinger < [email protected]> wrote:>>> On Oct 2, 2017, at 12:39 AM, Nick Coghlan wrote:>>>> "What requests uses" can identify a useful set of>> avoidable imports. A Flask "Hello world" app could likely provide>> another such sample,