Re: Asyncio question

2020-02-21 Thread Frank Millman
On 2020-02-21 11:13 PM, Greg Ewing wrote: On 21/02/20 7:59 pm, Frank Millman wrote: My first attempt was to create a background task for each session which runs for the life-time of the session, and 'awaits' its queue. It works, but I was concerned about having a lot a background tasks active

Re: Idiom for partial failures

2020-02-21 Thread Rob Gaddi
On 2/21/20 9:18 AM, David Wihl wrote: Yes, the API has to support partial failures across all six supported languages. Not all operations need to be atomic and there is considerable efficiency in having multiple operations sent in a single request. Thanks, -David On Thu, Feb 20, 2020 at 6:07 PM

Re: Should PyImport_ImportModule be threadsafe when importing from zipfiles?

2020-02-21 Thread Geoff Bache
OK, I see what you mean with the import backup change now, though it seems like it changes the semantics of Python's import mechanism a bit... But I still don't really get what information we'd gain from doing this. What call is being made and is failing is pretty obvious from the stacktrace. Tha

Re: Idiom for partial failures

2020-02-21 Thread David Wihl
Yes, the API has to support partial failures across all six supported languages. Not all operations need to be atomic and there is considerable efficiency in having multiple operations sent in a single request. Thanks, -David On Thu, Feb 20, 2020 at 6:07 PM Rob Gaddi wrote: > On 2/20/20 9:30 AM,

Re: Asyncio question

2020-02-21 Thread Greg Ewing
On 21/02/20 7:59 pm, Frank Millman wrote: My first attempt was to create a background task for each session which runs for the life-time of the session, and 'awaits' its queue. It works, but I was concerned about having a lot a background tasks active at the same time. The whole point of asyn

pip issue

2020-02-21 Thread Jack Dangler
Hi, all Went to setup path and got an error. attempted to update pip and got the same error... The error being thrown is - Traceback (most recent call last):   File "/home/jack/.local/bin/pip", line 11, in     sys.exit(main())   File "/home/jack/.local/lib/python2.7/site-packages/pip/_intern

Re: Should PyImport_ImportModule be threadsafe when importing from zipfiles?

2020-02-21 Thread Geoff Bache
I'm not sure I understand what you mean by "stick something" there. What did you have in mind? I can't just put anything there or the importing will fail anyhow. Also, setting the module back into there afterwards isn't possible unless I've already imported it, and as mentioned I can't do that in p

Re: Should PyImport_ImportModule be threadsafe when importing from zipfiles?

2020-02-21 Thread Geoff Bache
But, as I say, I don't have the module loaded beforehand, so caching it from sys.modules and restoring it afterwards won't be possible. Just investigating which calls are made doesn't seem likely to provide new information. I already know which call is made, it's the one that produces the stacktrac

Re: Should PyImport_ImportModule be threadsafe when importing from zipfiles?

2020-02-21 Thread Chris Angelico
On Fri, Feb 21, 2020 at 8:58 PM Geoff Bache wrote: > > But, as I say, I don't have the module loaded beforehand, so caching it from > sys.modules and restoring it afterwards won't be possible. Those lines go into the actual file you're importing. > Basically I'm looking for hints as to informat

Re: Should PyImport_ImportModule be threadsafe when importing from zipfiles?

2020-02-21 Thread Chris Angelico
On Fri, Feb 21, 2020 at 6:56 PM Geoff Bache wrote: > > I'm not sure I understand what you mean by "stick something" there. What did > you have in mind? I can't just put anything there or the importing will fail > anyhow. > Also, setting the module back into there afterwards isn't possible unless