Skip to content

Commit 04b7480

Browse files
hugovkNirzak
andauthored
Add support for Python 3.10 and drop EOL 3.5 (#167)
* Add support for Python 3.10 * Remove Trove classifiers for dropped versions * Remove redundant setup.cfg: no need for universal wheels for Python 3-only, setuptools and wheel auto-find LICENSE files * Added Required Python Version Added python_requires to specify the required python version for the library. * Updated required python version * Drop support for EOL Python 3.5 * Upgrade Python syntax with pyupgrade --py36-plus Co-authored-by: Nirjas Jakilim <[email protected]>
1 parent e713282 commit 04b7480

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
25+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
2626

2727
steps:
2828
- uses: actions/checkout@v2
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install test dependencies
3434
run: |
3535
python -m pip install --upgrade pip
36-
pip install pytest
36+
python -m pip install pytest
3737
- name: Test with pytest
3838
run: |
3939
pytest

certifi/core.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
"""
42
certifi.py
53
~~~~~~~~~~
@@ -55,7 +53,7 @@ def read_text(
5553
encoding: str = 'utf-8',
5654
errors: str = 'strict'
5755
) -> str:
58-
with open(where(), "r", encoding=encoding) as data:
56+
with open(where(), encoding=encoding) as data:
5957
return data.read()
6058

6159
# If we don't have importlib.resources, then we will just do the old logic

certifi/tests/test_certify.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import os
42
import unittest
53

setup.cfg

-2
This file was deleted.

setup.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
3-
from __future__ import with_statement
42
import re
53
import os
64
import sys
@@ -18,7 +16,7 @@
1816

1917

2018
version_regex = r'__version__ = ["\']([^"\']*)["\']'
21-
with open('certifi/__init__.py', 'r') as f:
19+
with open('certifi/__init__.py') as f:
2220
text = f.read()
2321
match = re.search(version_regex, text)
2422

@@ -48,19 +46,19 @@
4846
include_package_data=True,
4947
zip_safe=False,
5048
license='MPL-2.0',
51-
python_requires=">=3.5",
49+
python_requires=">=3.6",
5250
classifiers=[
5351
'Development Status :: 5 - Production/Stable',
5452
'Intended Audience :: Developers',
5553
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
5654
'Natural Language :: English',
5755
'Programming Language :: Python',
5856
'Programming Language :: Python :: 3',
59-
'Programming Language :: Python :: 3.5',
6057
'Programming Language :: Python :: 3.6',
6158
'Programming Language :: Python :: 3.7',
6259
'Programming Language :: Python :: 3.8',
6360
'Programming Language :: Python :: 3.9',
61+
'Programming Language :: Python :: 3.10',
6462
],
6563
project_urls={
6664
'Source': 'https://github.com/certifi/python-certifi',

0 commit comments

Comments
 (0)