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
7f1168e3
Kaydet (Commit)
7f1168e3
authored
Haz 15, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed support for Python 3.3.
üst
e5cb4e14
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
44 additions
and
65 deletions
+44
-65
config.py
django/apps/config.py
+1
-1
message.py
django/core/mail/message.py
+1
-8
features.py
django/db/backends/sqlite3/features.py
+2
-3
dispatcher.py
django/dispatch/dispatcher.py
+3
-2
functional.py
django/utils/functional.py
+1
-1
glob.py
django/utils/glob.py
+9
-24
html_parser.py
django/utils/html_parser.py
+2
-1
module_loading.py
django/utils/module_loading.py
+2
-5
install.txt
docs/faq/install.txt
+10
-4
unit-tests.txt
docs/internals/contributing/writing-code/unit-tests.txt
+2
-2
install.txt
docs/intro/install.txt
+3
-3
tutorial01.txt
docs/intro/tutorial01.txt
+1
-1
1.9.txt
docs/releases/1.9.txt
+1
-1
tests.py
tests/apps/tests.py
+1
-4
test_hashers.py
tests/auth_tests/test_hashers.py
+1
-1
test_commands.py
tests/migrations/test_commands.py
+1
-1
test_settings.py
tests/project_template/test_settings.py
+3
-3
No files found.
django/apps/config.py
Dosyayı görüntüle @
7f1168e3
...
...
@@ -55,7 +55,7 @@ class AppConfig(object):
"""Attempt to determine app's filesystem path from its module."""
# See #21874 for extended discussion of the behavior of this method in
# various cases.
# Convert paths to list because Python 3
.3
_NamespacePath does not
# Convert paths to list because Python 3
's
_NamespacePath does not
# support indexing.
paths
=
list
(
getattr
(
module
,
'__path__'
,
[]))
if
len
(
paths
)
!=
1
:
...
...
django/core/mail/message.py
Dosyayı görüntüle @
7f1168e3
...
...
@@ -3,7 +3,6 @@ from __future__ import unicode_literals
import
mimetypes
import
os
import
random
import
sys
import
time
from
email
import
(
charset
as
Charset
,
encoders
as
Encoders
,
generator
,
message_from_string
,
...
...
@@ -170,13 +169,7 @@ class SafeMIMEText(MIMEMixin, MIMEText):
# We do it manually and trigger re-encoding of the payload.
MIMEText
.
__init__
(
self
,
_text
,
_subtype
,
None
)
del
self
[
'Content-Transfer-Encoding'
]
# Workaround for versions without http://bugs.python.org/issue19063
if
(
3
,
2
)
<
sys
.
version_info
<
(
3
,
3
,
4
):
payload
=
_text
.
encode
(
utf8_charset
.
output_charset
)
self
.
_payload
=
payload
.
decode
(
'ascii'
,
'surrogateescape'
)
self
.
set_charset
(
utf8_charset
)
else
:
self
.
set_payload
(
_text
,
utf8_charset
)
self
.
set_payload
(
_text
,
utf8_charset
)
self
.
replace_header
(
'Content-Type'
,
'text/
%
s; charset="
%
s"'
%
(
_subtype
,
_charset
))
elif
_charset
is
None
:
# the default value of '_charset' is 'us-ascii' on Python 2
...
...
django/db/backends/sqlite3/features.py
Dosyayı görüntüle @
7f1168e3
from
__future__
import
unicode_literals
import
sys
from
django.db
import
utils
from
django.db.backends.base.features
import
BaseDatabaseFeatures
from
django.utils
import
six
from
django.utils.functional
import
cached_property
from
.base
import
Database
...
...
@@ -50,7 +49,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
@cached_property
def
can_share_in_memory_db
(
self
):
return
(
s
ys
.
version_info
[:
2
]
>=
(
3
,
4
)
and
s
ix
.
PY3
and
Database
.
__name__
==
'sqlite3.dbapi2'
and
Database
.
sqlite_version_info
>=
(
3
,
7
,
13
)
)
...
...
django/dispatch/dispatcher.py
Dosyayı görüntüle @
7f1168e3
...
...
@@ -3,11 +3,12 @@ import threading
import
warnings
import
weakref
from
django.utils
import
six
from
django.utils.deprecation
import
RemovedInDjango21Warning
from
django.utils.inspect
import
func_accepts_kwargs
from
django.utils.six.moves
import
range
if
s
ys
.
version_info
<
(
3
,
4
)
:
if
s
ix
.
PY2
:
from
.weakref_backports
import
WeakMethod
else
:
from
weakref
import
WeakMethod
...
...
@@ -108,7 +109,7 @@ class Signal(object):
if
hasattr
(
receiver
,
'__self__'
)
and
hasattr
(
receiver
,
'__func__'
):
ref
=
WeakMethod
receiver_object
=
receiver
.
__self__
if
s
ys
.
version_info
>=
(
3
,
4
)
:
if
s
ix
.
PY3
:
receiver
=
ref
(
receiver
)
weakref
.
finalize
(
receiver_object
,
self
.
_remove_receiver
)
else
:
...
...
django/utils/functional.py
Dosyayı görüntüle @
7f1168e3
...
...
@@ -251,7 +251,7 @@ class LazyObject(object):
self
.
_setup
()
return
self
.
_wrapped
.
__dict__
# Python 3
.3
will call __reduce__ when pickling; this method is needed
# Python 3 will call __reduce__ when pickling; this method is needed
# to serialize and deserialize correctly.
@classmethod
def
__newobj__
(
cls
,
*
args
):
...
...
django/utils/glob.py
Dosyayı görüntüle @
7f1168e3
...
...
@@ -7,30 +7,15 @@ from django.utils import six
# backport of Python 3.4's glob.escape
try
:
if
six
.
PY3
:
from
glob
import
escape
as
glob_escape
e
xcept
ImportError
:
e
lse
:
_magic_check
=
re
.
compile
(
'([*?[])'
)
if
six
.
PY3
:
_magic_check_bytes
=
re
.
compile
(
b
'([*?[])'
)
def
glob_escape
(
pathname
):
"""
Escape all special characters.
"""
drive
,
pathname
=
os
.
path
.
splitdrive
(
pathname
)
if
isinstance
(
pathname
,
bytes
):
pathname
=
_magic_check_bytes
.
sub
(
br
'[
\1
]'
,
pathname
)
else
:
pathname
=
_magic_check
.
sub
(
r'[\1]'
,
pathname
)
return
drive
+
pathname
else
:
def
glob_escape
(
pathname
):
"""
Escape all special characters.
"""
drive
,
pathname
=
os
.
path
.
splitdrive
(
pathname
)
pathname
=
_magic_check
.
sub
(
r'[\1]'
,
pathname
)
return
drive
+
pathname
def
glob_escape
(
pathname
):
"""
Escape all special characters.
"""
drive
,
pathname
=
os
.
path
.
splitdrive
(
pathname
)
pathname
=
_magic_check
.
sub
(
r'[\1]'
,
pathname
)
return
drive
+
pathname
django/utils/html_parser.py
Dosyayı görüntüle @
7f1168e3
import
re
import
sys
from
django.utils
import
six
from
django.utils.six.moves
import
html_parser
as
_html_parser
current_version
=
sys
.
version_info
...
...
@@ -15,7 +16,7 @@ except AttributeError:
pass
if
not
use_workaround
:
if
current_version
>=
(
3
,
4
)
:
if
six
.
PY3
:
class
HTMLParser
(
_html_parser
.
HTMLParser
):
"""Explicitly set convert_charrefs to be False.
...
...
django/utils/module_loading.py
Dosyayı görüntüle @
7f1168e3
...
...
@@ -63,11 +63,8 @@ def autodiscover_modules(*args, **kwargs):
raise
if
sys
.
version_info
[:
2
]
>=
(
3
,
3
):
if
sys
.
version_info
[:
2
]
>=
(
3
,
4
):
from
importlib.util
import
find_spec
as
importlib_find
else
:
from
importlib
import
find_loader
as
importlib_find
if
six
.
PY3
:
from
importlib.util
import
find_spec
as
importlib_find
def
module_has_submodule
(
package
,
module_name
):
"""See if 'module' is in 'package'."""
...
...
docs/faq/install.txt
Dosyayı görüntüle @
7f1168e3
...
...
@@ -16,9 +16,9 @@ How do I get started?
What are Django's prerequisites?
--------------------------------
Django requires Python
, specifically Python 2.7 or 3.3 and above. Other Python
libraries may be required for some uses, but you'll receive an error about it
as they're needed.
Django requires Python
. See the table in the next question for the versions of
Python that work with each version of Django. Other Python libraries may be
required for some uses, but you'll receive an error about it
as they're needed.
For a development environment -- if you just want to experiment with Django --
you don't need to have a separate Web server installed; Django comes with its
...
...
@@ -47,13 +47,19 @@ Django version Python versions
============== ===============
1.4 2.5, 2.6, 2.7
**1.7, 1.8** **2.7** and **3.2, 3.3, 3.4**
1.9 2.7, 3.
3, 3.
4, 3.5
1.9 2.7, 3.4, 3.5
============== ===============
For each version of Python, only the latest micro release (A.B.C) is officially
supported. You can find the latest micro version for each series on the `Python
download page <https://www.python.org/downloads/>`_.
Typically, we will support a Python version up to and including the first
Django LTS release that will receive security updates until after security
support for that version of Python ends. For example, Python 3.3 security
support ends September 2017 and Django 1.8 LTS security support ends April
2018. Therefore Django 1.8 is the last version to support Python 3.3.
What Python version should I use with Django?
---------------------------------------------
...
...
docs/internals/contributing/writing-code/unit-tests.txt
Dosyayı görüntüle @
7f1168e3
...
...
@@ -21,8 +21,8 @@ Running the unit tests
Quickstart
~~~~~~~~~~
If you are on Python
< 3.3
, you'll first need to install a backport of the
``unittest.mock`` module that's available in Python 3.
3+.
See
If you are on Python
2
, you'll first need to install a backport of the
``unittest.mock`` module that's available in Python 3. See
:ref:`running-unit-tests-dependencies` for details on installing `mock`_ and
the other optional test dependencies.
...
...
docs/intro/install.txt
Dosyayı görüntüle @
7f1168e3
...
...
@@ -9,9 +9,9 @@ that'll work while you walk through the introduction.
Install Python
--------------
Being a Python Web framework, Django requires Python.
It works with Python 2.7
and Python 3.3+. All these versions of Python include a lightweight database called
SQLite_ so you won't need to set up a database just yet.
Being a Python Web framework, Django requires Python.
See
:ref:`faq-python-version-support` for details. Python includes a lightweight
database called
SQLite_ so you won't need to set up a database just yet.
.. _sqlite: http://sqlite.org/
...
...
docs/intro/tutorial01.txt
Dosyayı görüntüle @
7f1168e3
...
...
@@ -22,7 +22,7 @@ tell Django is installed and which version by running the following command:
If Django is installed, you should see the version of your installation. If it
isn't, you'll get an error telling "No module named django".
This tutorial is written for Django |version| and Python 3.
3
or later. If the
This tutorial is written for Django |version| and Python 3.
4
or later. If the
Django version doesn't match, you can refer to the tutorial for your version
of Django by using the version switcher at the bottom right corner of this
page, or update Django to the newest version. If you are still using Python
...
...
docs/releases/1.9.txt
Dosyayı görüntüle @
7f1168e3
...
...
@@ -20,7 +20,7 @@ Python compatibility
Like Django 1.8, Django 1.9 requires Python 2.7 or above, though we
**highly recommend** the latest minor release. We've dropped support for
Python 3.2 and added support for Python 3.5.
Python 3.2 and
3.3, and
added support for Python 3.5.
What's new in Django 1.9
========================
...
...
tests/apps/tests.py
Dosyayı görüntüle @
7f1168e3
from
__future__
import
unicode_literals
import
os
import
sys
import
warnings
from
unittest
import
skipUnless
...
...
@@ -367,9 +366,7 @@ class AppConfigTests(SimpleTestCase):
AppConfig
(
'label'
,
Stub
(
__path__
=
[
'a'
,
'b'
]))
@skipUnless
(
sys
.
version_info
>
(
3
,
3
,
0
),
"Namespace packages sans __init__.py were added in Python 3.3"
)
@skipUnless
(
six
.
PY3
,
"Namespace packages sans __init__.py were added in Python 3.3"
)
class
NamespacePackageAppTests
(
SimpleTestCase
):
# We need nsapp to be top-level so our multiple-paths tests can add another
# location for it (if its inside a normal package with an __init__.py that
...
...
tests/auth_tests/test_hashers.py
Dosyayı görüntüle @
7f1168e3
...
...
@@ -353,7 +353,7 @@ class TestUtilsHashPass(SimpleTestCase):
def
test_load_library_importerror
(
self
):
PlainHasher
=
type
(
str
(
'PlainHasher'
),
(
BasePasswordHasher
,),
{
'algorithm'
:
'plain'
,
'library'
:
'plain'
})
# Python 3
.3
adds quotes around module name
# Python 3 adds quotes around module name
with
six
.
assertRaisesRegex
(
self
,
ValueError
,
"Couldn't load 'PlainHasher' algorithm library: No module named '?plain'?"
):
PlainHasher
()
.
_load_library
()
tests/migrations/test_commands.py
Dosyayı görüntüle @
7f1168e3
...
...
@@ -843,7 +843,7 @@ class MakeMigrationsTests(MigrationTestBase):
content
=
cmd
(
"0001"
,
migration_name_0001
)
self
.
assertIn
(
"dependencies=[
\n
]"
,
content
)
# Python 3
.3+
importlib caches os.listdir() on some platforms like
# Python 3 importlib caches os.listdir() on some platforms like
# Mac OS X (#23850).
if
hasattr
(
importlib
,
'invalidate_caches'
):
importlib
.
invalidate_caches
()
...
...
tests/project_template/test_settings.py
Dosyayı görüntüle @
7f1168e3
import
sys
import
unittest
from
django.test
import
TestCase
from
django.utils
import
six
@unittest.skipIf
(
s
ys
.
version_info
<
(
3
,
3
)
,
'Python
< 3.3
cannot import the project template because '
@unittest.skipIf
(
s
ix
.
PY2
,
'Python
2
cannot import the project template because '
'django/conf/project_template doesn
\'
t have an __init__.py file.'
)
class
TestStartProjectSettings
(
TestCase
):
...
...
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