openshift-client 2.0.1__tar.gz → 2.0.2__tar.gz

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.
Files changed (28) hide show
  1. {openshift-client-2.0.1 → openshift-client-2.0.2}/PKG-INFO +1 -1
  2. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/__init__.py +1 -1
  3. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/action.py +1 -1
  4. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/context.py +4 -4
  5. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client.egg-info/PKG-INFO +1 -1
  6. {openshift-client-2.0.1 → openshift-client-2.0.2}/LICENSE +0 -0
  7. {openshift-client-2.0.1 → openshift-client-2.0.2}/README.md +0 -0
  8. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/ansible.py +0 -0
  9. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/apiobject.py +0 -0
  10. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/base_verbs.py +0 -0
  11. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/config.py +0 -0
  12. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/decorators.py +0 -0
  13. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/model.py +0 -0
  14. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/naming.py +0 -0
  15. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/result.py +0 -0
  16. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/selector.py +0 -0
  17. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/status.py +0 -0
  18. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/test_apiobject.py +0 -0
  19. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/test_model.py +0 -0
  20. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/test_selector.py +0 -0
  21. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/test_util.py +0 -0
  22. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client/util.py +0 -0
  23. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client.egg-info/SOURCES.txt +0 -0
  24. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client.egg-info/dependency_links.txt +0 -0
  25. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client.egg-info/requires.txt +0 -0
  26. {openshift-client-2.0.1 → openshift-client-2.0.2}/packages/openshift_client.egg-info/top_level.txt +0 -0
  27. {openshift-client-2.0.1 → openshift-client-2.0.2}/pyproject.toml +0 -0
  28. {openshift-client-2.0.1 → openshift-client-2.0.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openshift-client
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: OpenShift python client
5
5
  Author-email: Justin Pierce <jupierce@redhat.com>
6
6
  Maintainer-email: Brad Williams <brawilli@redhat.com>
@@ -12,7 +12,7 @@ from . import config
12
12
  from .ansible import ansible
13
13
 
14
14
  # Single source for module version
15
- __VERSION__ = '2.0.1'
15
+ __VERSION__ = '2.0.2'
16
16
 
17
17
  null = None # Allow scripts to specify null in object definitions
18
18
 
@@ -291,7 +291,7 @@ def oc_action(context, verb, cmd_args=None, all_namespaces=False, no_namespace=F
291
291
  return_code = -1
292
292
 
293
293
  start_time = time.time()
294
- exec_time = int((datetime.datetime.utcnow() - datetime.datetime(1970, 1, 1)).total_seconds() * 1000)
294
+ exec_time = int((datetime.datetime.now(datetime.timezone.utc) - datetime.datetime(1970, 1, 1)).total_seconds() * 1000)
295
295
 
296
296
  if context.get_ssh_client() is not None:
297
297
  references['.client_host'] = '{}@{}'.format(context.get_ssh_username() or '', context.get_ssh_hostname())
@@ -3,7 +3,7 @@ from __future__ import absolute_import
3
3
  import inspect
4
4
  import os
5
5
 
6
- from datetime import datetime
6
+ from datetime import datetime, timezone
7
7
  from datetime import timedelta
8
8
  from threading import local
9
9
 
@@ -248,7 +248,7 @@ class Context(object):
248
248
  # Unlike most context methods, timeout methods use cur_context instead of self.
249
249
  # This allows selectors/apiobjects captured in one timeout block to be used in another.
250
250
  c = cur_context()
251
- now = datetime.utcnow()
251
+ now = datetime.now(timezone.utc)
252
252
  while c is not None:
253
253
  if c.timeout_datetime is not None and now > c.timeout_datetime:
254
254
  return True, c
@@ -267,7 +267,7 @@ class Context(object):
267
267
  # This allows selectors/apiobjects captured in one timeout block to be used in another.
268
268
  c = cur_context()
269
269
  min_secs = None
270
- now = datetime.utcnow()
270
+ now = datetime.now(timezone.utc)
271
271
  limiting_context = None
272
272
  while c is not None:
273
273
  if c.timeout_datetime is not None:
@@ -325,7 +325,7 @@ class Context(object):
325
325
  :return: N/A
326
326
  """
327
327
  if seconds and seconds > 0:
328
- self.timeout_datetime = datetime.utcnow() + timedelta(seconds=seconds)
328
+ self.timeout_datetime = datetime.now(timezone.utc) + timedelta(seconds=seconds)
329
329
  else:
330
330
  self.timeout_datetime = None
331
331
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openshift-client
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: OpenShift python client
5
5
  Author-email: Justin Pierce <jupierce@redhat.com>
6
6
  Maintainer-email: Brad Williams <brawilli@redhat.com>