django-esi 5.1.0__tar.gz → 5.3.0b1__tar.gz

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 (76) hide show
  1. {django_esi-5.1.0 → django_esi-5.3.0b1}/PKG-INFO +9 -2
  2. {django_esi-5.1.0 → django_esi-5.3.0b1}/README.md +5 -0
  3. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/__init__.py +1 -1
  4. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/app_settings.py +2 -0
  5. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/clients.py +2 -1
  6. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/de/LC_MESSAGES/django.mo +0 -0
  7. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/de/LC_MESSAGES/django.po +1 -1
  8. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/es/LC_MESSAGES/django.mo +0 -0
  9. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/es/LC_MESSAGES/django.po +1 -1
  10. django_esi-5.3.0b1/esi/locale/it_IT/LC_MESSAGES/django.mo +0 -0
  11. django_esi-5.3.0b1/esi/locale/it_IT/LC_MESSAGES/django.po +57 -0
  12. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/ja/LC_MESSAGES/django.mo +0 -0
  13. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/ja/LC_MESSAGES/django.po +1 -1
  14. django_esi-5.3.0b1/esi/locale/ko_KR/LC_MESSAGES/django.mo +0 -0
  15. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/ko_KR/LC_MESSAGES/django.po +1 -1
  16. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/ru/LC_MESSAGES/django.mo +0 -0
  17. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/ru/LC_MESSAGES/django.po +1 -1
  18. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  19. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  20. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/managers.py +19 -3
  21. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_clients.py +1 -2
  22. {django_esi-5.1.0 → django_esi-5.3.0b1}/pyproject.toml +3 -1
  23. django_esi-5.1.0/esi/locale/ko_KR/LC_MESSAGES/django.mo +0 -0
  24. {django_esi-5.1.0 → django_esi-5.3.0b1}/LICENSE +0 -0
  25. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/admin.py +0 -0
  26. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/apps.py +0 -0
  27. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/checks.py +0 -0
  28. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/decorators.py +0 -0
  29. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/errors.py +0 -0
  30. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/en/LC_MESSAGES/django.mo +0 -0
  31. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/en/LC_MESSAGES/django.po +0 -0
  32. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
  33. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/locale/fr_FR/LC_MESSAGES/django.po +0 -0
  34. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/management/commands/__init__.py +0 -0
  35. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/management/commands/migrate_to_ssov2.py +0 -0
  36. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0001_initial.py +0 -0
  37. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0002_scopes_20161208.py +0 -0
  38. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0003_hide_tokens_from_admin_site.py +0 -0
  39. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0004_remove_unique_access_token.py +0 -0
  40. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0005_remove_token_length_limit.py +0 -0
  41. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0006_remove_url_length_limit.py +0 -0
  42. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0007_fix_mysql_8_migration.py +0 -0
  43. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0008_nullable_refresh_token.py +0 -0
  44. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0009_set_old_tokens_to_sso_v1.py +0 -0
  45. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0010_set_new_tokens_to_sso_v2.py +0 -0
  46. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0011_add_token_indices.py +0 -0
  47. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/0012_fix_token_type_choices.py +0 -0
  48. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/migrations/__init__.py +0 -0
  49. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/models.py +0 -0
  50. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/static/esi/img/EVE_SSO_Login_Buttons_Large_Black.png +0 -0
  51. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/static/esi/img/EVE_SSO_Login_Buttons_Large_White.png +0 -0
  52. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/static/esi/img/EVE_SSO_Login_Buttons_Small_Black.png +0 -0
  53. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/static/esi/img/EVE_SSO_Login_Buttons_Small_White.png +0 -0
  54. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tasks.py +0 -0
  55. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/templates/esi/select_token.html +0 -0
  56. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/templatetags/__init__.py +0 -0
  57. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/templatetags/scope_tags.py +0 -0
  58. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/__init__.py +0 -0
  59. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/client_authed_pilot.py +0 -0
  60. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/client_public_pilot.py +0 -0
  61. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/factories.py +0 -0
  62. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/factories_2.py +0 -0
  63. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/jwt_factory.py +0 -0
  64. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_checks.py +0 -0
  65. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_decorators.py +0 -0
  66. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_management_command.py +0 -0
  67. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_managers.py +0 -0
  68. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_models.py +0 -0
  69. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_swagger.json +0 -0
  70. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_swagger_full.json +0 -0
  71. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_tasks.py +0 -0
  72. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_templatetags.py +0 -0
  73. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/test_views.py +0 -0
  74. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/tests/threading_pilot.py +0 -0
  75. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/urls.py +0 -0
  76. {django_esi-5.1.0 → django_esi-5.3.0b1}/esi/views.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-esi
