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
2ec82c73
Kaydet (Commit)
2ec82c73
authored
Mar 24, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Updated six to 1.6.1.
üst
bff77e2a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
13 deletions
+30
-13
six.py
django/utils/six.py
+25
-11
1.4.11.txt
docs/releases/1.4.11.txt
+1
-1
1.5.6.txt
docs/releases/1.5.6.txt
+1
-1
1.6.3.txt
docs/releases/1.6.3.txt
+3
-0
No files found.
django/utils/six.py
Dosyayı görüntüle @
2ec82c73
...
...
@@ -25,7 +25,7 @@ import sys
import
types
__author__
=
"Benjamin Peterson <benjamin@python.org>"
__version__
=
"1.
5.2
"
__version__
=
"1.
6.1
"
# Useful for very coarse version differentiation.
...
...
@@ -83,7 +83,11 @@ class _LazyDescr(object):
self
.
name
=
name
def
__get__
(
self
,
obj
,
tp
):
result
=
self
.
_resolve
()
try
:
result
=
self
.
_resolve
()
except
ImportError
:
# See the nice big comment in MovedModule.__getattr__.
raise
AttributeError
(
"
%
s could not be imported "
%
self
.
name
)
setattr
(
obj
,
self
.
name
,
result
)
# Invokes __set__.
# This is a bit ugly, but it avoids running this again.
delattr
(
obj
.
__class__
,
self
.
name
)
...
...
@@ -105,15 +109,22 @@ class MovedModule(_LazyDescr):
return
_import_module
(
self
.
mod
)
def
__getattr__
(
self
,
attr
):
# Hack around the Django autoreloader. The reloader tries to get
# __file__ or __name__ of every module in sys.modules. This doesn't work
# well if this MovedModule is for an module that is unavailable on this
# machine (like winreg on Unix systems). Thus, we pretend __file__ and
# __name__ don't exist if the module hasn't been loaded yet. See issues
# #51 and #53.
if
attr
in
(
"__file__"
,
"__name__"
)
and
self
.
mod
not
in
sys
.
modules
:
raise
AttributeError
_module
=
self
.
_resolve
()
# It turns out many Python frameworks like to traverse sys.modules and
# try to load various attributes. This causes problems if this is a
# platform-specific module on the wrong platform, like _winreg on
# Unixes. Therefore, we silently pretend unimportable modules do not
# have any attributes. See issues #51, #53, #56, and #63 for the full
# tales of woe.
#
# First, if possible, avoid loading the module just to look at __file__,
# __name__, or __path__.
if
(
attr
in
(
"__file__"
,
"__name__"
,
"__path__"
)
and
self
.
mod
not
in
sys
.
modules
):
raise
AttributeError
(
attr
)
try
:
_module
=
self
.
_resolve
()
except
ImportError
:
raise
AttributeError
(
attr
)
value
=
getattr
(
_module
,
attr
)
setattr
(
self
,
attr
,
value
)
return
value
...
...
@@ -222,6 +233,7 @@ _moved_attributes = [
MovedModule
(
"urllib"
,
__name__
+
".moves.urllib"
,
__name__
+
".moves.urllib"
),
MovedModule
(
"urllib_robotparser"
,
"robotparser"
,
"urllib.robotparser"
),
MovedModule
(
"xmlrpc_client"
,
"xmlrpclib"
,
"xmlrpc.client"
),
MovedModule
(
"xmlrpc_server"
,
"xmlrpclib"
,
"xmlrpc.server"
),
MovedModule
(
"winreg"
,
"_winreg"
),
]
for
attr
in
_moved_attributes
:
...
...
@@ -241,6 +253,7 @@ class Module_six_moves_urllib_parse(_LazyModule):
_urllib_parse_moved_attributes
=
[
MovedAttribute
(
"ParseResult"
,
"urlparse"
,
"urllib.parse"
),
MovedAttribute
(
"SplitResult"
,
"urlparse"
,
"urllib.parse"
),
MovedAttribute
(
"parse_qs"
,
"urlparse"
,
"urllib.parse"
),
MovedAttribute
(
"parse_qsl"
,
"urlparse"
,
"urllib.parse"
),
MovedAttribute
(
"urldefrag"
,
"urlparse"
,
"urllib.parse"
),
...
...
@@ -254,6 +267,7 @@ _urllib_parse_moved_attributes = [
MovedAttribute
(
"unquote"
,
"urllib"
,
"urllib.parse"
),
MovedAttribute
(
"unquote_plus"
,
"urllib"
,
"urllib.parse"
),
MovedAttribute
(
"urlencode"
,
"urllib"
,
"urllib.parse"
),
MovedAttribute
(
"splitquery"
,
"urllib"
,
"urllib.parse"
),
]
for
attr
in
_urllib_parse_moved_attributes
:
setattr
(
Module_six_moves_urllib_parse
,
attr
.
name
,
attr
)
...
...
docs/releases/1.4.11.txt
Dosyayı görüntüle @
2ec82c73
...
...
@@ -5,4 +5,4 @@ Django 1.4.11 release notes
*Under development*
Django's vendored version of six, :mod:`django.utils.six`, has been upgraded to
the latest release (1.
5.2
).
the latest release (1.
6.1
).
docs/releases/1.5.6.txt
Dosyayı görüntüle @
2ec82c73
...
...
@@ -5,7 +5,7 @@ Django 1.5.6 release notes
*Under development*
Django's vendored version of six, :mod:`django.utils.six`, has been upgraded to
the latest release (1.
5.2
).
the latest release (1.
6.1
).
Bugfixes
========
...
...
docs/releases/1.6.3.txt
Dosyayı görüntüle @
2ec82c73
...
...
@@ -26,3 +26,6 @@ several bugs in 1.6.2:
* Improved :func:`~django.utils.html.strip_tags` accuracy (but it still cannot
guarantee an HTML-safe result, as stated in the documentation).
Additionally, Django's vendored version of six, :mod:`django.utils.six` has been
upgraded to the latest release (1.6.1).
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