Skip to content

Commit e75d7f4

Browse files
authored
Merge pull request #474 from Sengolda/patch-4
Add aiohttp speedups to `speed`
2 parents f51a1ae + 861366c commit e75d7f4

File tree

2 files changed

+63
-59
lines changed

2 files changed

+63
-59
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ docs/crowdin.py
1717
.idea/
1818
.vs/slnx.sqlite
1919
env/
20+
build/

setup.py

Lines changed: 62 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
from setuptools import setup
21
import re
2+
from setuptools import setup
33

44
requirements = []
5-
with open('requirements.txt') as f:
6-
requirements = f.read().splitlines()
5+
with open("requirements.txt") as f:
6+
requirements = f.read().splitlines()
77

8-
version = ''
9-
with open('discord/__init__.py') as f:
8+
version = ""
9+
with open("discord/__init__.py") as f:
1010

1111
search = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE)
1212

@@ -23,76 +23,79 @@
2323
# append version identifier based on commit count
2424
try:
2525
import subprocess
26-
p = subprocess.Popen(['git', 'rev-list', '--count', 'HEAD'],
27-
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
26+
27+
p = subprocess.Popen(["git", "rev-list", "--count", "HEAD"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
2828
out, err = p.communicate()
2929
if out:
30-
version += out.decode('utf-8').strip()
31-
p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'],
32-
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
30+
version += out.decode("utf-8").strip()
31+
p = subprocess.Popen(["git", "rev-parse", "--short", "HEAD"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
3332
out, err = p.communicate()
3433
if out:
35-
version += '+g' + out.decode('utf-8').strip()
34+
version += "+g" + out.decode("utf-8").strip()
3635
except Exception:
3736
pass
3837

39-
readme = ''
40-
with open('README.rst') as f:
38+
readme = ""
39+
with open("README.rst") as f:
4140
readme = f.read()
4241

4342
extras_require = {
44-
'voice': ['PyNaCl>=1.3.0,<1.5'],
45-
'docs': [
46-
'sphinx==4.3.0',
47-
'sphinxcontrib_trio==1.1.2',
48-
'sphinxcontrib-websupport',
43+
"voice": ["PyNaCl>=1.3.0,<1.5"],
44+
"docs": [
45+
"sphinx==4.3.0",
46+
"sphinxcontrib_trio==1.1.2",
47+
"sphinxcontrib-websupport",
48+
],
49+
"speed": [
50+
"orjson>=3.5.4",
51+
"aiodns>=1.1",
52+
"Brotlipy",
53+
"cchardet",
4954
],
50-
'speed': [
51-
'orjson>=3.5.4',
52-
]
5355
}
5456

5557
packages = [
56-
'discord',
57-
'discord.types',
58-
'discord.ui',
59-
'discord.webhook',
60-
'discord.commands',
61-
'discord.ext.commands',
62-
'discord.ext.tasks',
58+
"discord",
59+
"discord.types",
60+
"discord.ui",
61+
"discord.webhook",
62+
"discord.commands",
63+
"discord.ext.commands",
64+
"discord.ext.tasks",
6365
]
6466

65-
setup(name='py-cord',
66-
author='Pycord Development',
67-
url='https://github.com/Pycord-Development/pycord',
68-
project_urls={
67+
68+
setup(
69+
name="py-cord",
70+
author="Pycord Development",
71+
url="https://github.com/Pycord-Development/pycord",
72+
project_urls={
6973
"Documentation": "https://pycord.readthedocs.io/en/latest/",
7074
"Issue tracker": "https://github.com/Pycord-Development/pycord/issues",
71-
},
72-
version=version,
73-
packages=packages,
74-
license='MIT',
75-
description='A Python wrapper for the Discord API',
76-
long_description=readme,
77-
long_description_content_type="text/x-rst",
78-
include_package_data=True,
79-
install_requires=requirements,
80-
extras_require=extras_require,
81-
python_requires='>=3.8.0',
82-
classifiers=[
83-
'Development Status :: 3 - Alpha',
84-
'License :: OSI Approved :: MIT License',
85-
'Intended Audience :: Developers',
86-
'Natural Language :: English',
87-
'Operating System :: OS Independent',
88-
'Programming Language :: Python :: 3.8',
89-
'Programming Language :: Python :: 3.9',
90-
'Programming Language :: Python :: 3.10'
91-
'Topic :: Internet',
92-
'Topic :: Software Development :: Libraries',
93-
'Topic :: Software Development :: Libraries :: Python Modules',
94-
'Topic :: Utilities',
95-
'Typing :: Typed',
96-
],
97-
test_suite='tests',
75+
},
76+
version=version,
77+
packages=packages,
78+
license="MIT",
79+
description="A Python wrapper for the Discord API",
80+
long_description=readme,
81+
long_description_content_type="text/x-rst",
82+
include_package_data=True,
83+
install_requires=requirements,
84+
extras_require=extras_require,
85+
python_requires=">=3.8.0",
86+
classifiers=[
87+
"Development Status :: 3 - Alpha",
88+
"License :: OSI Approved :: MIT License",
89+
"Intended Audience :: Developers",
90+
"Natural Language :: English",
91+
"Operating System :: OS Independent",
92+
"Programming Language :: Python :: 3.8",
93+
"Programming Language :: Python :: 3.9",
94+
"Programming Language :: Python :: 3.10" "Topic :: Internet",
95+
"Topic :: Software Development :: Libraries",
96+
"Topic :: Software Development :: Libraries :: Python Modules",
97+
"Topic :: Utilities",
98+
"Typing :: Typed",
99+
],
100+
test_suite="tests",
98101
)

0 commit comments

Comments
 (0)