-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Planning for breaking changes on TRFKA1.17 #892
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, we're taking a step back and considering/refactoring all the breaking changes we want to make in the near future that'll break current API contracts on some level. This issue is basically a dump of my thoughts/plans so far, which are open for discussion to all comers.
SessionManager
. From talking to @Lukasa, there are two main ways to go about this - first, to either import or package certifi, or to require PyOpenSSL, certitude, and other binary packages to be able to reliably use the platform cert bundles. At this point, certifi is a more practical option, so we basically need to decide if we want to bundle it or require it.SessionManager
, as a high-level configuration object. Personally, I think that if we're putting in the effort to set up a secure default, all of our connection levels should be able to benefit from it - includingConnectionPool
andPoolManager
. This is up for discussion, and brings us to...Settings
object that can be passed into anyRequestMethods
subclass. This would include things like theSSLContext
to be used, any platform-specific flags that need to be considered (e.g., GAE), or anything else. My vision would be to have any newly-createdSettings
object carry smart defaults, and any newly-createdRequestMethods
subclass get either aSettings
object in arguments or one of a fresh instantiation of same or a link to aurllib3
-wideSettings
object. It'd look something like this:RequestMethods
, support will be added for explicitly-passed params and body fields. (Expand RequestMethods optional arguments #885)ContextHandlers
, which at first will include justCookieHandler
, but when instantiating or subclassingSessionManager
, an alternate list can be provided. Each request/response pair will be passed to each handler in the list for mutation and data extraction. And we're going to include a bonusBasicAuthHandler
that people can use if they want. This will also solve for SessionManager: Ability to disable cookies #888, as a list without a CookieHandler can be passed to__init__()
.Request
object andurllib.request.Request
. We'll mimic some small features of the interface so that cookielib can still handle our version, but the main goal will be to have data stored in a way that we can natively expand intourlopen()
. This will also make for a cleaner API for additionalContextHandlers
to work with.The text was updated successfully, but these errors were encountered: