Open travishathaway opened 1 year ago
BTW as some inspiration for people creating requests-style session classes: https://github.com/dcoles/pycurl-requests
@jezdez,
I really like your "transmitter" idea. You pointed something out that I felt more and more awkward about as I was writing the plugin prototype, which is the naming of the CondaSession
class. I'd also like to rename that class in any implementation we go with too.
Also, thank you for adding those high level UX examples. I will definitely make room for those in the CEP too (under "Specification").
@jezdez,
I switched this back to fetch
for now 😅 . It's shorter and easier to type than transmitter
. It also aligns with the original "spirit" of this work (whatever that means 😂).
I wonder if we should be including support for adding additional adapters here too:
Perhaps it makes sense to be able to expose just these as hooks too.
I would be interested in this. We ended up creating a mock object for our session purposes. It would be nice to move to something more supported by the community.
with mock.patch('conda.gateways.connection.session.CondaSession',
return_value=CondaSessionRSA()):
We recently had a new feature request in conda repository that could also be supported by this new plugin hook:
This would also be a good case for allowing plugin authors for adding additional adapters.
This CEP proposed a new plugin hook that will allow plugin authors to completely customize the way that network requests are made. Please check what is currently on the CEP and use this pull request as a forum to discuss changes or oppositions to it.