Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
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
cpython
Commits
7eec2179
Kaydet (Commit)
7eec2179
authored
May 30, 2007
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Have md5 raise a DeprecationWarning as per PEP 4.
üst
c249bdab
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
4 deletions
+17
-4
md5.py
Lib/md5.py
+4
-0
test_md5.py
Lib/test/test_md5.py
+3
-0
test_pep247.py
Lib/test/test_pep247.py
+4
-0
test_tarfile.py
Lib/test/test_tarfile.py
+2
-2
uuid.py
Lib/uuid.py
+2
-2
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/md5.py
Dosyayı görüntüle @
7eec2179
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
# Copyright (C) 2005 Gregory P. Smith (greg@electricrain.com)
# Copyright (C) 2005 Gregory P. Smith (greg@electricrain.com)
# Licensed to PSF under a Contributor Agreement.
# Licensed to PSF under a Contributor Agreement.
import
warnings
warnings
.
warn
(
"the md5 module is deprecated; use hashlib instead"
,
DeprecationWarning
,
2
)
from
hashlib
import
md5
from
hashlib
import
md5
new
=
md5
new
=
md5
...
...
Lib/test/test_md5.py
Dosyayı görüntüle @
7eec2179
# Testing md5 module
# Testing md5 module
import
warnings
warnings
.
filterwarnings
(
"ignore"
,
"the md5 module is deprecated.*"
,
DeprecationWarning
)
import
unittest
import
unittest
from
md5
import
md5
from
md5
import
md5
...
...
Lib/test/test_pep247.py
Dosyayı görüntüle @
7eec2179
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
# hashing algorithms.
# hashing algorithms.
#
#
import
warnings
warnings
.
filterwarnings
(
"ignore"
,
"the md5 module is deprecated.*"
,
DeprecationWarning
)
import
md5
,
sha
,
hmac
import
md5
,
sha
,
hmac
def
check_hash_module
(
module
,
key
=
None
):
def
check_hash_module
(
module
,
key
=
None
):
...
...
Lib/test/test_tarfile.py
Dosyayı görüntüle @
7eec2179
...
@@ -5,7 +5,7 @@ import os
...
@@ -5,7 +5,7 @@ import os
import
shutil
import
shutil
import
tempfile
import
tempfile
import
StringIO
import
StringIO
import
md5
from
hashlib
import
md5
import
errno
import
errno
import
unittest
import
unittest
...
@@ -25,7 +25,7 @@ except ImportError:
...
@@ -25,7 +25,7 @@ except ImportError:
bz2
=
None
bz2
=
None
def
md5sum
(
data
):
def
md5sum
(
data
):
return
md5
.
new
(
data
)
.
hexdigest
()
return
md5
(
data
)
.
hexdigest
()
def
path
(
path
):
def
path
(
path
):
return
test_support
.
findfile
(
path
)
return
test_support
.
findfile
(
path
)
...
...
Lib/uuid.py
Dosyayı görüntüle @
7eec2179
...
@@ -506,8 +506,8 @@ def uuid1(node=None, clock_seq=None):
...
@@ -506,8 +506,8 @@ def uuid1(node=None, clock_seq=None):
def
uuid3
(
namespace
,
name
):
def
uuid3
(
namespace
,
name
):
"""Generate a UUID from the MD5 hash of a namespace UUID and a name."""
"""Generate a UUID from the MD5 hash of a namespace UUID and a name."""
import
md5
from
hashlib
import
md5
hash
=
md5
.
md5
(
namespace
.
bytes
+
name
)
.
digest
()
hash
=
md5
(
namespace
.
bytes
+
name
)
.
digest
()
return
UUID
(
bytes
=
hash
[:
16
],
version
=
3
)
return
UUID
(
bytes
=
hash
[:
16
],
version
=
3
)
def
uuid4
():
def
uuid4
():
...
...
Misc/NEWS
Dosyayı görüntüle @
7eec2179
...
@@ -220,6 +220,8 @@ Core and builtins
...
@@ -220,6 +220,8 @@ Core and builtins
Library
Library
-------
-------
- md5 now raises a DeprecationWarning upon import.
- mimify now raises a DeprecationWarning upon import.
- mimify now raises a DeprecationWarning upon import.
- MimeWriter now raises a DeprecationWarning upon import.
- MimeWriter now raises a DeprecationWarning upon import.
...
...
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