oci 2.138.1__py3-none-any.whl → 2.139.0__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.
- oci/_vendor/idna/__init__.py +45 -2
- oci/_vendor/idna/codec.py +47 -43
- oci/_vendor/idna/compat.py +10 -7
- oci/_vendor/idna/core.py +210 -173
- oci/_vendor/idna/idnadata.py +3869 -1676
- oci/_vendor/idna/intranges.py +13 -9
- oci/_vendor/idna/package_data.py +2 -3
- oci/_vendor/idna/uts46data.py +8355 -8031
- oci/_vendor/urllib3/__init__.py +1 -1
- oci/_vendor/urllib3/_collections.py +19 -1
- oci/_vendor/urllib3/_version.py +2 -2
- oci/_vendor/urllib3/connection.py +8 -3
- oci/_vendor/urllib3/connectionpool.py +45 -13
- oci/_vendor/urllib3/contrib/__init__.py +1 -1
- oci/_vendor/urllib3/contrib/_appengine_environ.py +1 -1
- oci/_vendor/urllib3/contrib/_securetransport/__init__.py +1 -1
- oci/_vendor/urllib3/contrib/_securetransport/bindings.py +2 -2
- oci/_vendor/urllib3/contrib/_securetransport/low_level.py +1 -1
- oci/_vendor/urllib3/contrib/appengine.py +2 -2
- oci/_vendor/urllib3/contrib/ntlmpool.py +3 -3
- oci/_vendor/urllib3/contrib/pyopenssl.py +14 -7
- oci/_vendor/urllib3/contrib/securetransport.py +2 -4
- oci/_vendor/urllib3/contrib/socks.py +1 -1
- oci/_vendor/urllib3/exceptions.py +1 -1
- oci/_vendor/urllib3/fields.py +1 -1
- oci/_vendor/urllib3/filepost.py +1 -1
- oci/_vendor/urllib3/packages/__init__.py +2 -2
- oci/_vendor/urllib3/packages/backports/__init__.py +1 -1
- oci/_vendor/urllib3/packages/backports/makefile.py +1 -1
- oci/_vendor/urllib3/packages/backports/weakref_finalize.py +160 -0
- oci/_vendor/urllib3/packages/six.py +1 -2
- oci/_vendor/urllib3/poolmanager.py +7 -4
- oci/_vendor/urllib3/request.py +22 -1
- oci/_vendor/urllib3/response.py +65 -4
- oci/_vendor/urllib3/util/__init__.py +1 -1
- oci/_vendor/urllib3/util/connection.py +1 -1
- oci/_vendor/urllib3/util/proxy.py +1 -1
- oci/_vendor/urllib3/util/queue.py +1 -1
- oci/_vendor/urllib3/util/request.py +1 -1
- oci/_vendor/urllib3/util/response.py +1 -1
- oci/_vendor/urllib3/util/retry.py +5 -3
- oci/_vendor/urllib3/util/ssl_.py +14 -5
- oci/_vendor/urllib3/util/ssl_match_hostname.py +1 -1
- oci/_vendor/urllib3/util/ssltransport.py +1 -1
- oci/_vendor/urllib3/util/timeout.py +7 -4
- oci/_vendor/urllib3/util/url.py +8 -5
- oci/_vendor/urllib3/util/wait.py +1 -2
- oci/access_governance_cp/access_governance_cp_client.py +8 -8
- oci/adm/application_dependency_management_client.py +36 -36
- oci/ai_anomaly_detection/anomaly_detection_client.py +36 -36
- oci/ai_document/ai_service_document_client.py +26 -26
- oci/ai_language/ai_service_language_client.py +44 -44
- oci/ai_speech/ai_service_speech_client.py +19 -19
- oci/ai_vision/ai_service_vision_client.py +25 -25
- oci/analytics/analytics_client.py +24 -24
- oci/announcements_service/announcement_client.py +5 -5
- oci/announcements_service/announcement_subscription_client.py +9 -9
- oci/announcements_service/announcements_preferences_client.py +4 -4
- oci/announcements_service/service_client.py +1 -1
- oci/apigateway/api_gateway_client.py +21 -21
- oci/apigateway/deployment_client.py +6 -6
- oci/apigateway/gateway_client.py +6 -6
- oci/apigateway/subscribers_client.py +6 -6
- oci/apigateway/usage_plans_client.py +6 -6
- oci/apigateway/work_requests_client.py +5 -5
- oci/apm_config/config_client.py +9 -9
- oci/apm_control_plane/apm_domain_client.py +14 -14
- oci/apm_synthetics/apm_synthetic_client.py +28 -28
- oci/apm_traces/attributes_client.py +8 -8
- oci/apm_traces/query_client.py +2 -2
- oci/apm_traces/trace_client.py +4 -4
- oci/appmgmt_control/appmgmt_control_client.py +8 -8
- oci/artifacts/artifacts_client.py +32 -32
- oci/audit/audit_client.py +3 -3
- oci/autoscaling/auto_scaling_client.py +11 -11
- oci/bastion/bastion_client.py +15 -15
- oci/bds/bds_client.py +72 -72
- oci/blockchain/blockchain_platform_client.py +27 -27
- oci/budget/budget_client.py +10 -10
- oci/capacity_management/capacity_management_client.py +32 -32
- oci/certificates/certificates_client.py +5 -5
- oci/certificates_management/certificates_management_client.py +32 -32
- oci/cims/incident_client.py +13 -14
- oci/cims/models/__init__.py +4 -2
- oci/cims/models/cmos_user_group_info.py +103 -0
- oci/cims/models/create_incident.py +33 -2
- oci/cims/models/create_limit_item_details.py +2 -57
- oci/cims/models/create_user_details.py +4 -4
- oci/cims/models/incident.py +188 -0
- oci/cims/models/incident_resource_type.py +4 -4
- oci/cims/models/incident_summary.py +188 -0
- oci/cims/models/limit_item.py +2 -2
- oci/cims/models/{service_categories.py → services.py} +27 -27
- oci/cims/models/sub_categories.py +15 -15
- oci/cims/models/ticket.py +7 -3
- oci/cims/models/validation_response.py +33 -2
- oci/cloud_bridge/common_client.py +5 -5
- oci/cloud_bridge/discovery_client.py +15 -15
- oci/cloud_bridge/inventory_client.py +16 -16
- oci/cloud_bridge/ocb_agent_svc_client.py +22 -22
- oci/cloud_guard/cloud_guard_client.py +155 -155
- oci/cloud_migrations/migration_client.py +43 -43
- oci/cluster_placement_groups/cluster_placement_groups_cp_client.py +13 -13
- oci/compute_cloud_at_customer/compute_cloud_at_customer_client.py +12 -12
- oci/compute_instance_agent/compute_instance_agent_client.py +6 -6
- oci/compute_instance_agent/plugin_client.py +2 -2
- oci/compute_instance_agent/pluginconfig_client.py +1 -1
- oci/container_engine/container_engine_client.py +44 -44
- oci/container_instances/container_instance_client.py +18 -18
- oci/core/blockstorage_client.py +60 -60
- oci/core/compute_client.py +102 -102
- oci/core/compute_management_client.py +32 -32
- oci/core/virtual_network_client.py +247 -247
- oci/dashboard_service/dashboard_client.py +6 -6
- oci/dashboard_service/dashboard_group_client.py +6 -6
- oci/data_catalog/data_catalog_client.py +149 -149
- oci/data_flow/data_flow_client.py +44 -44
- oci/data_integration/data_integration_client.py +163 -163
- oci/data_labeling_service/data_labeling_management_client.py +17 -17
- oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
- oci/data_safe/data_safe_client.py +292 -292
- oci/data_science/data_science_client.py +92 -92
- oci/database/database_client.py +523 -398
- oci/database/database_client_composite_operations.py +88 -0
- oci/database/models/__init__.py +4 -0
- oci/database/models/autonomous_database.py +2 -2
- oci/database/models/autonomous_database_summary.py +2 -2
- oci/database/models/configure_exascale_exadata_infrastructure_details.py +72 -0
- oci/database/models/create_autonomous_database_base.py +2 -2
- oci/database/models/create_db_home_details.py +33 -2
- oci/database/models/create_db_home_from_backup_details.py +31 -0
- oci/database/models/create_db_home_from_database_details.py +31 -0
- oci/database/models/create_exascale_db_storage_vault_details.py +37 -2
- oci/database/models/create_pluggable_database_creation_type_details.py +2 -2
- oci/database/models/create_vm_cluster_details.py +37 -2
- oci/database/models/exadata_infrastructure.py +29 -2
- oci/database/models/exadata_infrastructure_summary.py +29 -2
- oci/database/models/exascale_config_details.py +103 -0
- oci/database/models/exascale_db_storage_vault.py +35 -0
- oci/database/models/exascale_db_storage_vault_summary.py +37 -2
- oci/database/models/update_autonomous_database_details.py +2 -2
- oci/database/models/vm_cluster.py +84 -2
- oci/database/models/vm_cluster_summary.py +84 -2
- oci/database_management/db_management_client.py +211 -211
- oci/database_management/diagnosability_client.py +4 -4
- oci/database_management/managed_my_sql_databases_client.py +7 -7
- oci/database_management/perfhub_client.py +1 -1
- oci/database_management/sql_tuning_client.py +17 -17
- oci/database_migration/database_migration_client.py +42 -42
- oci/database_tools/database_tools_client.py +23 -23
- oci/delegate_access_control/delegate_access_control_client.py +26 -26
- oci/delegate_access_control/work_request_client.py +4 -4
- oci/demand_signal/occ_demand_signal_client.py +7 -7
- oci/desktops/desktop_service_client.py +21 -21
- oci/devops/devops_client.py +141 -141
- oci/disaster_recovery/disaster_recovery_client.py +29 -29
- oci/dns/dns_client.py +54 -54
- oci/dts/appliance_export_job_client.py +6 -6
- oci/dts/shipping_vendors_client.py +1 -1
- oci/dts/transfer_appliance_client.py +8 -8
- oci/dts/transfer_appliance_entitlement_client.py +3 -3
- oci/dts/transfer_device_client.py +5 -5
- oci/dts/transfer_job_client.py +6 -6
- oci/dts/transfer_package_client.py +7 -7
- oci/em_warehouse/em_warehouse_client.py +13 -13
- oci/email/email_client.py +31 -31
- oci/email_data_plane/email_dp_client.py +1 -1
- oci/events/events_client.py +6 -6
- oci/file_storage/file_storage_client.py +68 -68
- oci/fleet_apps_management/fleet_apps_management_admin_client.py +25 -25
- oci/fleet_apps_management/fleet_apps_management_client.py +35 -35
- oci/fleet_apps_management/fleet_apps_management_maintenance_window_client.py +5 -5
- oci/fleet_apps_management/fleet_apps_management_operations_client.py +26 -26
- oci/fleet_apps_management/fleet_apps_management_runbooks_client.py +12 -12
- oci/fleet_software_update/fleet_software_update_client.py +46 -46
- oci/functions/functions_invoke_client.py +1 -1
- oci/functions/functions_management_client.py +16 -16
- oci/fusion_apps/fusion_applications_client.py +41 -41
- oci/generative_ai/generative_ai_client.py +22 -22
- oci/generative_ai_agent/generative_ai_agent_client.py +33 -33
- oci/generative_ai_agent_runtime/generative_ai_agent_runtime_client.py +5 -5
- oci/generative_ai_inference/generative_ai_inference_client.py +4 -4
- oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
- oci/globally_distributed_database/sharded_database_service_client.py +30 -30
- oci/golden_gate/golden_gate_client.py +70 -70
- oci/governance_rules_control_plane/governance_rule_client.py +15 -15
- oci/governance_rules_control_plane/work_request_client.py +5 -5
- oci/healthchecks/health_checks_client.py +17 -17
- oci/identity/identity_client.py +145 -145
- oci/identity_data_plane/dataplane_client.py +2 -2
- oci/identity_domains/identity_domains_client.py +311 -311
- oci/integration/integration_instance_client.py +19 -19
- oci/jms/java_management_service_client.py +75 -75
- oci/jms_java_downloads/java_download_client.py +25 -25
- oci/key_management/ekm_client.py +5 -5
- oci/key_management/kms_crypto_client.py +6 -6
- oci/key_management/kms_hsm_cluster_client.py +12 -12
- oci/key_management/kms_management_client.py +21 -21
- oci/key_management/kms_vault_client.py +14 -14
- oci/license_manager/license_manager_client.py +18 -18
- oci/limits/limits_client.py +4 -4
- oci/limits/quotas_client.py +7 -7
- oci/load_balancer/load_balancer_client.py +61 -61
- oci/lockbox/lockbox_client.py +24 -24
- oci/log_analytics/log_analytics_client.py +193 -193
- oci/logging/logging_management_client.py +30 -30
- oci/loggingingestion/logging_client.py +1 -1
- oci/loggingsearch/log_search_client.py +1 -1
- oci/management_agent/management_agent_client.py +28 -28
- oci/management_dashboard/dashx_apis_client.py +14 -14
- oci/marketplace/account_client.py +2 -2
- oci/marketplace/marketplace_client.py +30 -30
- oci/marketplace_private_offer/attachment_client.py +5 -5
- oci/marketplace_private_offer/offer_client.py +6 -6
- oci/marketplace_publisher/attachment_client.py +5 -5
- oci/marketplace_publisher/marketplace_publisher_client.py +71 -71
- oci/marketplace_publisher/offer_client.py +6 -6
- oci/media_services/media_services_client.py +60 -60
- oci/media_services/media_stream_client.py +2 -2
- oci/monitoring/monitoring_client.py +18 -18
- oci/mysql/channels_client.py +7 -7
- oci/mysql/db_backups_client.py +7 -7
- oci/mysql/db_system_client.py +17 -17
- oci/mysql/mysqlaas_client.py +7 -7
- oci/mysql/replicas_client.py +5 -5
- oci/mysql/work_requests_client.py +4 -4
- oci/network_firewall/network_firewall_client.py +86 -86
- oci/network_load_balancer/network_load_balancer_client.py +34 -34
- oci/nosql/nosql_client.py +24 -24
- oci/object_storage/object_storage_client.py +153 -57
- oci/oce/oce_instance_client.py +10 -10
- oci/oci_control_center/occ_metrics_client.py +3 -3
- oci/ocvp/cluster_client.py +5 -5
- oci/ocvp/esxi_host_client.py +8 -8
- oci/ocvp/sddc_client.py +14 -14
- oci/ocvp/work_request_client.py +4 -4
- oci/oda/management_client.py +59 -59
- oci/oda/oda_client.py +17 -17
- oci/oda/odapackage_client.py +7 -7
- oci/onesubscription/billing_schedule_client.py +1 -1
- oci/onesubscription/commitment_client.py +2 -2
- oci/onesubscription/computed_usage_client.py +3 -3
- oci/onesubscription/invoice_summary_client.py +2 -2
- oci/onesubscription/organization_subscription_client.py +1 -1
- oci/onesubscription/ratecard_client.py +1 -1
- oci/onesubscription/subscribed_service_client.py +2 -2
- oci/onesubscription/subscription_client.py +1 -1
- oci/ons/notification_control_plane_client.py +6 -6
- oci/ons/notification_data_plane_client.py +10 -10
- oci/opa/opa_instance_client.py +13 -13
- oci/opensearch/opensearch_cluster_backup_client.py +4 -4
- oci/opensearch/opensearch_cluster_client.py +14 -14
- oci/operator_access_control/access_requests_client.py +10 -10
- oci/operator_access_control/operator_actions_client.py +2 -2
- oci/operator_access_control/operator_control_assignment_client.py +8 -8
- oci/operator_access_control/operator_control_client.py +6 -6
- oci/opsi/operations_insights_client.py +180 -180
- oci/optimizer/optimizer_client.py +26 -26
- oci/os_management/event_client.py +8 -8
- oci/os_management/os_management_client.py +69 -69
- oci/os_management_hub/event_client.py +8 -8
- oci/os_management_hub/lifecycle_environment_client.py +12 -12
- oci/os_management_hub/managed_instance_client.py +31 -31
- oci/os_management_hub/managed_instance_group_client.py +25 -25
- oci/os_management_hub/management_station_client.py +10 -10
- oci/os_management_hub/onboarding_client.py +6 -6
- oci/os_management_hub/reporting_managed_instance_client.py +3 -3
- oci/os_management_hub/scheduled_job_client.py +7 -7
- oci/os_management_hub/software_source_client.py +27 -27
- oci/os_management_hub/work_request_client.py +4 -4
- oci/osp_gateway/address_rule_service_client.py +1 -1
- oci/osp_gateway/address_service_client.py +2 -2
- oci/osp_gateway/invoice_service_client.py +5 -5
- oci/osp_gateway/subscription_service_client.py +5 -5
- oci/osub_billing_schedule/billing_schedule_client.py +1 -1
- oci/osub_organization_subscription/organization_subscription_client.py +1 -1
- oci/osub_subscription/commitment_client.py +2 -2
- oci/osub_subscription/ratecard_client.py +1 -1
- oci/osub_subscription/subscription_client.py +1 -1
- oci/osub_usage/computed_usage_client.py +3 -3
- oci/psql/models/connection_details.py +29 -2
- oci/psql/models/endpoint.py +1 -1
- oci/psql/models/network_details.py +33 -2
- oci/psql/models/update_network_details.py +33 -2
- oci/psql/postgresql_client.py +33 -33
- oci/queue/queue_admin_client.py +11 -11
- oci/queue/queue_client.py +8 -8
- oci/recovery/database_recovery_client.py +26 -26
- oci/redis/redis_cluster_client.py +12 -12
- oci/resource_manager/resource_manager_client.py +52 -52
- oci/resource_scheduler/schedule_client.py +13 -13
- oci/resource_search/resource_search_client.py +3 -3
- oci/rover/rover_bundle_client.py +8 -8
- oci/rover/rover_cluster_client.py +8 -8
- oci/rover/rover_entitlement_client.py +6 -6
- oci/rover/rover_node_client.py +15 -15
- oci/rover/shape_client.py +1 -1
- oci/rover/work_requests_client.py +5 -5
- oci/sch/connector_plugins_client.py +2 -2
- oci/sch/service_connector_client.py +12 -12
- oci/secrets/secrets_client.py +3 -3
- oci/security_attribute/security_attribute_client.py +18 -18
- oci/service_catalog/service_catalog_client.py +26 -26
- oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
- oci/service_mesh/service_mesh_client.py +48 -48
- oci/stack_monitoring/stack_monitoring_client.py +71 -71
- oci/streaming/stream_admin_client.py +18 -18
- oci/streaming/stream_client.py +8 -8
- oci/tenant_manager_control_plane/domain_client.py +5 -5
- oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
- oci/tenant_manager_control_plane/governance_client.py +2 -2
- oci/tenant_manager_control_plane/link_client.py +3 -3
- oci/tenant_manager_control_plane/orders_client.py +2 -2
- oci/tenant_manager_control_plane/organization_client.py +10 -10
- oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
- oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
- oci/tenant_manager_control_plane/subscription_client.py +11 -11
- oci/tenant_manager_control_plane/work_request_client.py +4 -4
- oci/threat_intelligence/threatintel_client.py +5 -5
- oci/usage/resources_client.py +2 -2
- oci/usage/rewards_client.py +6 -6
- oci/usage/usagelimits_client.py +1 -1
- oci/usage_api/usageapi_client.py +33 -33
- oci/vault/vaults_client.py +13 -13
- oci/vbs_inst/vbs_instance_client.py +10 -10
- oci/version.py +1 -1
- oci/visual_builder/vb_instance_client.py +13 -13
- oci/vn_monitoring/vn_monitoring_client.py +12 -12
- oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
- oci/waa/waa_client.py +13 -13
- oci/waa/work_request_client.py +4 -4
- oci/waas/redirect_client.py +6 -6
- oci/waas/waas_client.py +66 -66
- oci/waf/waf_client.py +24 -24
- oci/work_requests/work_request_client.py +4 -4
- oci/zpr/zpr_client.py +15 -15
- {oci-2.138.1.dist-info → oci-2.139.0.dist-info}/METADATA +1 -1
- {oci-2.138.1.dist-info → oci-2.139.0.dist-info}/RECORD +342 -338
- {oci-2.138.1.dist-info → oci-2.139.0.dist-info}/THIRD_PARTY_LICENSES.txt +1 -1
- {oci-2.138.1.dist-info → oci-2.139.0.dist-info}/LICENSE.txt +0 -0
- {oci-2.138.1.dist-info → oci-2.139.0.dist-info}/WHEEL +0 -0
- {oci-2.138.1.dist-info → oci-2.139.0.dist-info}/top_level.txt +0 -0
oci/_vendor/idna/__init__.py
CHANGED
@@ -1,7 +1,50 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
# Modified Work: Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
3
3
|
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
4
|
-
# Copyright (c) 2013-
|
4
|
+
# Copyright (c) 2013-2024, Kim Davies and contributors. All rights reserved.
|
5
5
|
|
6
|
+
from .core import (
|
7
|
+
IDNABidiError,
|
8
|
+
IDNAError,
|
9
|
+
InvalidCodepoint,
|
10
|
+
InvalidCodepointContext,
|
11
|
+
alabel,
|
12
|
+
check_bidi,
|
13
|
+
check_hyphen_ok,
|
14
|
+
check_initial_combiner,
|
15
|
+
check_label,
|
16
|
+
check_nfc,
|
17
|
+
decode,
|
18
|
+
encode,
|
19
|
+
ulabel,
|
20
|
+
uts46_remap,
|
21
|
+
valid_contextj,
|
22
|
+
valid_contexto,
|
23
|
+
valid_label_length,
|
24
|
+
valid_string_length,
|
25
|
+
)
|
26
|
+
from .intranges import intranges_contain
|
6
27
|
from .package_data import __version__
|
7
|
-
|
28
|
+
|
29
|
+
__all__ = [
|
30
|
+
"__version__",
|
31
|
+
"IDNABidiError",
|
32
|
+
"IDNAError",
|
33
|
+
"InvalidCodepoint",
|
34
|
+
"InvalidCodepointContext",
|
35
|
+
"alabel",
|
36
|
+
"check_bidi",
|
37
|
+
"check_hyphen_ok",
|
38
|
+
"check_initial_combiner",
|
39
|
+
"check_label",
|
40
|
+
"check_nfc",
|
41
|
+
"decode",
|
42
|
+
"encode",
|
43
|
+
"intranges_contain",
|
44
|
+
"ulabel",
|
45
|
+
"uts46_remap",
|
46
|
+
"valid_contextj",
|
47
|
+
"valid_contexto",
|
48
|
+
"valid_label_length",
|
49
|
+
"valid_string_length",
|
50
|
+
]
|
oci/_vendor/idna/codec.py
CHANGED
@@ -1,55 +1,56 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
# Modified Work: Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
3
3
|
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
4
|
-
# Copyright (c) 2013-
|
4
|
+
# Copyright (c) 2013-2024, Kim Davies and contributors. All rights reserved.
|
5
5
|
|
6
|
-
from .core import encode, decode, alabel, ulabel, IDNAError
|
7
6
|
import codecs
|
8
7
|
import re
|
8
|
+
from typing import Any, Optional, Tuple
|
9
9
|
|
10
|
-
|
10
|
+
from .core import IDNAError, alabel, decode, encode, ulabel
|
11
11
|
|
12
|
-
|
12
|
+
_unicode_dots_re = re.compile("[\u002e\u3002\uff0e\uff61]")
|
13
13
|
|
14
|
-
def encode(self, data, errors='strict'):
|
15
14
|
|
16
|
-
|
17
|
-
|
15
|
+
class Codec(codecs.Codec):
|
16
|
+
def encode(self, data: str, errors: str = "strict") -> Tuple[bytes, int]:
|
17
|
+
if errors != "strict":
|
18
|
+
raise IDNAError('Unsupported error handling "{}"'.format(errors))
|
18
19
|
|
19
20
|
if not data:
|
20
|
-
return "", 0
|
21
|
+
return b"", 0
|
21
22
|
|
22
23
|
return encode(data), len(data)
|
23
24
|
|
24
|
-
def decode(self, data, errors=
|
25
|
-
|
26
|
-
|
27
|
-
raise IDNAError("Unsupported error handling \"{0}\"".format(errors))
|
25
|
+
def decode(self, data: bytes, errors: str = "strict") -> Tuple[str, int]:
|
26
|
+
if errors != "strict":
|
27
|
+
raise IDNAError('Unsupported error handling "{}"'.format(errors))
|
28
28
|
|
29
29
|
if not data:
|
30
|
-
return
|
30
|
+
return "", 0
|
31
31
|
|
32
32
|
return decode(data), len(data)
|
33
33
|
|
34
|
+
|
34
35
|
class IncrementalEncoder(codecs.BufferedIncrementalEncoder):
|
35
|
-
def _buffer_encode(self, data, errors, final):
|
36
|
-
if errors !=
|
37
|
-
raise IDNAError(
|
36
|
+
def _buffer_encode(self, data: str, errors: str, final: bool) -> Tuple[bytes, int]:
|
37
|
+
if errors != "strict":
|
38
|
+
raise IDNAError('Unsupported error handling "{}"'.format(errors))
|
38
39
|
|
39
40
|
if not data:
|
40
|
-
return
|
41
|
+
return b"", 0
|
41
42
|
|
42
43
|
labels = _unicode_dots_re.split(data)
|
43
|
-
trailing_dot =
|
44
|
+
trailing_dot = b""
|
44
45
|
if labels:
|
45
46
|
if not labels[-1]:
|
46
|
-
trailing_dot =
|
47
|
+
trailing_dot = b"."
|
47
48
|
del labels[-1]
|
48
49
|
elif not final:
|
49
50
|
# Keep potentially unfinished label until the next call
|
50
51
|
del labels[-1]
|
51
52
|
if labels:
|
52
|
-
trailing_dot =
|
53
|
+
trailing_dot = b"."
|
53
54
|
|
54
55
|
result = []
|
55
56
|
size = 0
|
@@ -60,37 +61,33 @@ class IncrementalEncoder(codecs.BufferedIncrementalEncoder):
|
|
60
61
|
size += len(label)
|
61
62
|
|
62
63
|
# Join with U+002E
|
63
|
-
|
64
|
+
result_bytes = b".".join(result) + trailing_dot
|
64
65
|
size += len(trailing_dot)
|
65
|
-
return
|
66
|
+
return result_bytes, size
|
67
|
+
|
66
68
|
|
67
69
|
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
|
68
|
-
def _buffer_decode(self, data, errors, final):
|
69
|
-
if errors !=
|
70
|
-
raise IDNAError(
|
70
|
+
def _buffer_decode(self, data: Any, errors: str, final: bool) -> Tuple[str, int]:
|
71
|
+
if errors != "strict":
|
72
|
+
raise IDNAError('Unsupported error handling "{}"'.format(errors))
|
71
73
|
|
72
74
|
if not data:
|
73
|
-
return (
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
data = str(data)
|
81
|
-
unicode(data, "ascii")
|
82
|
-
labels = data.split(".")
|
83
|
-
|
84
|
-
trailing_dot = u''
|
75
|
+
return ("", 0)
|
76
|
+
|
77
|
+
if not isinstance(data, str):
|
78
|
+
data = str(data, "ascii")
|
79
|
+
|
80
|
+
labels = _unicode_dots_re.split(data)
|
81
|
+
trailing_dot = ""
|
85
82
|
if labels:
|
86
83
|
if not labels[-1]:
|
87
|
-
trailing_dot =
|
84
|
+
trailing_dot = "."
|
88
85
|
del labels[-1]
|
89
86
|
elif not final:
|
90
87
|
# Keep potentially unfinished label until the next call
|
91
88
|
del labels[-1]
|
92
89
|
if labels:
|
93
|
-
trailing_dot =
|
90
|
+
trailing_dot = "."
|
94
91
|
|
95
92
|
result = []
|
96
93
|
size = 0
|
@@ -100,20 +97,24 @@ class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
|
|
100
97
|
size += 1
|
101
98
|
size += len(label)
|
102
99
|
|
103
|
-
|
100
|
+
result_str = ".".join(result) + trailing_dot
|
104
101
|
size += len(trailing_dot)
|
105
|
-
return (
|
102
|
+
return (result_str, size)
|
106
103
|
|
107
104
|
|
108
105
|
class StreamWriter(Codec, codecs.StreamWriter):
|
109
106
|
pass
|
110
107
|
|
108
|
+
|
111
109
|
class StreamReader(Codec, codecs.StreamReader):
|
112
110
|
pass
|
113
111
|
|
114
|
-
|
112
|
+
|
113
|
+
def search_function(name: str) -> Optional[codecs.CodecInfo]:
|
114
|
+
if name != "idna2008":
|
115
|
+
return None
|
115
116
|
return codecs.CodecInfo(
|
116
|
-
name=
|
117
|
+
name=name,
|
117
118
|
encode=Codec().encode,
|
118
119
|
decode=Codec().decode,
|
119
120
|
incrementalencoder=IncrementalEncoder,
|
@@ -121,3 +122,6 @@ def getregentry():
|
|
121
122
|
streamwriter=StreamWriter,
|
122
123
|
streamreader=StreamReader,
|
123
124
|
)
|
125
|
+
|
126
|
+
|
127
|
+
codecs.register(search_function)
|
oci/_vendor/idna/compat.py
CHANGED
@@ -1,17 +1,20 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
# Modified Work: Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
3
3
|
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
4
|
-
# Copyright (c) 2013-
|
4
|
+
# Copyright (c) 2013-2024, Kim Davies and contributors. All rights reserved.
|
5
5
|
|
6
|
-
from
|
7
|
-
from .codec import *
|
6
|
+
from typing import Any, Union
|
8
7
|
|
9
|
-
|
8
|
+
from .core import decode, encode
|
9
|
+
|
10
|
+
|
11
|
+
def ToASCII(label: str) -> bytes:
|
10
12
|
return encode(label)
|
11
13
|
|
12
|
-
|
14
|
+
|
15
|
+
def ToUnicode(label: Union[bytes, bytearray]) -> str:
|
13
16
|
return decode(label)
|
14
17
|
|
15
|
-
def nameprep(s):
|
16
|
-
raise NotImplementedError("IDNA 2008 does not utilise nameprep protocol")
|
17
18
|
|
19
|
+
def nameprep(s: Any) -> None:
|
20
|
+
raise NotImplementedError("IDNA 2008 does not utilise nameprep protocol")
|