Skip to content

Commit f8d7d39

Browse files
authored
Merge pull request maxmind#148 from maxmind/greg/upgrade-mocket
Upgrade to mocket with urllib3 >=2 fix
2 parents d0ffc7c + 22ec0c0 commit f8d7d39

File tree

5 files changed

+47
-52
lines changed

5 files changed

+47
-52
lines changed

.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 }}

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
include HISTORY.rst README.rst LICENSE geoip2/py.typed requirements.txt tests/*.py tests/data/test-data/*.mmdb
1+
include HISTORY.rst README.rst LICENSE geoip2/py.typed tests/*.py tests/data/test-data/*.mmdb
22
graft docs/html

requirements.txt

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

setup.cfg

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,51 @@
1+
[metadata]
2+
name = geoip2
3+
author = Gregory Oschwald
4+
author_email = [email protected]
5+
license = Apache License, Version 2.0
6+
description = MaxMind GeoIP2 API
7+
url = http://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+
Intended Audience :: System Administrators
14+
License :: OSI Approved :: Apache Software License
15+
Programming Language :: Python :: 3
16+
Programming Language :: Python :: 3.7
17+
Programming Language :: Python :: 3.8
18+
Programming Language :: Python :: 3.9
19+
Programming Language :: Python :: 3.10
20+
Programming Language :: Python :: 3.11
21+
Programming Language :: Python
22+
Topic :: Internet :: Proxy Servers
23+
Topic :: Internet
24+
project_urls =
25+
Documentation = https://geoip2.readthedocs.org/
26+
Source Code = https://github.com/maxmind/GeoIP2-python
27+
Issue Tracker = https://github.com/maxmind/GeoIP2-python/issues
28+
29+
[options]
30+
package_dir =
31+
geoip2 = geoip2
32+
packages = geoip2
33+
install_requires =
34+
aiohttp>=3.6.2,<4.0.0
35+
maxminddb>=2.3.0,<3.0.0
36+
requests>=2.24.0,<3.0.0
37+
include_package_data = True
38+
python_requires = >=3.7
39+
test_suite = tests
40+
tests_require = mocket>=3.11.1
41+
142
[flake8]
243
# black uses 88 : ¯\_(ツ)_/¯
344
max-line-length = 88
445

46+
[options.package_data]
47+
geoip2 = py.typed
48+
549
[wheel]
650
universal = 1
751

@@ -26,14 +70,11 @@ deps =
2670
# explicitly require indirect dependency to fix build failure.
2771
# This can be removed when aiohttp 3.9 is released.
2872
charset-normalizer==2.1.1
29-
# This is to work around https://github.com/mindflayer/python-mocket/issues/199
30-
# It can be removed once that is fixed.
31-
urllib3==1.26.15
3273
commands = pytest tests
3374

3475
[testenv:py310-black]
3576
deps = black
36-
commands = black --check --diff .
77+
commands = black --check --diff .
3778

3879
[testenv:py310-lint]
3980
deps = pylint

setup.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,9 @@
11
#!/usr/bin/env python
22

3-
import codecs
4-
import os
5-
import sys
6-
73
import geoip2
84

95
from setuptools import setup
106

11-
packages = ["geoip2"]
12-
13-
requirements = [i.strip() for i in open("requirements.txt").readlines()]
14-
157
setup(
16-
name="geoip2",
178
version=geoip2.__version__,
18-
description="MaxMind GeoIP2 API",
19-
long_description=codecs.open("README.rst", "r", "utf-8").read(),
20-
author="Gregory Oschwald",
21-
author_email="[email protected]",
22-
url="http://www.maxmind.com/",
23-
packages=["geoip2"],
24-
package_data={"": ["LICENSE"], "geoip2": ["py.typed"]},
25-
package_dir={"geoip2": "geoip2"},
26-
include_package_data=True,
27-
python_requires=">=3.7",
28-
install_requires=requirements,
29-
tests_require=["mocket>=3.11.0"],
30-
test_suite="tests",
31-
license=geoip2.__license__,
32-
classifiers=[
33-
"Development Status :: 5 - Production/Stable",
34-
"Environment :: Web Environment",
35-
"Intended Audience :: Developers",
36-
"Intended Audience :: System Administrators",
37-
"License :: OSI Approved :: Apache Software License",
38-
"Programming Language :: Python :: 3",
39-
"Programming Language :: Python :: 3.7",
40-
"Programming Language :: Python :: 3.8",
41-
"Programming Language :: Python :: 3.9",
42-
"Programming Language :: Python :: 3.10",
43-
"Programming Language :: Python",
44-
"Topic :: Internet :: Proxy Servers",
45-
"Topic :: Internet",
46-
],
47-
project_urls={
48-
"Documentation": "https://geoip2.readthedocs.org/",
49-
"Source Code": "https://github.com/maxmind/GeoIP2-python",
50-
"Issue Tracker": "https://github.com/maxmind/GeoIP2-python/issues",
51-
},
529
)

0 commit comments

Comments
 (0)