Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
941b0a5b
Kaydet (Commit)
941b0a5b
authored
Eki 12, 2017
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #28708 -- Added constants to detect the Python version.
üst
abb636c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
6 deletions
+13
-6
version.py
django/utils/version.py
+10
-0
tests.py
tests/admin_scripts/tests.py
+1
-1
test_writer.py
tests/migrations/test_writer.py
+1
-3
test_debug.py
tests/view_tests/tests/test_debug.py
+1
-2
No files found.
django/utils/version.py
Dosyayı görüntüle @
941b0a5b
...
...
@@ -2,8 +2,18 @@ import datetime
import
functools
import
os
import
subprocess
import
sys
from
distutils.version
import
LooseVersion
# Private, stable API for detecting the Python version. PYXY means "Python X.Y
# or later". So that third-party apps can use these values, each constant
# should remain as long as the oldest supported Django version supports that
# Python version.
PY36
=
sys
.
version_info
>=
(
3
,
6
)
PY37
=
sys
.
version_info
>=
(
3
,
7
)
PY38
=
sys
.
version_info
>=
(
3
,
8
)
PY39
=
sys
.
version_info
>=
(
3
,
9
)
def
get_version
(
version
=
None
):
"""Return a PEP 440-compliant version number from VERSION."""
...
...
tests/admin_scripts/tests.py
Dosyayı görüntüle @
941b0a5b
...
...
@@ -26,10 +26,10 @@ from django.db.migrations.recorder import MigrationRecorder
from
django.test
import
(
LiveServerTestCase
,
SimpleTestCase
,
TestCase
,
override_settings
,
)
from
django.utils.version
import
PY36
custom_templates_dir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'custom_templates'
)
PY36
=
sys
.
version_info
>=
(
3
,
6
)
SYSTEM_CHECK_MSG
=
'System check identified no issues'
...
...
tests/migrations/test_writer.py
Dosyayı görüntüle @
941b0a5b
...
...
@@ -5,7 +5,6 @@ import functools
import
math
import
os
import
re
import
sys
import
uuid
from
unittest
import
mock
...
...
@@ -25,11 +24,10 @@ from django.utils.deconstruct import deconstructible
from
django.utils.functional
import
SimpleLazyObject
from
django.utils.timezone
import
FixedOffset
,
get_default_timezone
,
utc
from
django.utils.translation
import
gettext_lazy
as
_
from
django.utils.version
import
PY36
from
.models
import
FoodManager
,
FoodQuerySet
PY36
=
sys
.
version_info
>=
(
3
,
6
)
class
Money
(
decimal
.
Decimal
):
def
deconstruct
(
self
):
...
...
tests/view_tests/tests/test_debug.py
Dosyayı görüntüle @
941b0a5b
...
...
@@ -19,6 +19,7 @@ from django.urls import reverse
from
django.utils.encoding
import
force_bytes
from
django.utils.functional
import
SimpleLazyObject
from
django.utils.safestring
import
mark_safe
from
django.utils.version
import
PY36
from
django.views.debug
import
(
CLEANSED_SUBSTITUTE
,
CallableSettingWrapper
,
ExceptionReporter
,
cleanse_setting
,
technical_500_response
,
...
...
@@ -31,8 +32,6 @@ from ..views import (
sensitive_method_view
,
sensitive_view
,
)
PY36
=
sys
.
version_info
>=
(
3
,
6
)
class
User
:
def
__str__
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment