catocli 2.0.5__py3-none-any.whl → 2.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of catocli might be problematic. Click here for more details.
- catocli/Utils/clidriver.py +32 -4
- catocli/Utils/version_checker.py +1 -1
- catocli/__init__.py +1 -1
- catocli/parsers/custom/export_sites/export_sites.py +18 -1
- catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py +13 -2
- catocli/parsers/custom/import_sites_to_tf/__init__.py +3 -1
- catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py +79 -6
- catocli/parsers/custom_private/__init__.py +134 -0
- catocli/parsers/mutation_accountManagement/__init__.py +13 -0
- catocli/parsers/mutation_accountManagement_disableAccount/README.md +16 -0
- catocli/parsers/mutation_groups/README.md +7 -0
- catocli/parsers/mutation_groups/__init__.py +48 -0
- catocli/parsers/mutation_groups_createGroup/README.md +18 -0
- catocli/parsers/mutation_groups_deleteGroup/README.md +18 -0
- catocli/parsers/mutation_groups_updateGroup/README.md +18 -0
- catocli/parsers/mutation_site/__init__.py +104 -0
- catocli/parsers/mutation_site_assignSiteBwLicense/README.md +17 -0
- catocli/parsers/mutation_site_removeSecondaryAwsVSocket/README.md +17 -0
- catocli/parsers/mutation_site_removeSecondaryAzureVSocket/README.md +17 -0
- catocli/parsers/mutation_site_removeSiteBwLicense/README.md +17 -0
- catocli/parsers/mutation_site_replaceSiteBwLicense/README.md +17 -0
- catocli/parsers/mutation_site_updateSecondaryAwsVSocket/README.md +17 -0
- catocli/parsers/mutation_site_updateSecondaryAzureVSocket/README.md +17 -0
- catocli/parsers/mutation_site_updateSiteBwLicense/README.md +17 -0
- catocli/parsers/mutation_site_updateSiteGeneralDetails/README.md +1 -1
- catocli/parsers/mutation_sites/__init__.py +104 -0
- catocli/parsers/mutation_sites_assignSiteBwLicense/README.md +17 -0
- catocli/parsers/mutation_sites_removeSecondaryAwsVSocket/README.md +17 -0
- catocli/parsers/mutation_sites_removeSecondaryAzureVSocket/README.md +17 -0
- catocli/parsers/mutation_sites_removeSiteBwLicense/README.md +17 -0
- catocli/parsers/mutation_sites_replaceSiteBwLicense/README.md +17 -0
- catocli/parsers/mutation_sites_updateSecondaryAwsVSocket/README.md +17 -0
- catocli/parsers/mutation_sites_updateSecondaryAzureVSocket/README.md +17 -0
- catocli/parsers/mutation_sites_updateSiteBwLicense/README.md +17 -0
- catocli/parsers/mutation_sites_updateSiteGeneralDetails/README.md +1 -1
- catocli/parsers/parserApiClient.py +444 -9
- catocli/parsers/query_eventsFeed/README.md +1 -1
- catocli/parsers/query_groups/README.md +7 -0
- catocli/parsers/query_groups/__init__.py +54 -0
- catocli/parsers/query_groups_group/README.md +7 -0
- catocli/parsers/query_groups_groupList/README.md +18 -0
- catocli/parsers/query_groups_group_members/README.md +18 -0
- catocli/parsers/query_groups_whereUsed/README.md +17 -0
- catocli/parsers/query_popLocations/README.md +17 -0
- catocli/parsers/query_popLocations/__init__.py +16 -0
- catocli/parsers/query_site/__init__.py +26 -0
- catocli/parsers/query_site_secondaryAwsVSocket/README.md +17 -0
- catocli/parsers/query_site_secondaryAzureVSocket/README.md +17 -0
- catocli/parsers/query_socketPortMetrics/README.md +23 -0
- catocli/parsers/query_socketPortMetrics/__init__.py +16 -0
- catocli/parsers/query_socketPortMetricsTimeSeries/README.md +24 -0
- catocli/parsers/query_socketPortMetricsTimeSeries/__init__.py +16 -0
- {catocli-2.0.5.dist-info → catocli-2.1.1.dist-info}/METADATA +3 -2
- {catocli-2.0.5.dist-info → catocli-2.1.1.dist-info}/RECORD +253 -300
- {catocli-2.0.5.dist-info → catocli-2.1.1.dist-info}/WHEEL +1 -1
- {catocli-2.0.5.dist-info → catocli-2.1.1.dist-info}/top_level.txt +0 -2
- graphql_client/api/call_api.py +20 -2
- models/mutation.accountManagement.addAccount.json +97 -0
- models/mutation.accountManagement.disableAccount.json +545 -0
- models/mutation.accountManagement.removeAccount.json +102 -3
- models/mutation.accountManagement.updateAccount.json +97 -0
- models/mutation.admin.addAdmin.json +6 -9
- models/mutation.container.delete.json +2 -2
- models/mutation.container.fqdn.addValues.json +3 -3
- models/mutation.container.fqdn.createFromFile.json +3 -3
- models/mutation.container.fqdn.removeValues.json +3 -3
- models/mutation.container.fqdn.updateFromFile.json +3 -3
- models/mutation.container.ipAddressRange.addValues.json +3 -3
- models/mutation.container.ipAddressRange.createFromFile.json +3 -3
- models/mutation.container.ipAddressRange.removeValues.json +3 -3
- models/mutation.container.ipAddressRange.updateFromFile.json +3 -3
- models/mutation.groups.createGroup.json +3178 -0
- models/mutation.groups.deleteGroup.json +2758 -0
- models/mutation.groups.updateGroup.json +4429 -0
- models/mutation.hardware.updateHardwareShipping.json +30 -10
- models/mutation.policy.appTenantRestriction.addRule.json +33 -33
- models/mutation.policy.appTenantRestriction.addSection.json +4 -4
- models/mutation.policy.appTenantRestriction.createPolicyRevision.json +33 -33
- models/mutation.policy.appTenantRestriction.discardPolicyRevision.json +33 -33
- models/mutation.policy.appTenantRestriction.moveRule.json +27 -27
- models/mutation.policy.appTenantRestriction.moveSection.json +4 -4
- models/mutation.policy.appTenantRestriction.publishPolicyRevision.json +33 -33
- models/mutation.policy.appTenantRestriction.removeRule.json +27 -27
- models/mutation.policy.appTenantRestriction.removeSection.json +4 -4
- models/mutation.policy.appTenantRestriction.updatePolicy.json +33 -33
- models/mutation.policy.appTenantRestriction.updateRule.json +33 -33
- models/mutation.policy.appTenantRestriction.updateSection.json +4 -4
- models/mutation.policy.dynamicIpAllocation.addRule.json +12 -12
- models/mutation.policy.dynamicIpAllocation.addSection.json +4 -4
- models/mutation.policy.dynamicIpAllocation.createPolicyRevision.json +18 -18
- models/mutation.policy.dynamicIpAllocation.discardPolicyRevision.json +18 -18
- models/mutation.policy.dynamicIpAllocation.moveRule.json +12 -12
- models/mutation.policy.dynamicIpAllocation.moveSection.json +4 -4
- models/mutation.policy.dynamicIpAllocation.publishPolicyRevision.json +18 -18
- models/mutation.policy.dynamicIpAllocation.removeRule.json +12 -12
- models/mutation.policy.dynamicIpAllocation.removeSection.json +4 -4
- models/mutation.policy.dynamicIpAllocation.updatePolicy.json +18 -18
- models/mutation.policy.dynamicIpAllocation.updateRule.json +12 -12
- models/mutation.policy.dynamicIpAllocation.updateSection.json +4 -4
- models/mutation.policy.internetFirewall.addRule.json +141 -141
- models/mutation.policy.internetFirewall.addSection.json +4 -4
- models/mutation.policy.internetFirewall.createPolicyRevision.json +102 -102
- models/mutation.policy.internetFirewall.discardPolicyRevision.json +102 -102
- models/mutation.policy.internetFirewall.moveRule.json +96 -96
- models/mutation.policy.internetFirewall.moveSection.json +4 -4
- models/mutation.policy.internetFirewall.publishPolicyRevision.json +102 -102
- models/mutation.policy.internetFirewall.removeRule.json +96 -96
- models/mutation.policy.internetFirewall.removeSection.json +4 -4
- models/mutation.policy.internetFirewall.updatePolicy.json +102 -102
- models/mutation.policy.internetFirewall.updateRule.json +141 -141
- models/mutation.policy.internetFirewall.updateSection.json +4 -4
- models/mutation.policy.remotePortFwd.addRule.json +21 -21
- models/mutation.policy.remotePortFwd.addSection.json +4 -4
- models/mutation.policy.remotePortFwd.createPolicyRevision.json +24 -24
- models/mutation.policy.remotePortFwd.discardPolicyRevision.json +24 -24
- models/mutation.policy.remotePortFwd.moveRule.json +18 -18
- models/mutation.policy.remotePortFwd.moveSection.json +4 -4
- models/mutation.policy.remotePortFwd.publishPolicyRevision.json +24 -24
- models/mutation.policy.remotePortFwd.removeRule.json +18 -18
- models/mutation.policy.remotePortFwd.removeSection.json +4 -4
- models/mutation.policy.remotePortFwd.updatePolicy.json +24 -24
- models/mutation.policy.remotePortFwd.updateRule.json +21 -21
- models/mutation.policy.remotePortFwd.updateSection.json +4 -4
- models/mutation.policy.socketLan.addRule.json +97 -97
- models/mutation.policy.socketLan.addSection.json +4 -4
- models/mutation.policy.socketLan.createPolicyRevision.json +91 -91
- models/mutation.policy.socketLan.discardPolicyRevision.json +91 -91
- models/mutation.policy.socketLan.moveRule.json +85 -85
- models/mutation.policy.socketLan.moveSection.json +4 -4
- models/mutation.policy.socketLan.publishPolicyRevision.json +91 -91
- models/mutation.policy.socketLan.removeRule.json +85 -85
- models/mutation.policy.socketLan.removeSection.json +4 -4
- models/mutation.policy.socketLan.updatePolicy.json +91 -91
- models/mutation.policy.socketLan.updateRule.json +97 -97
- models/mutation.policy.socketLan.updateSection.json +4 -4
- models/mutation.policy.terminalServer.addRule.json +7 -7
- models/mutation.policy.terminalServer.addSection.json +4 -4
- models/mutation.policy.terminalServer.createPolicyRevision.json +13 -13
- models/mutation.policy.terminalServer.discardPolicyRevision.json +13 -13
- models/mutation.policy.terminalServer.moveRule.json +7 -7
- models/mutation.policy.terminalServer.moveSection.json +4 -4
- models/mutation.policy.terminalServer.publishPolicyRevision.json +13 -13
- models/mutation.policy.terminalServer.removeRule.json +7 -7
- models/mutation.policy.terminalServer.removeSection.json +4 -4
- models/mutation.policy.terminalServer.updatePolicy.json +13 -13
- models/mutation.policy.terminalServer.updateRule.json +7 -7
- models/mutation.policy.terminalServer.updateSection.json +4 -4
- models/mutation.policy.wanFirewall.addRule.json +157 -157
- models/mutation.policy.wanFirewall.addSection.json +4 -4
- models/mutation.policy.wanFirewall.createPolicyRevision.json +121 -121
- models/mutation.policy.wanFirewall.discardPolicyRevision.json +121 -121
- models/mutation.policy.wanFirewall.moveRule.json +115 -115
- models/mutation.policy.wanFirewall.moveSection.json +4 -4
- models/mutation.policy.wanFirewall.publishPolicyRevision.json +121 -121
- models/mutation.policy.wanFirewall.removeRule.json +115 -115
- models/mutation.policy.wanFirewall.removeSection.json +4 -4
- models/mutation.policy.wanFirewall.updatePolicy.json +121 -121
- models/mutation.policy.wanFirewall.updateRule.json +157 -157
- models/mutation.policy.wanFirewall.updateSection.json +4 -4
- models/mutation.policy.wanNetwork.addRule.json +103 -103
- models/mutation.policy.wanNetwork.addSection.json +4 -4
- models/mutation.policy.wanNetwork.createPolicyRevision.json +97 -97
- models/mutation.policy.wanNetwork.discardPolicyRevision.json +97 -97
- models/mutation.policy.wanNetwork.moveRule.json +91 -91
- models/mutation.policy.wanNetwork.moveSection.json +4 -4
- models/mutation.policy.wanNetwork.publishPolicyRevision.json +97 -97
- models/mutation.policy.wanNetwork.removeRule.json +91 -91
- models/mutation.policy.wanNetwork.removeSection.json +4 -4
- models/mutation.policy.wanNetwork.updatePolicy.json +97 -97
- models/mutation.policy.wanNetwork.updateRule.json +103 -103
- models/mutation.policy.wanNetwork.updateSection.json +4 -4
- models/mutation.site.addBgpPeer.json +10 -10
- models/mutation.site.addIpsecIkeV2SiteTunnels.json +2 -2
- models/mutation.site.addSocketAddOnCard.json +2 -2
- models/mutation.site.assignSiteBwLicense.json +12879 -0
- models/mutation.site.removeBgpPeer.json +10 -10
- models/mutation.site.removeIpsecIkeV2SiteTunnels.json +2 -2
- models/mutation.site.removeSecondaryAwsVSocket.json +375 -0
- models/mutation.site.removeSecondaryAzureVSocket.json +354 -0
- models/mutation.site.removeSiteBwLicense.json +12822 -0
- models/mutation.site.removeSocketAddOnCard.json +2 -2
- models/mutation.site.replaceSiteBwLicense.json +12939 -0
- models/mutation.site.startSiteUpgrade.json +36 -15
- models/mutation.site.updateBgpPeer.json +10 -10
- models/mutation.site.updateIpsecIkeV2SiteTunnels.json +2 -2
- models/mutation.site.updateSecondaryAwsVSocket.json +643 -0
- models/mutation.site.updateSecondaryAzureVSocket.json +565 -0
- models/mutation.site.updateSiteBwLicense.json +12882 -0
- models/mutation.site.updateSiteGeneralDetails.json +724 -1
- models/mutation.sites.addBgpPeer.json +10 -10
- models/mutation.sites.addIpsecIkeV2SiteTunnels.json +2 -2
- models/mutation.sites.addSocketAddOnCard.json +2 -2
- models/mutation.sites.assignSiteBwLicense.json +12879 -0
- models/mutation.sites.removeBgpPeer.json +10 -10
- models/mutation.sites.removeIpsecIkeV2SiteTunnels.json +2 -2
- models/mutation.sites.removeSecondaryAwsVSocket.json +375 -0
- models/mutation.sites.removeSecondaryAzureVSocket.json +354 -0
- models/mutation.sites.removeSiteBwLicense.json +12822 -0
- models/mutation.sites.removeSocketAddOnCard.json +2 -2
- models/mutation.sites.replaceSiteBwLicense.json +12939 -0
- models/mutation.sites.startSiteUpgrade.json +36 -15
- models/mutation.sites.updateBgpPeer.json +10 -10
- models/mutation.sites.updateIpsecIkeV2SiteTunnels.json +2 -2
- models/mutation.sites.updateSecondaryAwsVSocket.json +643 -0
- models/mutation.sites.updateSecondaryAzureVSocket.json +565 -0
- models/mutation.sites.updateSiteBwLicense.json +12882 -0
- models/mutation.sites.updateSiteGeneralDetails.json +724 -1
- models/mutation.xdr.addStoryComment.json +1 -1
- models/mutation.xdr.analystFeedback.json +84 -84
- models/mutation.xdr.deleteStoryComment.json +1 -1
- models/query.accountManagement.json +97 -0
- models/query.accountMetrics.json +45 -45
- models/query.accountSnapshot.json +30 -30
- models/query.admin.json +6 -6
- models/query.admins.json +13 -13
- models/query.appStats.json +915 -867
- models/query.appStatsTimeSeries.json +692 -656
- models/query.auditFeed.json +6 -6
- models/query.catalogs.json +52 -52
- models/query.container.json +16 -16
- models/query.devices.json +20 -93
- models/query.entityLookup.json +2 -2
- models/query.events.json +288 -384
- models/query.eventsFeed.json +73 -97
- models/query.eventsTimeSeries.json +219 -291
- models/query.groups.group.members.json +3058 -0
- models/query.groups.groupList.json +6474 -0
- models/query.groups.whereUsed.json +697 -0
- models/query.hardware.json +27 -7
- models/query.hardwareManagement.json +8 -8
- models/query.licensing.json +3487 -1324
- models/query.policy.appTenantRestriction.policy.json +32 -32
- models/query.policy.dynamicIpAllocation.policy.json +18 -18
- models/query.policy.internetFirewall.policy.json +93 -93
- models/query.policy.remotePortFwd.policy.json +23 -23
- models/query.policy.socketLan.policy.json +88 -88
- models/query.policy.terminalServer.policy.json +13 -13
- models/query.policy.wanFirewall.policy.json +111 -111
- models/query.policy.wanNetwork.policy.json +97 -97
- models/query.popLocations.json +2878 -0
- models/query.sandbox.json +5 -5
- models/query.site.bgpPeer.json +4 -4
- models/query.site.bgpPeerList.json +10 -10
- models/query.site.secondaryAwsVSocket.json +340 -0
- models/query.site.secondaryAzureVSocket.json +319 -0
- models/query.site.siteBgpStatus.json +2 -2
- models/query.socketPortMetrics.json +2410 -0
- models/query.socketPortMetricsTimeSeries.json +2361 -0
- models/query.xdr.stories.json +104 -104
- models/query.xdr.story.json +93 -93
- schema/catolib.py +43 -16
- build/lib/catocli/Utils/clidriver.py +0 -268
- build/lib/catocli/Utils/profile_manager.py +0 -188
- build/lib/catocli/Utils/version_checker.py +0 -192
- build/lib/catocli/__init__.py +0 -2
- build/lib/catocli/__main__.py +0 -12
- build/lib/catocli/parsers/configure/__init__.py +0 -115
- build/lib/catocli/parsers/configure/configure.py +0 -307
- build/lib/catocli/parsers/custom/__init__.py +0 -57
- build/lib/catocli/parsers/custom/customLib.py +0 -561
- build/lib/catocli/parsers/custom/export_rules/__init__.py +0 -42
- build/lib/catocli/parsers/custom/export_rules/export_rules.py +0 -234
- build/lib/catocli/parsers/custom/export_sites/__init__.py +0 -21
- build/lib/catocli/parsers/custom/export_sites/export_sites.py +0 -372
- build/lib/catocli/parsers/custom/import_rules_to_tf/__init__.py +0 -58
- build/lib/catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py +0 -451
- build/lib/catocli/parsers/custom/import_sites_to_tf/__init__.py +0 -45
- build/lib/catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py +0 -891
- build/lib/catocli/parsers/mutation_accountManagement/__init__.py +0 -48
- build/lib/catocli/parsers/mutation_admin/__init__.py +0 -48
- build/lib/catocli/parsers/mutation_container/__init__.py +0 -138
- build/lib/catocli/parsers/mutation_hardware/__init__.py +0 -22
- build/lib/catocli/parsers/mutation_policy/__init__.py +0 -1305
- build/lib/catocli/parsers/mutation_sandbox/__init__.py +0 -35
- build/lib/catocli/parsers/mutation_site/__init__.py +0 -373
- build/lib/catocli/parsers/mutation_sites/__init__.py +0 -373
- build/lib/catocli/parsers/mutation_xdr/__init__.py +0 -48
- build/lib/catocli/parsers/parserApiClient.py +0 -513
- build/lib/catocli/parsers/query_accountBySubdomain/__init__.py +0 -16
- build/lib/catocli/parsers/query_accountManagement/__init__.py +0 -16
- build/lib/catocli/parsers/query_accountMetrics/__init__.py +0 -16
- build/lib/catocli/parsers/query_accountRoles/__init__.py +0 -16
- build/lib/catocli/parsers/query_accountSnapshot/__init__.py +0 -16
- build/lib/catocli/parsers/query_admin/__init__.py +0 -16
- build/lib/catocli/parsers/query_admins/__init__.py +0 -16
- build/lib/catocli/parsers/query_appStats/__init__.py +0 -16
- build/lib/catocli/parsers/query_appStatsTimeSeries/__init__.py +0 -16
- build/lib/catocli/parsers/query_auditFeed/__init__.py +0 -16
- build/lib/catocli/parsers/query_catalogs/__init__.py +0 -16
- build/lib/catocli/parsers/query_container/__init__.py +0 -16
- build/lib/catocli/parsers/query_devices/__init__.py +0 -16
- build/lib/catocli/parsers/query_entityLookup/__init__.py +0 -16
- build/lib/catocli/parsers/query_events/__init__.py +0 -16
- build/lib/catocli/parsers/query_eventsFeed/__init__.py +0 -16
- build/lib/catocli/parsers/query_eventsTimeSeries/__init__.py +0 -16
- build/lib/catocli/parsers/query_hardware/__init__.py +0 -16
- build/lib/catocli/parsers/query_hardwareManagement/__init__.py +0 -16
- build/lib/catocli/parsers/query_licensing/__init__.py +0 -16
- build/lib/catocli/parsers/query_policy/__init__.py +0 -161
- build/lib/catocli/parsers/query_sandbox/__init__.py +0 -16
- build/lib/catocli/parsers/query_site/__init__.py +0 -100
- build/lib/catocli/parsers/query_siteLocation/__init__.py +0 -13
- build/lib/catocli/parsers/query_subDomains/__init__.py +0 -16
- build/lib/catocli/parsers/query_xdr/__init__.py +0 -35
- build/lib/catocli/parsers/raw/__init__.py +0 -12
- build/lib/graphql_client/__init__.py +0 -11
- build/lib/graphql_client/api/__init__.py +0 -3
- build/lib/graphql_client/api/call_api.py +0 -84
- build/lib/graphql_client/api_client.py +0 -192
- build/lib/graphql_client/api_client_types.py +0 -409
- build/lib/graphql_client/configuration.py +0 -232
- build/lib/graphql_client/models/__init__.py +0 -13
- build/lib/graphql_client/models/no_schema.py +0 -71
- build/lib/schema/catolib.py +0 -1141
- build/lib/schema/importSchema.py +0 -60
- build/lib/schema/remove_policyid.py +0 -89
- build/lib/schema/remove_policyid_mutations.py +0 -89
- build/lib/scripts/catolib.py +0 -62
- build/lib/scripts/export_if_rules_to_json.py +0 -188
- build/lib/scripts/export_wf_rules_to_json.py +0 -111
- build/lib/scripts/import_wf_rules_to_tfstate.py +0 -331
- build/lib/vendor/certifi/__init__.py +0 -4
- build/lib/vendor/certifi/__main__.py +0 -12
- build/lib/vendor/certifi/core.py +0 -114
- build/lib/vendor/certifi/py.typed +0 -0
- build/lib/vendor/six.py +0 -998
- build/lib/vendor/urllib3/__init__.py +0 -211
- build/lib/vendor/urllib3/_base_connection.py +0 -172
- build/lib/vendor/urllib3/_collections.py +0 -483
- build/lib/vendor/urllib3/_request_methods.py +0 -278
- build/lib/vendor/urllib3/_version.py +0 -16
- build/lib/vendor/urllib3/connection.py +0 -1033
- build/lib/vendor/urllib3/connectionpool.py +0 -1182
- build/lib/vendor/urllib3/contrib/__init__.py +0 -0
- build/lib/vendor/urllib3/contrib/emscripten/__init__.py +0 -18
- build/lib/vendor/urllib3/contrib/emscripten/connection.py +0 -254
- build/lib/vendor/urllib3/contrib/emscripten/fetch.py +0 -418
- build/lib/vendor/urllib3/contrib/emscripten/request.py +0 -22
- build/lib/vendor/urllib3/contrib/emscripten/response.py +0 -285
- build/lib/vendor/urllib3/contrib/pyopenssl.py +0 -552
- build/lib/vendor/urllib3/contrib/socks.py +0 -228
- build/lib/vendor/urllib3/exceptions.py +0 -321
- build/lib/vendor/urllib3/fields.py +0 -341
- build/lib/vendor/urllib3/filepost.py +0 -89
- build/lib/vendor/urllib3/http2/__init__.py +0 -53
- build/lib/vendor/urllib3/http2/connection.py +0 -356
- build/lib/vendor/urllib3/http2/probe.py +0 -87
- build/lib/vendor/urllib3/poolmanager.py +0 -637
- build/lib/vendor/urllib3/py.typed +0 -2
- build/lib/vendor/urllib3/response.py +0 -1265
- build/lib/vendor/urllib3/util/__init__.py +0 -42
- build/lib/vendor/urllib3/util/connection.py +0 -137
- build/lib/vendor/urllib3/util/proxy.py +0 -43
- build/lib/vendor/urllib3/util/request.py +0 -256
- build/lib/vendor/urllib3/util/response.py +0 -101
- build/lib/vendor/urllib3/util/retry.py +0 -533
- build/lib/vendor/urllib3/util/ssl_.py +0 -513
- build/lib/vendor/urllib3/util/ssl_match_hostname.py +0 -159
- build/lib/vendor/urllib3/util/ssltransport.py +0 -276
- build/lib/vendor/urllib3/util/timeout.py +0 -275
- build/lib/vendor/urllib3/util/url.py +0 -471
- build/lib/vendor/urllib3/util/util.py +0 -42
- build/lib/vendor/urllib3/util/wait.py +0 -124
- {catocli-2.0.5.dist-info → catocli-2.1.1.dist-info}/entry_points.txt +0 -0
- {catocli-2.0.5.dist-info → catocli-2.1.1.dist-info/licenses}/LICENSE +0 -0
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import email.utils
|
|
4
|
-
import mimetypes
|
|
5
|
-
import typing
|
|
6
|
-
|
|
7
|
-
_TYPE_FIELD_VALUE = typing.Union[str, bytes]
|
|
8
|
-
_TYPE_FIELD_VALUE_TUPLE = typing.Union[
|
|
9
|
-
_TYPE_FIELD_VALUE,
|
|
10
|
-
typing.Tuple[str, _TYPE_FIELD_VALUE],
|
|
11
|
-
typing.Tuple[str, _TYPE_FIELD_VALUE, str],
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def guess_content_type(
|
|
16
|
-
filename: str | None, default: str = "application/octet-stream"
|
|
17
|
-
) -> str:
|
|
18
|
-
"""
|
|
19
|
-
Guess the "Content-Type" of a file.
|
|
20
|
-
|
|
21
|
-
:param filename:
|
|
22
|
-
The filename to guess the "Content-Type" of using :mod:`mimetypes`.
|
|
23
|
-
:param default:
|
|
24
|
-
If no "Content-Type" can be guessed, default to `default`.
|
|
25
|
-
"""
|
|
26
|
-
if filename:
|
|
27
|
-
return mimetypes.guess_type(filename)[0] or default
|
|
28
|
-
return default
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def format_header_param_rfc2231(name: str, value: _TYPE_FIELD_VALUE) -> str:
|
|
32
|
-
"""
|
|
33
|
-
Helper function to format and quote a single header parameter using the
|
|
34
|
-
strategy defined in RFC 2231.
|
|
35
|
-
|
|
36
|
-
Particularly useful for header parameters which might contain
|
|
37
|
-
non-ASCII values, like file names. This follows
|
|
38
|
-
`RFC 2388 Section 4.4 <https://tools.ietf.org/html/rfc2388#section-4.4>`_.
|
|
39
|
-
|
|
40
|
-
:param name:
|
|
41
|
-
The name of the parameter, a string expected to be ASCII only.
|
|
42
|
-
:param value:
|
|
43
|
-
The value of the parameter, provided as ``bytes`` or `str``.
|
|
44
|
-
:returns:
|
|
45
|
-
An RFC-2231-formatted unicode string.
|
|
46
|
-
|
|
47
|
-
.. deprecated:: 2.0.0
|
|
48
|
-
Will be removed in urllib3 v2.1.0. This is not valid for
|
|
49
|
-
``multipart/form-data`` header parameters.
|
|
50
|
-
"""
|
|
51
|
-
import warnings
|
|
52
|
-
|
|
53
|
-
warnings.warn(
|
|
54
|
-
"'format_header_param_rfc2231' is deprecated and will be "
|
|
55
|
-
"removed in urllib3 v2.1.0. This is not valid for "
|
|
56
|
-
"multipart/form-data header parameters.",
|
|
57
|
-
DeprecationWarning,
|
|
58
|
-
stacklevel=2,
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
if isinstance(value, bytes):
|
|
62
|
-
value = value.decode("utf-8")
|
|
63
|
-
|
|
64
|
-
if not any(ch in value for ch in '"\\\r\n'):
|
|
65
|
-
result = f'{name}="{value}"'
|
|
66
|
-
try:
|
|
67
|
-
result.encode("ascii")
|
|
68
|
-
except (UnicodeEncodeError, UnicodeDecodeError):
|
|
69
|
-
pass
|
|
70
|
-
else:
|
|
71
|
-
return result
|
|
72
|
-
|
|
73
|
-
value = email.utils.encode_rfc2231(value, "utf-8")
|
|
74
|
-
value = f"{name}*={value}"
|
|
75
|
-
|
|
76
|
-
return value
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
def format_multipart_header_param(name: str, value: _TYPE_FIELD_VALUE) -> str:
|
|
80
|
-
"""
|
|
81
|
-
Format and quote a single multipart header parameter.
|
|
82
|
-
|
|
83
|
-
This follows the `WHATWG HTML Standard`_ as of 2021/06/10, matching
|
|
84
|
-
the behavior of current browser and curl versions. Values are
|
|
85
|
-
assumed to be UTF-8. The ``\\n``, ``\\r``, and ``"`` characters are
|
|
86
|
-
percent encoded.
|
|
87
|
-
|
|
88
|
-
.. _WHATWG HTML Standard:
|
|
89
|
-
https://html.spec.whatwg.org/multipage/
|
|
90
|
-
form-control-infrastructure.html#multipart-form-data
|
|
91
|
-
|
|
92
|
-
:param name:
|
|
93
|
-
The name of the parameter, an ASCII-only ``str``.
|
|
94
|
-
:param value:
|
|
95
|
-
The value of the parameter, a ``str`` or UTF-8 encoded
|
|
96
|
-
``bytes``.
|
|
97
|
-
:returns:
|
|
98
|
-
A string ``name="value"`` with the escaped value.
|
|
99
|
-
|
|
100
|
-
.. versionchanged:: 2.0.0
|
|
101
|
-
Matches the WHATWG HTML Standard as of 2021/06/10. Control
|
|
102
|
-
characters are no longer percent encoded.
|
|
103
|
-
|
|
104
|
-
.. versionchanged:: 2.0.0
|
|
105
|
-
Renamed from ``format_header_param_html5`` and
|
|
106
|
-
``format_header_param``. The old names will be removed in
|
|
107
|
-
urllib3 v2.1.0.
|
|
108
|
-
"""
|
|
109
|
-
if isinstance(value, bytes):
|
|
110
|
-
value = value.decode("utf-8")
|
|
111
|
-
|
|
112
|
-
# percent encode \n \r "
|
|
113
|
-
value = value.translate({10: "%0A", 13: "%0D", 34: "%22"})
|
|
114
|
-
return f'{name}="{value}"'
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
def format_header_param_html5(name: str, value: _TYPE_FIELD_VALUE) -> str:
|
|
118
|
-
"""
|
|
119
|
-
.. deprecated:: 2.0.0
|
|
120
|
-
Renamed to :func:`format_multipart_header_param`. Will be
|
|
121
|
-
removed in urllib3 v2.1.0.
|
|
122
|
-
"""
|
|
123
|
-
import warnings
|
|
124
|
-
|
|
125
|
-
warnings.warn(
|
|
126
|
-
"'format_header_param_html5' has been renamed to "
|
|
127
|
-
"'format_multipart_header_param'. The old name will be "
|
|
128
|
-
"removed in urllib3 v2.1.0.",
|
|
129
|
-
DeprecationWarning,
|
|
130
|
-
stacklevel=2,
|
|
131
|
-
)
|
|
132
|
-
return format_multipart_header_param(name, value)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
def format_header_param(name: str, value: _TYPE_FIELD_VALUE) -> str:
|
|
136
|
-
"""
|
|
137
|
-
.. deprecated:: 2.0.0
|
|
138
|
-
Renamed to :func:`format_multipart_header_param`. Will be
|
|
139
|
-
removed in urllib3 v2.1.0.
|
|
140
|
-
"""
|
|
141
|
-
import warnings
|
|
142
|
-
|
|
143
|
-
warnings.warn(
|
|
144
|
-
"'format_header_param' has been renamed to "
|
|
145
|
-
"'format_multipart_header_param'. The old name will be "
|
|
146
|
-
"removed in urllib3 v2.1.0.",
|
|
147
|
-
DeprecationWarning,
|
|
148
|
-
stacklevel=2,
|
|
149
|
-
)
|
|
150
|
-
return format_multipart_header_param(name, value)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
class RequestField:
|
|
154
|
-
"""
|
|
155
|
-
A data container for request body parameters.
|
|
156
|
-
|
|
157
|
-
:param name:
|
|
158
|
-
The name of this request field. Must be unicode.
|
|
159
|
-
:param data:
|
|
160
|
-
The data/value body.
|
|
161
|
-
:param filename:
|
|
162
|
-
An optional filename of the request field. Must be unicode.
|
|
163
|
-
:param headers:
|
|
164
|
-
An optional dict-like object of headers to initially use for the field.
|
|
165
|
-
|
|
166
|
-
.. versionchanged:: 2.0.0
|
|
167
|
-
The ``header_formatter`` parameter is deprecated and will
|
|
168
|
-
be removed in urllib3 v2.1.0.
|
|
169
|
-
"""
|
|
170
|
-
|
|
171
|
-
def __init__(
|
|
172
|
-
self,
|
|
173
|
-
name: str,
|
|
174
|
-
data: _TYPE_FIELD_VALUE,
|
|
175
|
-
filename: str | None = None,
|
|
176
|
-
headers: typing.Mapping[str, str] | None = None,
|
|
177
|
-
header_formatter: typing.Callable[[str, _TYPE_FIELD_VALUE], str] | None = None,
|
|
178
|
-
):
|
|
179
|
-
self._name = name
|
|
180
|
-
self._filename = filename
|
|
181
|
-
self.data = data
|
|
182
|
-
self.headers: dict[str, str | None] = {}
|
|
183
|
-
if headers:
|
|
184
|
-
self.headers = dict(headers)
|
|
185
|
-
|
|
186
|
-
if header_formatter is not None:
|
|
187
|
-
import warnings
|
|
188
|
-
|
|
189
|
-
warnings.warn(
|
|
190
|
-
"The 'header_formatter' parameter is deprecated and "
|
|
191
|
-
"will be removed in urllib3 v2.1.0.",
|
|
192
|
-
DeprecationWarning,
|
|
193
|
-
stacklevel=2,
|
|
194
|
-
)
|
|
195
|
-
self.header_formatter = header_formatter
|
|
196
|
-
else:
|
|
197
|
-
self.header_formatter = format_multipart_header_param
|
|
198
|
-
|
|
199
|
-
@classmethod
|
|
200
|
-
def from_tuples(
|
|
201
|
-
cls,
|
|
202
|
-
fieldname: str,
|
|
203
|
-
value: _TYPE_FIELD_VALUE_TUPLE,
|
|
204
|
-
header_formatter: typing.Callable[[str, _TYPE_FIELD_VALUE], str] | None = None,
|
|
205
|
-
) -> RequestField:
|
|
206
|
-
"""
|
|
207
|
-
A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.
|
|
208
|
-
|
|
209
|
-
Supports constructing :class:`~urllib3.fields.RequestField` from
|
|
210
|
-
parameter of key/value strings AND key/filetuple. A filetuple is a
|
|
211
|
-
(filename, data, MIME type) tuple where the MIME type is optional.
|
|
212
|
-
For example::
|
|
213
|
-
|
|
214
|
-
'foo': 'bar',
|
|
215
|
-
'fakefile': ('foofile.txt', 'contents of foofile'),
|
|
216
|
-
'realfile': ('barfile.txt', open('realfile').read()),
|
|
217
|
-
'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
|
|
218
|
-
'nonamefile': 'contents of nonamefile field',
|
|
219
|
-
|
|
220
|
-
Field names and filenames must be unicode.
|
|
221
|
-
"""
|
|
222
|
-
filename: str | None
|
|
223
|
-
content_type: str | None
|
|
224
|
-
data: _TYPE_FIELD_VALUE
|
|
225
|
-
|
|
226
|
-
if isinstance(value, tuple):
|
|
227
|
-
if len(value) == 3:
|
|
228
|
-
filename, data, content_type = value
|
|
229
|
-
else:
|
|
230
|
-
filename, data = value
|
|
231
|
-
content_type = guess_content_type(filename)
|
|
232
|
-
else:
|
|
233
|
-
filename = None
|
|
234
|
-
content_type = None
|
|
235
|
-
data = value
|
|
236
|
-
|
|
237
|
-
request_param = cls(
|
|
238
|
-
fieldname, data, filename=filename, header_formatter=header_formatter
|
|
239
|
-
)
|
|
240
|
-
request_param.make_multipart(content_type=content_type)
|
|
241
|
-
|
|
242
|
-
return request_param
|
|
243
|
-
|
|
244
|
-
def _render_part(self, name: str, value: _TYPE_FIELD_VALUE) -> str:
|
|
245
|
-
"""
|
|
246
|
-
Override this method to change how each multipart header
|
|
247
|
-
parameter is formatted. By default, this calls
|
|
248
|
-
:func:`format_multipart_header_param`.
|
|
249
|
-
|
|
250
|
-
:param name:
|
|
251
|
-
The name of the parameter, an ASCII-only ``str``.
|
|
252
|
-
:param value:
|
|
253
|
-
The value of the parameter, a ``str`` or UTF-8 encoded
|
|
254
|
-
``bytes``.
|
|
255
|
-
|
|
256
|
-
:meta public:
|
|
257
|
-
"""
|
|
258
|
-
return self.header_formatter(name, value)
|
|
259
|
-
|
|
260
|
-
def _render_parts(
|
|
261
|
-
self,
|
|
262
|
-
header_parts: (
|
|
263
|
-
dict[str, _TYPE_FIELD_VALUE | None]
|
|
264
|
-
| typing.Sequence[tuple[str, _TYPE_FIELD_VALUE | None]]
|
|
265
|
-
),
|
|
266
|
-
) -> str:
|
|
267
|
-
"""
|
|
268
|
-
Helper function to format and quote a single header.
|
|
269
|
-
|
|
270
|
-
Useful for single headers that are composed of multiple items. E.g.,
|
|
271
|
-
'Content-Disposition' fields.
|
|
272
|
-
|
|
273
|
-
:param header_parts:
|
|
274
|
-
A sequence of (k, v) tuples or a :class:`dict` of (k, v) to format
|
|
275
|
-
as `k1="v1"; k2="v2"; ...`.
|
|
276
|
-
"""
|
|
277
|
-
iterable: typing.Iterable[tuple[str, _TYPE_FIELD_VALUE | None]]
|
|
278
|
-
|
|
279
|
-
parts = []
|
|
280
|
-
if isinstance(header_parts, dict):
|
|
281
|
-
iterable = header_parts.items()
|
|
282
|
-
else:
|
|
283
|
-
iterable = header_parts
|
|
284
|
-
|
|
285
|
-
for name, value in iterable:
|
|
286
|
-
if value is not None:
|
|
287
|
-
parts.append(self._render_part(name, value))
|
|
288
|
-
|
|
289
|
-
return "; ".join(parts)
|
|
290
|
-
|
|
291
|
-
def render_headers(self) -> str:
|
|
292
|
-
"""
|
|
293
|
-
Renders the headers for this request field.
|
|
294
|
-
"""
|
|
295
|
-
lines = []
|
|
296
|
-
|
|
297
|
-
sort_keys = ["Content-Disposition", "Content-Type", "Content-Location"]
|
|
298
|
-
for sort_key in sort_keys:
|
|
299
|
-
if self.headers.get(sort_key, False):
|
|
300
|
-
lines.append(f"{sort_key}: {self.headers[sort_key]}")
|
|
301
|
-
|
|
302
|
-
for header_name, header_value in self.headers.items():
|
|
303
|
-
if header_name not in sort_keys:
|
|
304
|
-
if header_value:
|
|
305
|
-
lines.append(f"{header_name}: {header_value}")
|
|
306
|
-
|
|
307
|
-
lines.append("\r\n")
|
|
308
|
-
return "\r\n".join(lines)
|
|
309
|
-
|
|
310
|
-
def make_multipart(
|
|
311
|
-
self,
|
|
312
|
-
content_disposition: str | None = None,
|
|
313
|
-
content_type: str | None = None,
|
|
314
|
-
content_location: str | None = None,
|
|
315
|
-
) -> None:
|
|
316
|
-
"""
|
|
317
|
-
Makes this request field into a multipart request field.
|
|
318
|
-
|
|
319
|
-
This method overrides "Content-Disposition", "Content-Type" and
|
|
320
|
-
"Content-Location" headers to the request parameter.
|
|
321
|
-
|
|
322
|
-
:param content_disposition:
|
|
323
|
-
The 'Content-Disposition' of the request body. Defaults to 'form-data'
|
|
324
|
-
:param content_type:
|
|
325
|
-
The 'Content-Type' of the request body.
|
|
326
|
-
:param content_location:
|
|
327
|
-
The 'Content-Location' of the request body.
|
|
328
|
-
|
|
329
|
-
"""
|
|
330
|
-
content_disposition = (content_disposition or "form-data") + "; ".join(
|
|
331
|
-
[
|
|
332
|
-
"",
|
|
333
|
-
self._render_parts(
|
|
334
|
-
(("name", self._name), ("filename", self._filename))
|
|
335
|
-
),
|
|
336
|
-
]
|
|
337
|
-
)
|
|
338
|
-
|
|
339
|
-
self.headers["Content-Disposition"] = content_disposition
|
|
340
|
-
self.headers["Content-Type"] = content_type
|
|
341
|
-
self.headers["Content-Location"] = content_location
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import binascii
|
|
4
|
-
import codecs
|
|
5
|
-
import os
|
|
6
|
-
import typing
|
|
7
|
-
from io import BytesIO
|
|
8
|
-
|
|
9
|
-
from .fields import _TYPE_FIELD_VALUE_TUPLE, RequestField
|
|
10
|
-
|
|
11
|
-
writer = codecs.lookup("utf-8")[3]
|
|
12
|
-
|
|
13
|
-
_TYPE_FIELDS_SEQUENCE = typing.Sequence[
|
|
14
|
-
typing.Union[typing.Tuple[str, _TYPE_FIELD_VALUE_TUPLE], RequestField]
|
|
15
|
-
]
|
|
16
|
-
_TYPE_FIELDS = typing.Union[
|
|
17
|
-
_TYPE_FIELDS_SEQUENCE,
|
|
18
|
-
typing.Mapping[str, _TYPE_FIELD_VALUE_TUPLE],
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def choose_boundary() -> str:
|
|
23
|
-
"""
|
|
24
|
-
Our embarrassingly-simple replacement for mimetools.choose_boundary.
|
|
25
|
-
"""
|
|
26
|
-
return binascii.hexlify(os.urandom(16)).decode()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def iter_field_objects(fields: _TYPE_FIELDS) -> typing.Iterable[RequestField]:
|
|
30
|
-
"""
|
|
31
|
-
Iterate over fields.
|
|
32
|
-
|
|
33
|
-
Supports list of (k, v) tuples and dicts, and lists of
|
|
34
|
-
:class:`~urllib3.fields.RequestField`.
|
|
35
|
-
|
|
36
|
-
"""
|
|
37
|
-
iterable: typing.Iterable[RequestField | tuple[str, _TYPE_FIELD_VALUE_TUPLE]]
|
|
38
|
-
|
|
39
|
-
if isinstance(fields, typing.Mapping):
|
|
40
|
-
iterable = fields.items()
|
|
41
|
-
else:
|
|
42
|
-
iterable = fields
|
|
43
|
-
|
|
44
|
-
for field in iterable:
|
|
45
|
-
if isinstance(field, RequestField):
|
|
46
|
-
yield field
|
|
47
|
-
else:
|
|
48
|
-
yield RequestField.from_tuples(*field)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def encode_multipart_formdata(
|
|
52
|
-
fields: _TYPE_FIELDS, boundary: str | None = None
|
|
53
|
-
) -> tuple[bytes, str]:
|
|
54
|
-
"""
|
|
55
|
-
Encode a dictionary of ``fields`` using the multipart/form-data MIME format.
|
|
56
|
-
|
|
57
|
-
:param fields:
|
|
58
|
-
Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).
|
|
59
|
-
Values are processed by :func:`urllib3.fields.RequestField.from_tuples`.
|
|
60
|
-
|
|
61
|
-
:param boundary:
|
|
62
|
-
If not specified, then a random boundary will be generated using
|
|
63
|
-
:func:`urllib3.filepost.choose_boundary`.
|
|
64
|
-
"""
|
|
65
|
-
body = BytesIO()
|
|
66
|
-
if boundary is None:
|
|
67
|
-
boundary = choose_boundary()
|
|
68
|
-
|
|
69
|
-
for field in iter_field_objects(fields):
|
|
70
|
-
body.write(f"--{boundary}\r\n".encode("latin-1"))
|
|
71
|
-
|
|
72
|
-
writer(body).write(field.render_headers())
|
|
73
|
-
data = field.data
|
|
74
|
-
|
|
75
|
-
if isinstance(data, int):
|
|
76
|
-
data = str(data) # Backwards compatibility
|
|
77
|
-
|
|
78
|
-
if isinstance(data, str):
|
|
79
|
-
writer(body).write(data)
|
|
80
|
-
else:
|
|
81
|
-
body.write(data)
|
|
82
|
-
|
|
83
|
-
body.write(b"\r\n")
|
|
84
|
-
|
|
85
|
-
body.write(f"--{boundary}--\r\n".encode("latin-1"))
|
|
86
|
-
|
|
87
|
-
content_type = f"multipart/form-data; boundary={boundary}"
|
|
88
|
-
|
|
89
|
-
return body.getvalue(), content_type
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from importlib.metadata import version
|
|
4
|
-
|
|
5
|
-
__all__ = [
|
|
6
|
-
"inject_into_urllib3",
|
|
7
|
-
"extract_from_urllib3",
|
|
8
|
-
]
|
|
9
|
-
|
|
10
|
-
import typing
|
|
11
|
-
|
|
12
|
-
orig_HTTPSConnection: typing.Any = None
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def inject_into_urllib3() -> None:
|
|
16
|
-
# First check if h2 version is valid
|
|
17
|
-
h2_version = version("h2")
|
|
18
|
-
if not h2_version.startswith("4."):
|
|
19
|
-
raise ImportError(
|
|
20
|
-
"urllib3 v2 supports h2 version 4.x.x, currently "
|
|
21
|
-
f"the 'h2' module is compiled with {h2_version!r}. "
|
|
22
|
-
"See: https://github.com/urllib3/urllib3/issues/3290"
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
# Import here to avoid circular dependencies.
|
|
26
|
-
from .. import connection as urllib3_connection
|
|
27
|
-
from .. import util as urllib3_util
|
|
28
|
-
from ..connectionpool import HTTPSConnectionPool
|
|
29
|
-
from ..util import ssl_ as urllib3_util_ssl
|
|
30
|
-
from .connection import HTTP2Connection
|
|
31
|
-
|
|
32
|
-
global orig_HTTPSConnection
|
|
33
|
-
orig_HTTPSConnection = urllib3_connection.HTTPSConnection
|
|
34
|
-
|
|
35
|
-
HTTPSConnectionPool.ConnectionCls = HTTP2Connection
|
|
36
|
-
urllib3_connection.HTTPSConnection = HTTP2Connection # type: ignore[misc]
|
|
37
|
-
|
|
38
|
-
# TODO: Offer 'http/1.1' as well, but for testing purposes this is handy.
|
|
39
|
-
urllib3_util.ALPN_PROTOCOLS = ["h2"]
|
|
40
|
-
urllib3_util_ssl.ALPN_PROTOCOLS = ["h2"]
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def extract_from_urllib3() -> None:
|
|
44
|
-
from .. import connection as urllib3_connection
|
|
45
|
-
from .. import util as urllib3_util
|
|
46
|
-
from ..connectionpool import HTTPSConnectionPool
|
|
47
|
-
from ..util import ssl_ as urllib3_util_ssl
|
|
48
|
-
|
|
49
|
-
HTTPSConnectionPool.ConnectionCls = orig_HTTPSConnection
|
|
50
|
-
urllib3_connection.HTTPSConnection = orig_HTTPSConnection # type: ignore[misc]
|
|
51
|
-
|
|
52
|
-
urllib3_util.ALPN_PROTOCOLS = ["http/1.1"]
|
|
53
|
-
urllib3_util_ssl.ALPN_PROTOCOLS = ["http/1.1"]
|