Skip to content

Commit 8fc8701

Browse files
authored
Remove support for old python (#104)
* Remove tox since it is not really used anymore for development * Move compatibility code for old Python versions * Add missing test dependency * remove compat module from tests folder * Add name for the checkout step * Remove __future__ imports
1 parent 2db9303 commit 8fc8701

29 files changed

+28
-198
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
os: [windows-2019]
1515
runs-on: ${{ matrix.os }}
1616
steps:
17-
- uses: actions/checkout@v2
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
1819
- name: Set up Python ${{ matrix.python-version }}
1920
uses: actions/setup-python@v2
2021
with:

setup.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,8 @@
1919
packages=find_packages(),
2020
license="BSD",
2121
classifiers=[
22-
"Programming Language :: Python :: 2.6",
23-
"Programming Language :: Python :: 2.7",
24-
"Programming Language :: Python :: 3.2",
25-
"Programming Language :: Python :: 3.3",
26-
"Programming Language :: Python :: 3.4",
27-
"Programming Language :: Python :: 3.5",
2822
"Programming Language :: Python :: 3.6",
2923
"Programming Language :: Python :: 3.7",
3024
],
3125
zip_safe=False,
32-
test_suite='win32ctypes.tests',
33-
)
26+
test_suite='win32ctypes.tests')

test-requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ coverage
22
haas
33
--only-binary pywin32
44
--only-binary pypiwin32
5-
pypiwin32 < 220; python_version == '3.3' or python_version == '3.4'
6-
pywin32; python_version == '2.7' or python_version > '3.4'
5+
pywin32

win32ctypes/core/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# This file is open source software distributed according to the terms in
66
# LICENSE.txt
77
#
8-
from __future__ import absolute_import
9-
108
import sys
119
import importlib
1210

win32ctypes/core/cffi/_authentication.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# This file is open source software distributed according to the terms in
66
# LICENSE.txt
77
#
8-
from __future__ import absolute_import
9-
108
from weakref import WeakKeyDictionary
119

1210
from win32ctypes.core.compat import is_text

win32ctypes/core/cffi/_common.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# This file is open source software distributed according to the terms in
66
# LICENSE.txt
77
#
8-
from __future__ import absolute_import
9-
108
from weakref import WeakKeyDictionary
119

1210
from ._util import ffi

win32ctypes/core/cffi/_dll.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
# This file is open source software distributed according to the terms in
66
# LICENSE.txt
77
#
8-
from __future__ import absolute_import
9-
10-
from win32ctypes.core.compat import text_type
118
from ._util import ffi, check_null, check_false, dlls, HMODULE, PVOID
129

1310

@@ -22,7 +19,7 @@
2219
def _LoadLibraryEx(lpFilename, hFile, dwFlags):
2320
result = check_null(
2421
dlls.kernel32.LoadLibraryExW(
25-
text_type(lpFilename), ffi.NULL, dwFlags),
22+
str(lpFilename), ffi.NULL, dwFlags),
2623
function_name='LoadLibraryEx')
2724
return HMODULE(result)
2825

win32ctypes/core/cffi/_nl_support.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# This file is open source software distributed according to the terms in
66
# LICENSE.txt
77
#
8-
from __future__ import absolute_import
9-
108
from ._util import ffi, dlls
119

1210
ffi.cdef("""

win32ctypes/core/cffi/_resource.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
# This file is open source software distributed according to the terms in
66
# LICENSE.txt
77
#
8-
from __future__ import absolute_import
9-
10-
11-
from win32ctypes.core.compat import text_type
128
from ._util import (
139
ffi, check_null, check_zero, check_false, HMODULE,
1410
PVOID, RESOURCE, resource, dlls)
@@ -117,7 +113,7 @@ def _LockResource(hResData):
117113
def _BeginUpdateResource(pFileName, bDeleteExistingResources):
118114
result = check_null(
119115
dlls.kernel32.BeginUpdateResourceW(
120-
text_type(pFileName), bDeleteExistingResources))
116+
str(pFileName), bDeleteExistingResources))
121117
return HMODULE(result)
122118

123119

win32ctypes/core/cffi/_system_information.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# This file is open source software distributed according to the terms in
66
# LICENSE.txt
77
#
8-
from __future__ import absolute_import
9-
108
from ._util import ffi, dlls
119

1210
# TODO: retrieve this value using ffi

0 commit comments

Comments
 (0)