Skip to content

Commit 848ce5a

Browse files
committed
- Updated dependencies for python 3.9
- Removed "future" dependencies from samples
1 parent b64db4a commit 848ce5a

10 files changed

Lines changed: 25 additions & 151 deletions

examples/get_cert.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
18-
from __future__ import print_function
19-
from vcert import (CertificateRequest, Connection, CloudConnection,
20-
FakeConnection, TPPConnection, RevocationRequest, KeyType)
17+
from vcert import (CertificateRequest, Connection, CloudConnection, FakeConnection, TPPConnection, RevocationRequest,
18+
KeyType)
2119
import string
2220
import random
2321
import logging
@@ -48,7 +46,7 @@ def main():
4846
http_request_kwargs={"verify": False})
4947
# If your TPP server certificate signed with your own CA, or available only via proxy, you can specify
5048
# a trust bundle using requests vars:
51-
#conn = Connection(url=url, token=token, user=user, password=password,
49+
# conn = Connection(url=url, token=token, user=user, password=password,
5250
# http_request_kwargs={"verify": "/path-to/bundle.pem"})
5351

5452
request = CertificateRequest(common_name=randomword(10) + ".venafi.example.com")
@@ -62,11 +60,11 @@ def main():
6260
# Specify ordering certificates in chain. Root can be "first" or "last". By default it last. You also can
6361
# specify "ignore" to ignore chain (supported only for Platform).
6462
# To set Custom Fields for the certificate, specify an array of CustomField objects as name-value pairs
65-
#request.custom_fields = [
63+
# request.custom_fields = [
6664
# CustomField(name="Cost Center", value="ABC123"),
6765
# CustomField(name="Environment", value="Production"),
6866
# CustomField(name="Environment", value="Staging")
69-
#]
67+
# ]
7068

7169
# configure key type, RSA example
7270
request.key_type = KeyType(KeyType.RSA, 2048)
@@ -96,7 +94,7 @@ def main():
9694
f.close()
9795

9896
if not isinstance(conn, FakeConnection):
99-
# fake connection doesn`t support certificate renewing
97+
# fake connection doesn't support certificate renewing
10098
print("Trying to renew certificate")
10199
new_request = CertificateRequest(
102100
cert_id=request.id,
@@ -141,6 +139,7 @@ def main():
141139
f.write(cert.full_chain)
142140
f.close()
143141

142+
144143
def randomword(length):
145144
letters = string.ascii_lowercase
146145
return ''.join(random.choice(letters) for i in range(length))

examples/get_cert27.py

Lines changed: 0 additions & 108 deletions
This file was deleted.

examples/tpp/get_cert_tpp_token.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
18-
from __future__ import print_function
1917
from vcert import (CertificateRequest, Connection, FakeConnection, TPPConnection, RevocationRequest, KeyType,
2018
TPPTokenConnection, venafi_connection)
2119
import string

examples/tpp/get_service_gen_cert_tpp.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
18-
from __future__ import print_function
19-
2017
from vcert import (CertificateRequest, venafi_connection, CSR_ORIGIN_SERVICE, CHAIN_OPTION_FIRST)
2118
import string
2219
import random

examples/tpp/set_policy_tpp_token.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
from parser import json_parser, yaml_parser
2020
from parser.utils import parse_policy_spec
21-
from policy.policy_spec import PolicySpecification, Policy, Subject, KeyPair, SubjectAltNames, Defaults, \
22-
DefaultSubject, DefaultKeyPair
21+
from policy.policy_spec import (PolicySpecification, Policy, Subject, KeyPair, SubjectAltNames, Defaults,
22+
DefaultSubject, DefaultKeyPair)
2323
from vcert import venafi_connection
2424
from vcert.common import Authentication, SCOPE_PM
2525
import logging

examples/vaas/get_service_gen_cert_vaas.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
18-
from __future__ import print_function
19-
2017
from vcert import (CertificateRequest, venafi_connection, CSR_ORIGIN_SERVICE, CHAIN_OPTION_FIRST)
2118
import string
2219
import random

examples/vaas/set_policy_vaas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
from parser import json_parser, yaml_parser
2020
from parser.utils import parse_policy_spec
21-
from policy.policy_spec import PolicySpecification, Policy, Subject, KeyPair, SubjectAltNames, Defaults, \
22-
DefaultSubject, DefaultKeyPair
21+
from policy.policy_spec import (PolicySpecification, Policy, Subject, KeyPair, SubjectAltNames, Defaults,
22+
DefaultSubject, DefaultKeyPair)
2323
from vcert import venafi_connection
2424
import logging
2525
from os import environ

requirements-build.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pytest
2-
safety
3-
bandit<=1.6.2
1+
pytest==6.2.5
2+
safety==1.10.3
3+
bandit==1.7.1

requirements.txt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
requests
2-
python-dateutil>=2.6.1
3-
cryptography>=3.0
4-
six
5-
ipaddress;python_version<'3.3'
6-
enum34;python_version<'3.4'
7-
future
8-
ruamel.yaml<0.17
9-
pynacl>=1.4.0
1+
requests==2.27.1
2+
python-dateutil==2.8.2
3+
cryptography==36.0.1
4+
six==1.16.0
5+
ruamel.yaml==0.17.20
6+
pynacl==1.5.0

setup.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,22 @@
99
# The text of the README file
1010
with open(os.path.join(base_dir, "README.md")) as f:
1111
long_description = f.read()
12-
# README = (HERE / "README.md").read_text()
1312

1413
setup(name='vcert',
15-
version='0.13.2',
14+
version='0.14.0',
1615
url="https://github.com/Venafi/vcert-python",
1716
packages=['vcert', 'vcert.parser', 'vcert.policy'],
18-
install_requires=['requests<=2.25.1', 'python-dateutil<=2.8.1', 'certvalidator<=0.11.1', 'six<=1.15.0',
19-
'enum34;python_version<"3.4"', 'ipaddress;python_version<"3.3"',
20-
'cryptography<=3.3.2', 'future;python_version<"3"', 'ruamel.yaml<0.17', 'pynacl>=1.4.0'],
17+
install_requires=['requests==2.27.1', 'python-dateutil==2.8.2', 'certvalidator<=0.11.1', 'six==1.16.0',
18+
'cryptography==36.0.1', 'ruamel.yaml==0.17.20', 'pynacl==1.5.0'],
2119
description='Python client library for Venafi Trust Protection Platform and Venafi Cloud.',
2220
long_description=long_description,
2321
long_description_content_type="text/markdown",
2422
author='Venafi, Inc.',
2523
author_email='opensource@venafi.com',
2624
license='ASL',
2725
classifiers=[
28-
'Programming Language :: Python :: 2',
29-
'Programming Language :: Python :: 2.7',
30-
'Programming Language :: Python :: 3',
31-
'Programming Language :: Python :: 3.4',
32-
'Programming Language :: Python :: 3.5',
33-
'Programming Language :: Python :: 3.6',
26+
'Programming Language :: Python :: 3.9',
27+
'Programming Language :: Python :: 3.10',
3428
'Operating System :: OS Independent',
3529
"License :: OSI Approved :: Apache Software License",
3630
])

0 commit comments

Comments
 (0)