django-esi 8.0.0a3__py3-none-any.whl → 8.0.0a4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of django-esi might be problematic. Click here for more details.

Files changed (40) hide show
  1. {django_esi-8.0.0a3.dist-info → django_esi-8.0.0a4.dist-info}/METADATA +1 -1
  2. {django_esi-8.0.0a3.dist-info → django_esi-8.0.0a4.dist-info}/RECORD +40 -29
  3. esi/__init__.py +2 -2
  4. esi/aiopenapi3/plugins.py +13 -2
  5. esi/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
  6. esi/locale/cs_CZ/LC_MESSAGES/django.po +53 -0
  7. esi/locale/de/LC_MESSAGES/django.mo +0 -0
  8. esi/locale/de/LC_MESSAGES/django.po +10 -9
  9. esi/locale/en/LC_MESSAGES/django.mo +0 -0
  10. esi/locale/en/LC_MESSAGES/django.po +3 -3
  11. esi/locale/es/LC_MESSAGES/django.mo +0 -0
  12. esi/locale/es/LC_MESSAGES/django.po +12 -10
  13. esi/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
  14. esi/locale/fr_FR/LC_MESSAGES/django.po +18 -10
  15. esi/locale/it_IT/LC_MESSAGES/django.mo +0 -0
  16. esi/locale/it_IT/LC_MESSAGES/django.po +12 -10
  17. esi/locale/ja/LC_MESSAGES/django.mo +0 -0
  18. esi/locale/ja/LC_MESSAGES/django.po +10 -9
  19. esi/locale/ko_KR/LC_MESSAGES/django.mo +0 -0
  20. esi/locale/ko_KR/LC_MESSAGES/django.po +10 -9
  21. esi/locale/nl_NL/LC_MESSAGES/django.mo +0 -0
  22. esi/locale/nl_NL/LC_MESSAGES/django.po +53 -0
  23. esi/locale/pl_PL/LC_MESSAGES/django.mo +0 -0
  24. esi/locale/pl_PL/LC_MESSAGES/django.po +53 -0
  25. esi/locale/ru/LC_MESSAGES/django.mo +0 -0
  26. esi/locale/ru/LC_MESSAGES/django.po +13 -10
  27. esi/locale/sk/LC_MESSAGES/django.mo +0 -0
  28. esi/locale/sk/LC_MESSAGES/django.po +55 -0
  29. esi/locale/uk/LC_MESSAGES/django.mo +0 -0
  30. esi/locale/uk/LC_MESSAGES/django.po +57 -0
  31. esi/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  32. esi/locale/zh_Hans/LC_MESSAGES/django.po +10 -9
  33. esi/management/commands/generate_esi_stubs.py +11 -31
  34. esi/models.py +1 -1
  35. esi/openapi_clients.py +161 -44
  36. esi/stubs.pyi +388 -388
  37. esi/tests/test_openapi.json +264 -0
  38. esi/tests/test_openapi.py +248 -1
  39. {django_esi-8.0.0a3.dist-info → django_esi-8.0.0a4.dist-info}/WHEEL +0 -0
  40. {django_esi-8.0.0a3.dist-info → django_esi-8.0.0a4.dist-info}/licenses/LICENSE +0 -0
@@ -2,31 +2,34 @@
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
5
+ #
6
6
  # Translators:
7
7
  # Filipp Chertiev <f@fzfx.ru>, 2023
8
8
  # Gnevich <and.vareba81@gmail.com>, 2025
9
- #
9
+ #
10
10
  #, fuzzy
11
11
  msgid ""
12
12
  msgstr ""
13
- "Project-Id-Version: PACKAGE VERSION\n"
14
- "Report-Msgid-Bugs-To: \n"
15
- "POT-Creation-Date: 2025-06-30 10:57+1000\n"
13
+ "Project-Id-Version: Django ESI 8.0.0-alpha.4\n"
14
+ "Report-Msgid-Bugs-To: https://gitlab.com/allianceauth/django-esi/-/issues\n"
15
+ "POT-Creation-Date: 2025-09-21 13:23+1000\n"
16
16
  "PO-Revision-Date: 2023-10-25 11:04+0000\n"
17
17
  "Last-Translator: Gnevich <and.vareba81@gmail.com>, 2025\n"
18
- "Language-Team: Russian (https://app.transifex.com/alliance-auth/teams/107430/ru/)\n"
18
+ "Language-Team: Russian (https://app.transifex.com/alliance-auth/teams/107430/"
19
+ "ru/)\n"
20
+ "Language: ru\n"
19
21
  "MIME-Version: 1.0\n"
20
22
  "Content-Type: text/plain; charset=UTF-8\n"
21
23
  "Content-Transfer-Encoding: 8bit\n"
