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
b9dd8512
Kaydet (Commit)
b9dd8512
authored
May 17, 2018
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Advanced deprecation warnings for Django 2.2.
üst
74a31394
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
deprecation.py
django/utils/deprecation.py
+5
-2
deprecation.txt
docs/internals/deprecation.txt
+8
-0
runtests.py
tests/runtests.py
+4
-1
No files found.
django/utils/deprecation.py
Dosyayı görüntüle @
b9dd8512
...
...
@@ -2,14 +2,17 @@ import inspect
import
warnings
class
RemovedInDjango30Warning
(
Pending
DeprecationWarning
):
class
RemovedInDjango30Warning
(
DeprecationWarning
):
pass
class
RemovedIn
NextVersionWarning
(
DeprecationWarning
):
class
RemovedIn
Django31Warning
(
Pending
DeprecationWarning
):
pass
RemovedInNextVersionWarning
=
RemovedInDjango30Warning
class
warn_about_renamed_method
:
def
__init__
(
self
,
class_name
,
old_method_name
,
new_method_name
,
deprecation_warning
):
self
.
class_name
=
class_name
...
...
docs/internals/deprecation.txt
Dosyayı görüntüle @
b9dd8512
...
...
@@ -7,6 +7,14 @@ in a backward incompatible way, following their deprecation, as per the
:ref:`deprecation policy <internal-release-deprecation-policy>`. More details
about each item can often be found in the release notes of two versions prior.
.. _deprecation-removed-in-3.1:
3.1
---
See the :ref:`Django 2.2 release notes <deprecated-features-2.2>` for more
details on these changes.
.. _deprecation-removed-in-3.0:
3.0
...
...
tests/runtests.py
Dosyayı görüntüle @
b9dd8512
...
...
@@ -17,7 +17,9 @@ from django.test import TestCase, TransactionTestCase
from
django.test.runner
import
default_test_processes
from
django.test.selenium
import
SeleniumTestCaseBase
from
django.test.utils
import
get_runner
from
django.utils.deprecation
import
RemovedInDjango30Warning
from
django.utils.deprecation
import
(
RemovedInDjango30Warning
,
RemovedInDjango31Warning
,
)
from
django.utils.log
import
DEFAULT_LOGGING
try
:
...
...
@@ -30,6 +32,7 @@ else:
# Make deprecation warnings errors to ensure no usage of deprecated features.
warnings
.
simplefilter
(
"error"
,
RemovedInDjango30Warning
)
warnings
.
simplefilter
(
'error'
,
RemovedInDjango31Warning
)
# Make runtime warning errors to ensure no usage of error prone patterns.
warnings
.
simplefilter
(
"error"
,
RuntimeWarning
)
# Ignore known warnings in test dependencies.
...
...
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