Skip to content

Commit ecf66d8

Browse files
committed
Remove the use of six package.
The package aspires to compatibility with Python >= 3.6, so compatibility with Python 2 is not needed any more. The commit strive to be completely functional neutral, no other changes were made in the code. Fixes: #984 Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
1 parent 2641cd2 commit ecf66d8

File tree

323 files changed

+7538
-7898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

323 files changed

+7538
-7898
lines changed

THIRD_PARTY_LICENSES.txt

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,32 +1235,6 @@ LICENSE: https://github.com/rholder/retrying/blob/master/LICENSE
12351235
===============================================================================
12361236

12371237

1238-
six
1239-
=============
1240-
LICENSE: https://github.com/benjaminp/six/blob/master/LICENSE
1241-
1242-
Copyright (c) 2010-2020 Benjamin Peterson
1243-
1244-
Permission is hereby granted, free of charge, to any person obtaining a copy of
1245-
this software and associated documentation files (the "Software"), to deal in
1246-
the Software without restriction, including without limitation the rights to
1247-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
1248-
the Software, and to permit persons to whom the Software is furnished to do so,
1249-
subject to the following conditions:
1250-
1251-
The above copyright notice and this permission notice shall be included in all
1252-
copies or substantial portions of the Software.
1253-
1254-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1255-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
1256-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
1257-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1258-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1259-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1260-
1261-
===============================================================================
1262-
1263-
12641238
terminaltables
12651239
==============
12661240
LICENSE: https://github.com/Robpol86/terminaltables/blob/master/LICENSE

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ pytz>=2016.10
3131
requests==2.27.0; python_version == '3.6'
3232
requests==2.31.0; python_version == '3.7'
3333
requests>=2.32.0; python_version > '3.7'
34-
six>=1.15.0
3534
sphinx==3.3.0
3635
sphinx-rtd-theme==0.4.3
3736
terminaltables==3.1.10

services/access_governance_cp/src/oci_cli_access_governance_cp/generated/accessgovernancecp_cli.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from __future__ import print_function
77
import click
88
import oci # noqa: F401
9-
import six # noqa: F401
109
import sys # noqa: F401
1110
from oci_cli.cli_root import cli
1211
from oci_cli import cli_constants # noqa: F401
@@ -56,7 +55,7 @@ def governance_instance_group():
5655
@cli_util.wrap_exceptions
5756
def change_governance_instance_compartment(ctx, from_json, governance_instance_id, compartment_id, if_match):
5857

59-
if isinstance(governance_instance_id, six.string_types) and len(governance_instance_id.strip()) == 0:
58+
if isinstance(governance_instance_id, str) and len(governance_instance_id.strip()) == 0:
6059
raise click.UsageError('Parameter --governance-instance-id cannot be whitespace or empty string')
6160

6261
kwargs = {}
@@ -163,7 +162,7 @@ def create_governance_instance(ctx, from_json, wait_for_state, max_wait_seconds,
163162
@cli_util.wrap_exceptions
164163
def delete_governance_instance(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, governance_instance_id, if_match):
165164

166-
if isinstance(governance_instance_id, six.string_types) and len(governance_instance_id.strip()) == 0:
165+
if isinstance(governance_instance_id, str) and len(governance_instance_id.strip()) == 0:
167166
raise click.UsageError('Parameter --governance-instance-id cannot be whitespace or empty string')
168167

169168
kwargs = {}
@@ -222,7 +221,7 @@ def delete_governance_instance(ctx, from_json, wait_for_state, max_wait_seconds,
222221
@cli_util.wrap_exceptions
223222
def get_governance_instance(ctx, from_json, governance_instance_id):
224223

225-
if isinstance(governance_instance_id, six.string_types) and len(governance_instance_id.strip()) == 0:
224+
if isinstance(governance_instance_id, str) and len(governance_instance_id.strip()) == 0:
226225
raise click.UsageError('Parameter --governance-instance-id cannot be whitespace or empty string')
227226

228227
kwargs = {}
@@ -336,7 +335,7 @@ def list_governance_instances(ctx, from_json, all_pages, page_size, compartment_
336335
@cli_util.wrap_exceptions
337336
def update_governance_instance(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, governance_instance_id, display_name, description, license_type, defined_tags, freeform_tags, if_match):
338337

339-
if isinstance(governance_instance_id, six.string_types) and len(governance_instance_id.strip()) == 0:
338+
if isinstance(governance_instance_id, str) and len(governance_instance_id.strip()) == 0:
340339
raise click.UsageError('Parameter --governance-instance-id cannot be whitespace or empty string')
341340
if not force:
342341
if defined_tags or freeform_tags:

services/adm/src/oci_cli_application_dependency_management/generated/applicationdependencymanagement_cli.py

Lines changed: 35 additions & 36 deletions
Large diffs are not rendered by default.

services/ai_document/src/oci_cli_ai_service_document/generated/aiservicedocument_cli.py

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from __future__ import print_function
77
import click
88
import oci # noqa: F401
9-
import six # noqa: F401
109
import sys # noqa: F401
1110
from oci_cli.cli_root import cli
1211
from oci_cli import cli_constants # noqa: F401
@@ -97,7 +96,7 @@ def processor_job_group():
9796
@cli_util.wrap_exceptions
9897
def add_model_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_id, type, related_resource_id, message, if_match, is_lock_override):
9998

100-
if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
99+
if isinstance(model_id, str) and len(model_id.strip()) == 0:
101100
raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
102101

103102
kwargs = {}
@@ -165,7 +164,7 @@ def add_model_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interv
165164
@cli_util.wrap_exceptions
166165
def add_project_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, project_id, type, related_resource_id, message, if_match, is_lock_override):
167166

168-
if isinstance(project_id, six.string_types) and len(project_id.strip()) == 0:
167+
if isinstance(project_id, str) and len(project_id.strip()) == 0:
169168
raise click.UsageError('Parameter --project-id cannot be whitespace or empty string')
170169

171170
kwargs = {}
@@ -388,7 +387,7 @@ def analyze_document_inline_document_details(ctx, from_json, features, document_
388387
@cli_util.wrap_exceptions
389388
def cancel_processor_job(ctx, from_json, processor_job_id, if_match):
390389

391-
if isinstance(processor_job_id, six.string_types) and len(processor_job_id.strip()) == 0:
390+
if isinstance(processor_job_id, str) and len(processor_job_id.strip()) == 0:
392391
raise click.UsageError('Parameter --processor-job-id cannot be whitespace or empty string')
393392

394393
kwargs = {}
@@ -414,7 +413,7 @@ def cancel_processor_job(ctx, from_json, processor_job_id, if_match):
414413
@cli_util.wrap_exceptions
415414
def cancel_work_request(ctx, from_json, work_request_id, if_match):
416415

417-
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
416+
if isinstance(work_request_id, str) and len(work_request_id.strip()) == 0:
418417
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
419418

420419
kwargs = {}
@@ -441,7 +440,7 @@ def cancel_work_request(ctx, from_json, work_request_id, if_match):
441440
@cli_util.wrap_exceptions
442441
def change_model_compartment(ctx, from_json, model_id, compartment_id, if_match, is_lock_override):
443442

444-
if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
443+
if isinstance(model_id, str) and len(model_id.strip()) == 0:
445444
raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
446445

447446
kwargs = {}
@@ -475,7 +474,7 @@ def change_model_compartment(ctx, from_json, model_id, compartment_id, if_match,
475474
@cli_util.wrap_exceptions
476475
def change_project_compartment(ctx, from_json, project_id, compartment_id, if_match, is_lock_override):
477476

478-
if isinstance(project_id, six.string_types) and len(project_id.strip()) == 0:
477+
if isinstance(project_id, str) and len(project_id.strip()) == 0:
479478
raise click.UsageError('Parameter --project-id cannot be whitespace or empty string')
480479

481480
kwargs = {}
@@ -1027,7 +1026,7 @@ def create_project(ctx, from_json, wait_for_state, max_wait_seconds, wait_interv
10271026
@cli_util.wrap_exceptions
10281027
def delete_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_id, if_match, is_lock_override):
10291028

1030-
if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
1029+
if isinstance(model_id, str) and len(model_id.strip()) == 0:
10311030
raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
10321031

10331032
kwargs = {}
@@ -1086,7 +1085,7 @@ def delete_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval
10861085
@cli_util.wrap_exceptions
10871086
def delete_project(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, project_id, if_match, is_lock_override):
10881087

1089-
if isinstance(project_id, six.string_types) and len(project_id.strip()) == 0:
1088+
if isinstance(project_id, str) and len(project_id.strip()) == 0:
10901089
raise click.UsageError('Parameter --project-id cannot be whitespace or empty string')
10911090

10921091
kwargs = {}
@@ -1139,7 +1138,7 @@ def delete_project(ctx, from_json, wait_for_state, max_wait_seconds, wait_interv
11391138
@cli_util.wrap_exceptions
11401139
def get_model(ctx, from_json, model_id):
11411140

1142-
if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
1141+
if isinstance(model_id, str) and len(model_id.strip()) == 0:
11431142
raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
11441143

11451144
kwargs = {}
@@ -1163,7 +1162,7 @@ def get_model(ctx, from_json, model_id):
11631162
@cli_util.wrap_exceptions
11641163
def get_model_type(ctx, from_json, model_type, compartment_id, model_sub_type):
11651164

1166-
if isinstance(model_type, six.string_types) and len(model_type.strip()) == 0:
1165+
if isinstance(model_type, str) and len(model_type.strip()) == 0:
11671166
raise click.UsageError('Parameter --model-type cannot be whitespace or empty string')
11681167

11691168
kwargs = {}
@@ -1189,7 +1188,7 @@ def get_model_type(ctx, from_json, model_type, compartment_id, model_sub_type):
11891188
@cli_util.wrap_exceptions
11901189
def get_processor_job(ctx, from_json, processor_job_id):
11911190

1192-
if isinstance(processor_job_id, six.string_types) and len(processor_job_id.strip()) == 0:
1191+
if isinstance(processor_job_id, str) and len(processor_job_id.strip()) == 0:
11931192
raise click.UsageError('Parameter --processor-job-id cannot be whitespace or empty string')
11941193

11951194
kwargs = {}
@@ -1211,7 +1210,7 @@ def get_processor_job(ctx, from_json, processor_job_id):
12111210
@cli_util.wrap_exceptions
12121211
def get_project(ctx, from_json, project_id):
12131212

1214-
if isinstance(project_id, six.string_types) and len(project_id.strip()) == 0:
1213+
if isinstance(project_id, str) and len(project_id.strip()) == 0:
12151214
raise click.UsageError('Parameter --project-id cannot be whitespace or empty string')
12161215

12171216
kwargs = {}
@@ -1233,7 +1232,7 @@ def get_project(ctx, from_json, project_id):
12331232
@cli_util.wrap_exceptions
12341233
def get_work_request(ctx, from_json, work_request_id):
12351234

1236-
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
1235+
if isinstance(work_request_id, str) and len(work_request_id.strip()) == 0:
12371236
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
12381237

12391238
kwargs = {}
@@ -1391,7 +1390,7 @@ def list_work_request_errors(ctx, from_json, all_pages, page_size, work_request_
13911390
if all_pages and limit:
13921391
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
13931392

1394-
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
1393+
if isinstance(work_request_id, str) and len(work_request_id.strip()) == 0:
13951394
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
13961395

13971396
kwargs = {}
@@ -1448,7 +1447,7 @@ def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id
14481447
if all_pages and limit:
14491448
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
14501449

1451-
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
1450+
if isinstance(work_request_id, str) and len(work_request_id.strip()) == 0:
14521451
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
14531452

14541453
kwargs = {}
@@ -1565,7 +1564,7 @@ def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, wor
15651564
@cli_util.wrap_exceptions
15661565
def patch_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_id, operations, if_match):
15671566

1568-
if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
1567+
if isinstance(model_id, str) and len(model_id.strip()) == 0:
15691568
raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
15701569

15711570
kwargs = {}
@@ -1629,7 +1628,7 @@ def patch_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
16291628
@cli_util.wrap_exceptions
16301629
def remove_model_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, model_id, type, if_match, is_lock_override):
16311630

1632-
if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
1631+
if isinstance(model_id, str) and len(model_id.strip()) == 0:
16331632
raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
16341633

16351634
kwargs = {}
@@ -1689,7 +1688,7 @@ def remove_model_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_int
16891688
@cli_util.wrap_exceptions
16901689
def remove_project_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, project_id, type, if_match, is_lock_override):
16911690

1692-
if isinstance(project_id, six.string_types) and len(project_id.strip()) == 0:
1691+
if isinstance(project_id, str) and len(project_id.strip()) == 0:
16931692
raise click.UsageError('Parameter --project-id cannot be whitespace or empty string')
16941693

16951694
kwargs = {}
@@ -1754,7 +1753,7 @@ def remove_project_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
17541753
@cli_util.wrap_exceptions
17551754
def update_model(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, model_id, display_name, description, inference_units, freeform_tags, defined_tags, if_match, is_lock_override):
17561755

1757-
if isinstance(model_id, six.string_types) and len(model_id.strip()) == 0:
1756+
if isinstance(model_id, str) and len(model_id.strip()) == 0:
17581757
raise click.UsageError('Parameter --model-id cannot be whitespace or empty string')
17591758
if not force:
17601759
if freeform_tags or defined_tags:
@@ -1840,7 +1839,7 @@ def update_model(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_i
18401839
@cli_util.wrap_exceptions
18411840
def update_project(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, project_id, display_name, description, freeform_tags, defined_tags, if_match, is_lock_override):
18421841

1843-
if isinstance(project_id, six.string_types) and len(project_id.strip()) == 0:
1842+
if isinstance(project_id, str) and len(project_id.strip()) == 0:
18441843
raise click.UsageError('Parameter --project-id cannot be whitespace or empty string')
18451844
if not force:
18461845
if freeform_tags or defined_tags:

0 commit comments

Comments
 (0)