On Fri, Aug 17, 2018 at 12:50 PM, Nathaniel Smith <n...@pobox.com> wrote:
> On Fri, Aug 17, 2018, 12:12 Chris Jerdonek <chris.jerdo...@gmail.com> wrote:
>>
>> Did you also think about whether it would be possible for a library to
>> advertise itself without having to depend on a third-party library
>> (e.g. using some sort of convention)? That would permit a less
>> "centralized" approach.
>
>
> What kind of convention do you have in mind?

Good question. I don't claim to know the answer which is why I asked
if you had thought about it. The *kind* of thing I had in mind was to
set a variable with an agreed-upon name and value on an agreed-upon
module in the standard library -- though I agree that seems hacky as
stated.

It does seem to me like something that should (already?) have a
general solution. What other ways does Python let things register or
"announce" themselves?

--Chris


>
> The problem with a convention AFAICT is that you need some shared agreement
> about where to rendezvous. That's basically all the sniffio library is: a
> shared, neutral place for libraries to advertise themselves. (Plus a
> fallback for detecting asyncio, because stdlib libraries have special
> constraints.)
>
> -n
_______________________________________________
Async-sig mailing list
Async-sig@python.org
https://mail.python.org/mailman/listinfo/async-sig
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to