22
- "Language: ru\n"
23
- "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
24
+ "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
25
+ "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
26
+ "(n%100>=11 && n%100<=14)? 2 : 3);\n"
24
27
 
25
- #: esi/models.py:73
28
+ #: esi/models.py:66
26
29
  msgid "Character"
27
30
  msgstr "Персонаж"
28
31
 
29
- #: esi/models.py:74
32
+ #: esi/models.py:67
30
33
  msgid "Corporation"
31
34
  msgstr "Корпорация"
32
35
 
Binary file
@@ -0,0 +1,55 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: Django ESI 8.0.0-alpha.4\n"
10
+ "Report-Msgid-Bugs-To: https://gitlab.com/allianceauth/django-esi/-/issues\n"
11
+ "POT-Creation-Date: 2025-09-21 13:23+1000\n"
12
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n "
20
+ ">= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);\n"
21
+
22
+ #: esi/models.py:66
23
+ msgid "Character"
24
+ msgstr ""
25
+
26
+ #: esi/models.py:67
27
+ msgid "Corporation"
28
+ msgstr ""
29
+
30
+ #: esi/templates/esi/select_token.html:13
31
+ msgid "ESI Token Selection"
32
+ msgstr ""
33
+
34
+ #: esi/templates/esi/select_token.html:44
35
+ msgid "Select Character"
36
+ msgstr ""
37
+
38
+ #: esi/templates/esi/select_token.html:48
39
+ msgid "Scopes Requested"
40
+ msgstr ""
41
+
42
+ #: esi/templates/esi/select_token.html:61
43
+ #: esi/templates/esi/select_token.html:98
44
+ msgid "New Character"
45
+ msgstr ""
46
+
47
+ #: esi/templates/esi/select_token.html:71
48
+ #: esi/templates/esi/select_token.html:107
49
+ msgid "Add Token"
50
+ msgstr ""
51
+
52
+ #: esi/templates/esi/select_token.html:88
53
+ #: esi/templates/esi/select_token.html:89
54
+ msgid "Select"
55
+ msgstr ""
Binary file
@@ -0,0 +1,57 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: Django ESI 8.0.0-alpha.4\n"
10
+ "Report-Msgid-Bugs-To: https://gitlab.com/allianceauth/django-esi/-/issues\n"
11
+ "POT-Creation-Date: 2025-09-21 13:23+1000\n"
12
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != "
20
+ "11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % "
21
+ "100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || "
22
+ "(n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n"
23
+
24
+ #: esi/models.py:66
25
+ msgid "Character"
26
+ msgstr ""
27
+
28
+ #: esi/models.py:67
29
+ msgid "Corporation"
30
+ msgstr ""
31
+
32
+ #: esi/templates/esi/select_token.html:13
33
+ msgid "ESI Token Selection"
34
+ msgstr ""
35
+
36
+ #: esi/templates/esi/select_token.html:44
37
+ msgid "Select Character"
38
+ msgstr ""
39
+
40
+ #: esi/templates/esi/select_token.html:48
41
+ msgid "Scopes Requested"
42
+ msgstr ""
43
+
44
+ #: esi/templates/esi/select_token.html:61
45
+ #: esi/templates/esi/select_token.html:98
46
+ msgid "New Character"
47
+ msgstr ""
48
+
49
+ #: esi/templates/esi/select_token.html:71
50
+ #: esi/templates/esi/select_token.html:107
51
+ msgid "Add Token"
52
+ msgstr ""
53
+
54
+ #: esi/templates/esi/select_token.html:88
55
+ #: esi/templates/esi/select_token.html:89
56
+ msgid "Select"
57
+ msgstr ""
Binary file
@@ -2,30 +2,31 @@
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
4
  # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
5
+ #
6
6
  # Translators:
7
7
  # heguyChen, 2023
8
- #
8
+ #
9
9
  #, fuzzy
10
10
  msgid ""
11
11
  msgstr ""
12
- "Project-Id-Version: PACKAGE VERSION\n"
13
- "Report-Msgid-Bugs-To: \n"
14
- "POT-Creation-Date: 2023-10-08 23:42+1000\n"
12
+ "Project-Id-Version: Django ESI 8.0.0-alpha.4\n"
13
+ "Report-Msgid-Bugs-To: https://gitlab.com/allianceauth/django-esi/-/issues\n"
14
+ "POT-Creation-Date: 2025-09-21 13:23+1000\n"
15
15
  "PO-Revision-Date: 2023-10-25 11:04+0000\n"
16
16
  "Last-Translator: heguyChen, 2023\n"
17
- "Language-Team: Chinese Simplified (https://app.transifex.com/alliance-auth/teams/107430/zh-Hans/)\n"
17
+ "Language-Team: Chinese Simplified (https://app.transifex.com/alliance-auth/"
18
+ "teams/107430/zh-Hans/)\n"
19
+ "Language: zh-Hans\n"
18
20
  "MIME-Version: 1.0\n"