3
- Version: 5.1.0
3
+ Version: 5.3.0b1
4
4
  Summary: Django app for accessing the EVE Swagger Interface (ESI).
5
5
  Author-email: Alliance Auth <adarnof@gmail.com>
6
6
  Requires-Python: >=3.8
@@ -11,6 +11,7 @@ Classifier: Framework :: Django :: 3.2
11
11
  Classifier: Framework :: Django :: 4.0
12
12
  Classifier: Framework :: Django :: 4.1
13
13
  Classifier: Framework :: Django :: 4.2
14
+ Classifier: Framework :: Django :: 5.0
14
15
  Classifier: Intended Audience :: Developers
15
16
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
16
17
  Classifier: Operating System :: OS Independent
@@ -20,11 +21,12 @@ Classifier: Programming Language :: Python :: 3.8
20
21
  Classifier: Programming Language :: Python :: 3.9
21
22
  Classifier: Programming Language :: Python :: 3.10
22
23
  Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
23
25
  Classifier: Topic :: Internet :: WWW/HTTP
24
26
  Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
25
27
  Requires-Dist: bravado>=10.6.0,<11.0
26
28
  Requires-Dist: celery>=4.0.2
27
- Requires-Dist: django>=2.2,<5
29
+ Requires-Dist: django>=2.2,<5.1
28
30
  Requires-Dist: jsonschema<4.0.0
29
31
  Requires-Dist: python-jose>=3.3.0
30
32
  Requires-Dist: requests>=2.26.0
@@ -64,6 +66,11 @@ Django-esi adds the following main functionalities to a Django site:
64
66
  - Support for adding EVE SSO to authenticate characters and retrieve tokens
65
67
  - Control over which ESI endpoint versions are used
66
68
 
69
+ ## Python Support
70
+
71
+ Django-esi follows the Django Python support schedule, The supported version of Python will differ based on the version of Django used.
72
+ <https://docs.djangoproject.com/en/5.0/faq/install/#what-python-version-can-i-use-with-django>
73
+
67
74
  ## History of this app
68
75
 
69
76
  This app is a fork from [adarnauth-esi](https://gitlab.com/Adarnof/adarnauth-esi). Since this app is an important component of the [Alliance Auth](https://gitlab.com/allianceauth/allianceauth) system and Adarnof - the original author - was no longer able to maintain it the AA dev team has decided in December 2019 to take over maintenance and further developing for this app within the Alliance Auth project.
@@ -24,6 +24,11 @@ Django-esi adds the following main functionalities to a Django site:
24
24
  - Support for adding EVE SSO to authenticate characters and retrieve tokens
25
25
  - Control over which ESI endpoint versions are used
26
26
 
27
+ ## Python Support
28
+
29
+ Django-esi follows the Django Python support schedule, The supported version of Python will differ based on the version of Django used.
30
+ <https://docs.djangoproject.com/en/5.0/faq/install/#what-python-version-can-i-use-with-django>
31
+
27
32
  ## History of this app
28
33
 
29
34
  This app is a fork from [adarnauth-esi](https://gitlab.com/Adarnof/adarnauth-esi). Since this app is an important component of the [Alliance Auth](https://gitlab.com/allianceauth/allianceauth) system and Adarnof - the original author - was no longer able to maintain it the AA dev team has decided in December 2019 to take over maintenance and further developing for this app within the Alliance Auth project.
@@ -2,5 +2,5 @@
2
2
 
3
3
  default_app_config = 'esi.apps.EsiConfig'
4
4
 
5
- __version__ = '5.1.0'
5
+ __version__ = '5.3.0b1'
6
6
  __title__ = 'django-esi'
@@ -31,6 +31,8 @@ ESI_INFO_LOGGING_ENABLED = getattr(settings, 'ESI_INFO_LOGGING_ENABLED', False)
31
31
  ESI_LOG_LEVEL_LIBRARIES = str(getattr(settings, 'ESI_LOG_LEVEL_LIBRARIES', 'INFO'))
32
32
  """Set log level for libraries like bravado and urlib3."""
33
33
 
34
+ ESI_DEBUG_RESPONSE_CONTENT_LOGGING = getattr(settings, 'ESI_DEBUG_RESPONSE_CONTENT_LOGGING', True)
35
+ """Enable/Disable logging of ESI response contents."""
34
36
 
35
37
  ESI_USER_CONTACT_EMAIL = getattr(settings, 'ESI_USER_CONTACT_EMAIL', None)
36
38
  """Contact email address of server owner.
@@ -263,7 +263,8 @@ class CachingHttpFuture(HttpFuture):
263
263
  result, response = super().result(**kwargs)
264
264
  logger.debug('ESI response status code: %s', response.status_code)
265
265
  logger.debug('ESI response headers: %s', response.headers)
266
- logger.debug('ESI response content: %s', response.text)
266
+ if app_settings.ESI_DEBUG_RESPONSE_CONTENT_LOGGING:
267
+ logger.debug('ESI response content: %s', response.text)
267
268
  break
268
269
  except (HTTPBadGateway, HTTPGatewayTimeout, HTTPServiceUnavailable) as ex:
269
270
  if retries < max_retries:
@@ -12,7 +12,7 @@ msgstr ""
12
12
  "Project-Id-Version: PACKAGE VERSION\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
14
  "POT-Creation-Date: 2023-10-08 23:42+1000\n"
15
- "PO-Revision-Date: 2023-10-08 09:37+0000\n"
15
+ "PO-Revision-Date: 2023-10-25 11:04+0000\n"
16
16
  "Last-Translator: Peter Pfeufer, 2023\n"
17
17
  "Language-Team: German (https://app.transifex.com/alliance-auth/teams/107430/de/)\n"
18
18
  "MIME-Version: 1.0\n"
@@ -12,7 +12,7 @@ msgstr ""
12
12
  "Project-Id-Version: PACKAGE VERSION\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
14
  "POT-Creation-Date: 2023-10-08 23:42+1000\n"
15
- "PO-Revision-Date: 2023-10-08 09:37+0000\n"
15
+ "PO-Revision-Date: 2023-10-25 11:04+0000\n"
16
16
  "Last-Translator: trenus, 2023\n"
17
17
  "Language-Team: Spanish (https://app.transifex.com/alliance-auth/teams/107430/es/)\n"
18
18
  "MIME-Version: 1.0\n"
@@ -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
+ # Translators:
7
+ # Thomas Turini, 2024
8
+ #
9
+ #, fuzzy
10
+ msgid ""
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"
15
+ "PO-Revision-Date: 2023-10-25 11:04+0000\n"
16
+ "Last-Translator: Thomas Turini, 2024\n"
17
+ "Language-Team: Italian (Italy) (https://app.transifex.com/alliance-auth/teams/107430/it_IT/)\n"
18
+ "MIME-Version: 1.0\n"
19
+ "Content-Type: text/plain; charset=UTF-8\n"
20
+ "Content-Transfer-Encoding: 8bit\n"
21
+ "Language: it_IT\n"
22
+ "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
23
+
24
+ #: esi/models.py:72
25
+ msgid "Character"
26
+ msgstr "Personaggio"
27
+
28
+ #: esi/models.py:73
29
+ msgid "Corporation"
30
+ msgstr "Corporazione"
31
+
32
+ #: esi/templates/esi/select_token.html:13
33
+ msgid "ESI Token Selection"
34
+ msgstr "Selezione dei Token ESI"
35
+
36
+ #: esi/templates/esi/select_token.html:44
37
+ msgid "Select Character"
38
+ msgstr "Selezione Personaggio"
39
+
40
+ #: esi/templates/esi/select_token.html:48
41
+ msgid "Scopes Requested"
42
+ msgstr "Ambito Richiesto"
43
+
44
+ #: esi/templates/esi/select_token.html:61
45
+ #: esi/templates/esi/select_token.html:98
46
+ msgid "New Character"
47
+ msgstr "Nuovo Personaggio"
48
+
49
+ #: esi/templates/esi/select_token.html:71
50
+ #: esi/templates/esi/select_token.html:107
51
+ msgid "Add Token"
52
+ msgstr "Agg. Token"
53
+
54
+ #: esi/templates/esi/select_token.html:88
55
+ #: esi/templates/esi/select_token.html:89
56
+ msgid "Select"
57
+ msgstr "Seleziona"
@@ -12,7 +12,7 @@ msgstr ""
12
12
  "Project-Id-Version: PACKAGE VERSION\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
14
  "POT-Creation-Date: 2023-10-08 23:42+1000\n"
15
- "PO-Revision-Date: 2023-10-08 09:37+0000\n"
15
+ "PO-Revision-Date: 2023-10-25 11:04+0000\n"
16
16
  "Last-Translator: kotaneko, 2023\n"
17
17
  "Language-Team: Japanese (https://app.transifex.com/alliance-auth/teams/107430/ja/)\n"
18
18
  "MIME-Version: 1.0\n"
@@ -12,7 +12,7 @@ msgstr ""
12
12
  "Project-Id-Version: PACKAGE VERSION\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
14
  "POT-Creation-Date: 2023-10-08 23:42+1000\n"
15
- "PO-Revision-Date: 2023-10-08 09:37+0000\n"
15
+ "PO-Revision-Date: 2023-10-25 11:04+0000\n"
16
16
  "Last-Translator: Seowon Jung <seowon@hawaii.edu>, 2023\n"
17
17
  "Language-Team: Korean (Korea) (https://app.transifex.com/alliance-auth/teams/107430/ko_KR/)\n"
18
18
  "MIME-Version: 1.0\n"
@@ -12,7 +12,7 @@ msgstr ""
12
12
  "Project-Id-Version: PACKAGE VERSION\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
14
  "POT-Creation-Date: 2023-10-08 23:42+1000\n"
15
- "PO-Revision-Date: 2023-10-08 09:37+0000\n"
15
+ "PO-Revision-Date: 2023-10-25 11:04+0000\n"
16
16
  "Last-Translator: Filipp Chertiev <f@fzfx.ru>, 2023\n"
17
17
  "Language-Team: Russian (https://app.transifex.com/alliance-auth/teams/107430/ru/)\n"
18
18
  "MIME-Version: 1.0\n"
@@ -12,7 +12,7 @@ msgstr ""
12
12
  "Project-Id-Version: PACKAGE VERSION\n"
13
13
  "Report-Msgid-Bugs-To: \n"
14
14
  "POT-Creation-Date: 2023-10-08 23:42+1000\n"
15
- "PO-Revision-Date: 2023-10-08 09:37+0000\n"
15
+ "PO-Revision-Date: 2023-10-25 11:04+0000\n"
16
16
  "Last-Translator: heguyChen, 2023\n"
17
17
  "Language-Team: Chinese Simplified (https://app.transifex.com/alliance-auth/teams/107430/zh-Hans/)\n"
18
18
  "MIME-Version: 1.0\n"
@@ -76,9 +76,25 @@ class TokenQueryset(models.QuerySet):
76
76
  All tokens which are still valid.
77
77
  """
78
78
  expired = self.get_expired()
79
- valid = self.exclude(pk__in=expired)
80
- valid_expired = expired.bulk_refresh()
81
- return valid_expired | valid
79
+ valid = list(
80
+ self.exclude(
81
+ pk__in=expired
82
+ ).values_list(
83
+ "pk",
84
+ flat=True
85
+ )
86
+ )
87
+ valid_expired = list(
88
+ expired.bulk_refresh(
89
+ ).values_list(
90
+ "pk",
91
+ flat=True
92
+ )
93
+ )
94
+ _qs = self.filter(
95
+ pk__in=(valid + valid_expired)
96
+ )
97
+ return _qs
82
98
 
83
99
  def require_scopes(self, scope_string: Union[str, list]) -> models.QuerySet:
84
100
  """Filter tokens which have at least a subset of given scopes.
@@ -1,4 +1,4 @@
1
- from datetime import datetime, timedelta
1
+ from datetime import datetime, timedelta, timezone
2
2
  import os
3
3
  from unittest.mock import patch, Mock
4
4
  import json
@@ -12,7 +12,6 @@ import requests_mock
12
12
  import django
13
13
  from django.contrib.auth.models import User
14
14
  from django.core.cache import cache
15
- from django.utils import timezone
16
15
 
17
16
  from . import _generate_token, _store_as_Token, NoSocketsTestCase
18
17
  from .factories import create_http_error
@@ -18,6 +18,7 @@ classifiers = [
18
18
  "Framework :: Django :: 4.0",
19
19
  "Framework :: Django :: 4.1",
20
20
  "Framework :: Django :: 4.2",
21
+ "Framework :: Django :: 5.0",
21
22
  "Intended Audience :: Developers",
22
23
  "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
23
24
  "Operating System :: OS Independent",
@@ -27,13 +28,14 @@ classifiers = [
27
28
  "Programming Language :: Python :: 3.9",
28
29
  "Programming Language :: Python :: 3.10",
29
30
  "Programming Language :: Python :: 3.11",
31
+ "Programming Language :: Python :: 3.12",
30
32
  "Topic :: Internet :: WWW/HTTP",
31
33
  "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
32
34
  ]
33
35
  dependencies = [
34
36
  "bravado>=10.6.0,<11.0",
35
37
  "celery>=4.0.2",
36
- "django>=2.2,<5",
38
+ "django>=2.2,<5.1",
37
39
  "jsonschema<4.0.0",
38
40
  "python-jose>=3.3.0",
39
41
  "requests>=2.26.0",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes