Skip to content

Commit f5fbc7a

Browse files
authored
Merge pull request #119 from maxmind/greg/upgrade-mocket
Upgrade to mocket with urllib3 >=2 fix
2 parents efdd8c1 + d095a22 commit f5fbc7a

3 files changed

Lines changed: 47 additions & 53 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
# We don't test on Windows currently as it appears mocket may not
1515
# work there.
1616
platform: [ubuntu-latest, macos-latest]
17-
python-version: [3.7, 3.8, 3.9, "3.10"]
17+
python-version: [3.7, 3.8, 3.9, "3.10", 3.11]
1818

1919
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }}
2020
runs-on: ${{ matrix.platform }}

setup.cfg

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,55 @@
1+
[metadata]
2+
name = minfraud
3+
author = Gregory Oschwald
4+
author_email = goschwald@maxmind.com
5+
license = Apache License 2.0
6+
description = MaxMind minFraud Score, Insights, Factors and Report Transactions API
7+
url = https://www.maxmind.com/
8+
long_description = file: README.rst
9+
classifiers =
10+
Development Status :: 5 - Production/Stable
11+
Environment :: Web Environment
12+
Intended Audience :: Developers
13+
License :: OSI Approved :: Apache Software License
14+
Programming Language :: Python :: 3
15+
Programming Language :: Python :: 3.7
16+
Programming Language :: Python :: 3.8
17+
Programming Language :: Python :: 3.9
18+
Programming Language :: Python :: 3.10
19+
Programming Language :: Python :: 3.11
20+
Programming Language :: Python
21+
Topic :: Internet :: Proxy Servers
22+
Topic :: Internet :: WWW/HTTP
23+
Topic :: Internet
24+
platforms = any
25+
project_urls =
26+
Documentation = https://minfraud.readthedocs.org/
27+
Source Code = https://github.com/maxmind/minfraud-api-python
28+
Issue Tracker = https://github.com/maxmind/minfraud-api-python/issues
29+
130
[flake8]
231
# black uses 88 : ¯\_(ツ)_/¯
332
max-line-length = 88
433

34+
[options]
35+
packages = minfraud
36+
install_requires =
37+
aiohttp>=3.6.2,<4.0.0
38+
email_validator>=1.1.1,<3.0.0
39+
geoip2>=4.7.0,<5.0.0
40+
requests>=2.24.0,<3.0.0
41+
voluptuous
42+
include_package_data = True
43+
python_requires = >=3.7
44+
test_suite = tests
45+
tests_require = mocket>=3.11.1
46+
547
[wheel]
648
universal = 1
749

50+
[options.package_data]
51+
minfraud = py.typed
52+
853
[tox:tox]
954
envlist = {py37,py38,py39,py310}-test,py310-{black,lint,flake8,mypy}
1055

@@ -23,14 +68,11 @@ deps =
2368
# explicitly require indirect dependency to fix build failure.
2469
# This can be removed when aiohttp 3.9 is released.
2570
charset-normalizer==2.1.1
26-
# This is to work around https://github.com/mindflayer/python-mocket/issues/199
27-
# It can be removed once that is fixed.
28-
urllib3==1.26.15
2971
commands = pytest tests
3072

3173
[testenv:py310-black]
3274
deps = black
33-
commands = black --check --diff .
75+
commands = black --check --diff .
3476

3577
[testenv:py310-lint]
3678
deps = pylint

setup.py

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import ast
44
import io
5-
import os
65
import re
7-
import sys
86

97
from setuptools import setup
108

@@ -13,52 +11,6 @@
1311
with io.open("minfraud/version.py", "r", encoding="utf-8") as f:
1412
_version = str(ast.literal_eval(_version_re.search(f.read()).group(1)))
1513

16-
with io.open("README.rst", "r", encoding="utf-8") as f:
17-
_readme = f.read()
18-
19-
requirements = [
20-
"aiohttp>=3.6.2,<4.0.0",
21-
"email_validator>=1.1.1,<3.0.0",
22-
"geoip2>=4.7.0,<5.0.0",
23-
"requests>=2.24.0,<3.0.0",
24-
"voluptuous",
25-
]
26-
2714
setup(
28-
name="minfraud",
2915
version=_version,
30-
description="MaxMind minFraud Score, Insights, Factors and Report Transactions API",
31-
long_description=_readme,
32-
author="Gregory Oschwald",
33-
author_email="goschwald@maxmind.com",
34-
url="https://www.maxmind.com/",
35-
packages=["minfraud"],
36-
package_data={"minfraud": ["py.typed"]},
37-
include_package_data=True,
38-
platforms="any",
39-
python_requires=">=3.7",
40-
install_requires=requirements,
41-
tests_require=["mocket>=3.8.6"],
42-
test_suite="tests",
43-
license="Apache License 2.0 ",
44-
classifiers=[
45-
"Development Status :: 5 - Production/Stable",
46-
"Environment :: Web Environment",
47-
"Intended Audience :: Developers",
48-
"License :: OSI Approved :: Apache Software License",
49-
"Programming Language :: Python :: 3",
50-
"Programming Language :: Python :: 3.7",
51-
"Programming Language :: Python :: 3.8",
52-
"Programming Language :: Python :: 3.9",
53-
"Programming Language :: Python :: 3.10",
54-
"Programming Language :: Python",
55-
"Topic :: Internet :: Proxy Servers",
56-
"Topic :: Internet :: WWW/HTTP",
57-
"Topic :: Internet",
58-
],
59-
project_urls={
60-
"Documentation": "https://minfraud.readthedocs.org/",
61-
"Source Code": "https://github.com/maxmind/minfraud-api-python",
62-
"Issue Tracker": "https://github.com/maxmind/minfraud-api-python/issues",
63-
},
6416
)

0 commit comments

Comments
 (0)