19
21
  "Content-Type: text/plain; charset=UTF-8\n"
20
22
  "Content-Transfer-Encoding: 8bit\n"
21
- "Language: zh-Hans\n"
22
23
  "Plural-Forms: nplurals=1; plural=0;\n"
23
24
 
24
- #: esi/models.py:72
25
+ #: esi/models.py:66
25
26
  msgid "Character"
26
27
  msgstr ""
27
28
 
28
- #: esi/models.py:73
29
+ #: esi/models.py:67
29
30
  msgid "Corporation"
30
31
  msgstr ""
31
32
 
@@ -1,13 +1,11 @@
1
1
  import os
2
2
  import re
3
3
 
4
- from aiopenapi3 import OpenAPI
5
- from httpx import Client, Timeout
4
+ from esi.openapi_clients import ESIClientProvider
6
5
 
7
6
  from django.core.management.base import BaseCommand
8
7
 
9
- from esi import __title__, __url__, __version__, app_settings, stubs, __build_date__
10
- from esi.aiopenapi3.plugins import PatchCompatibilityDatePlugin
8
+ from esi import __title__, __url__, __version__, stubs, __build_date__
11
9
 
12
10
  # OpenAPI Types to Python
13
11
  TYPE_MAP = {
@@ -64,33 +62,15 @@ class Command(BaseCommand):
64
62
  def handle(self, *args, **options):
65
63
  self.stdout.write("Starting ESI stub generation...")
66
64
 
67
- headers = {
68
- "User-Agent": f"{__title__}/{__version__} (+{__url__})",
69
- "X-Tenant": "tranquility",
70
- "X-Compatibility-Date": options["compatibility_date"]
71
- }
72
-
73
- def session_factory(**kwargs) -> Client:
74
- kwargs.pop("headers", None)
75
- return Client(
76
- headers=headers,
77
- timeout=Timeout(
78
- connect=app_settings.ESI_REQUESTS_CONNECT_TIMEOUT,
79
- read=app_settings.ESI_REQUESTS_READ_TIMEOUT,
80
- write=app_settings.ESI_REQUESTS_WRITE_TIMEOUT,
81
- pool=app_settings.ESI_REQUESTS_POOL_TIMEOUT
82
- ),
83
- **kwargs
84
- )
85
-
86
- spec_url = f"{app_settings.ESI_API_URL}meta/openapi.json"
87
- stub_api = OpenAPI.load_sync(
88
- url=spec_url,
89
- session_factory=session_factory,
90
- use_operation_tags=True,
91
- plugins=[PatchCompatibilityDatePlugin()],
65
+ stub_api = ESIClientProvider(
66
+ ua_appname=__title__,
67
+ ua_url=__url__,
68
+ ua_version=__version__,
69
+ compatibility_date=options["compatibility_date"]
92
70
  )
93
71
 
72
+ stub_api = stub_api.client.api
73
+
94
74
  base_path = os.path.dirname(stubs.__file__)
95
75
  output_path = options["output"] or os.path.join(base_path, "stubs.pyi")
96
76
 
@@ -146,13 +126,13 @@ class Command(BaseCommand):
146
126
  f.write(" \"\"\"EsiOperation, use result()\"\"\"\n")
147
127
 
148
128
  # result()
149
- f.write(f" def result(self, etag: str | None = None, return_response: bool = False, use_cache: bool = True, **extra) -> {response_type}:\n") # noqa: E501
129
+ f.write(f" def result(self, use_etag: bool = True, return_response: bool = False, force_refresh: bool = False, use_cache: bool = True, **extra) -> {response_type}:\n") # noqa: E501
150
130
  f.write(f" \"\"\"{docstring}\"\"\"\n") if docstring else None
151
131
  f.write(" ...\n\n")
152
132
  if response_type != "None":
153
133
  # We only need the extra utility functions if its actually an endpoint that returns data
154
134
  # results()
155
- f.write(f" def results(self, etag: str | None = None, return_response: bool = False, use_cache: bool = True, **extra) -> {results_type}:\n") # noqa: E501
135
+ f.write(f" def results(self, use_etag: bool = True, return_response: bool = False, force_refresh: bool = False, use_cache: bool = True, **extra) -> {results_type}:\n") # noqa: E501
156
136
  f.write(f" \"\"\"{docstring}\"\"\"\n") if docstring else None
157
137
  f.write(" ...\n\n")
158
138
 
esi/models.py CHANGED
@@ -169,7 +169,7 @@ class Token(models.Model):
169
169
  ).results()
170
170
 
171
171
  Returns:
172
- Valid access token
172
+ Valid access token
173
173
 
174
174
  Raises:
175
175
  TokenExpiredError: When token can not be refreshed