Skip to content

Commit 1d6f8f9

Browse files
committed
Drop Python 3.5 support from python-libjuju
1 parent ed62fd5 commit 1d6f8f9

11 files changed

Lines changed: 9 additions & 32 deletions

File tree

.github/workflows/tox.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ jobs:
99
strategy:
1010
matrix:
1111
python:
12-
- "3.5"
1312
- "3.6"
1413
- "3.7"
1514
- "3.8"
@@ -32,7 +31,6 @@ jobs:
3231
strategy:
3332
matrix:
3433
python:
35-
- "3.5"
3634
- "3.6"
3735
- "3.7"
3836
- "3.8"

debian/control

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ Description:
3333
Requirements
3434
------------
3535
.
36-
* Python 3.5+
36+
* Python 3.6+
3737
* Juju 2.0+
3838
.
3939
.
4040
Design Notes
4141
------------
4242
.
43-
* Asynchronous - uses asyncio and async/await features of python 3.5
43+
* Asynchronous - Uses asyncio and async/await features of Python
4444
* Websocket-level bindings are programmatically generated (indirectly) from the
4545
Juju golang code, ensuring full api coverage
4646
* Provides an OO layer which encapsulates much of the websocket api and

docs/readme.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Documentation: https://pythonlibjuju.readthedocs.io/en/latest/
1111
Requirements
1212
------------
1313

14-
* Python 3.5+
14+
* Python 3.6+
1515
* Juju 2.0+
1616

1717

1818
Design Notes
1919
------------
2020

21-
* Asynchronous - uses asyncio and async/await features of python 3.5
21+
* Asynchronous - Uses asyncio and async/await features of Python
2222
* Websocket-level bindings are programmatically generated (indirectly) from the
2323
Juju golang code, ensuring full api coverage
2424
* Provides an OO layer which encapsulates much of the websocket api and

examples/add_machine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3.5
1+
#!/usr/bin/env python3
22

33
"""
44
This example:

examples/machine_hostname.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3.5
1+
#!/usr/bin/env python3
22

33
"""
44
This example:

juju/model.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,10 +2009,7 @@ async def add_local_resources(self, application, entity_url, metadata, resources
20092009

20102010
data = yaml.dump(docker_image_details)
20112011

2012-
if sys.version_info[0:2] == (3, 5):
2013-
hash_alg = hashlib.sha384
2014-
else:
2015-
hash_alg = hashlib.sha3_384
2012+
hash_alg = hashlib.sha3_384
20162013

20172014
charmresource['fingerprint'] = hash_alg(bytes(data, 'utf-8')).digest()
20182015

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"Intended Audience :: Developers",
5858
"Programming Language :: Python",
5959
"Programming Language :: Python :: 3",
60-
"Programming Language :: Python :: 3.5",
6160
"Programming Language :: Python :: 3.6",
6261
"Programming Language :: Python :: 3.7",
6362
"Programming Language :: Python :: 3.8",

tests/integration/test_connection.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,6 @@ def __init__(self, destination):
147147
if hasattr(ssl, 'PROTOCOL_TLS_SERVER'):
148148
# python 3.6+
149149
protocol = ssl.PROTOCOL_TLS_SERVER
150-
elif hasattr(ssl, 'PROTOCOL_TLS'):
151-
# python 3.5.3+
152-
protocol = ssl.PROTOCOL_TLS
153-
else:
154-
# python 3.5.2
155-
protocol = ssl.PROTOCOL_TLSv1_2
156150
self.ssl_context = ssl.SSLContext(protocol)
157151
crt_file = Path(__file__).with_name('cert.pem')
158152
key_file = Path(__file__).with_name('key.pem')

tests/integration/test_unit.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ async def test_block_coroutine(event_loop):
2121
)
2222

2323
async def is_leader_elected():
24-
# TODO: cleanup/refactor the code below when the py3.5
25-
# support is dropped
26-
for u in app.units:
27-
if await u.is_leader_from_status():
28-
return True
29-
return False
24+
return any([await u.is_leader_from_status() for u in app.units])
3025

3126
await utils.block_until_with_coroutine(is_leader_elected,
3227
timeout=480)

tests/unit/test_bundle.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,10 +1122,6 @@ async def __call__(self, *args, **kwargs):
11221122

11231123
bundle = await handler._handle_local_charms(bundle, bundle_dir)
11241124

1125-
# TODO: for some reason 'assert_has_calls' is failing in
1126-
# Python3.5, refactor this with 'assert_has_calls' when
1127-
# Python3.5 support is dropped
1128-
11291125
m1 = mock.call(
11301126
"oci-image-charm",
11311127
"charm_uri",

0 commit comments

Comments
 (0)