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
b64bec3e
Kaydet (Commit)
b64bec3e
authored
Eyl 18, 2001
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Whitespace normalization.
üst
a86f0c17
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
21 deletions
+18
-21
HTMLParser.py
Lib/HTMLParser.py
+1
-1
hmac.py
Lib/hmac.py
+3
-3
posixpath.py
Lib/posixpath.py
+1
-1
smtplib.py
Lib/smtplib.py
+7
-7
test_doctest.py
Lib/test/test_doctest.py
+1
-1
test_getargs.py
Lib/test/test_getargs.py
+0
-3
threading.py
Lib/threading.py
+4
-4
zipfile.py
Lib/zipfile.py
+1
-1
No files found.
Lib/HTMLParser.py
Dosyayı görüntüle @
b64bec3e
...
@@ -439,7 +439,7 @@ class HTMLParser:
...
@@ -439,7 +439,7 @@ class HTMLParser:
if
c
==
'>'
:
if
c
==
'>'
:
# all done
# all done
return
j
+
1
return
j
+
1
def
parse_doctype_notation
(
self
,
i
,
declstartpos
):
def
parse_doctype_notation
(
self
,
i
,
declstartpos
):
name
,
j
=
self
.
scan_name
(
i
,
declstartpos
)
name
,
j
=
self
.
scan_name
(
i
,
declstartpos
)
if
j
<
0
:
if
j
<
0
:
...
...
Lib/hmac.py
Dosyayı görüntüle @
b64bec3e
...
@@ -9,12 +9,12 @@ def _strxor(s1, s2):
...
@@ -9,12 +9,12 @@ def _strxor(s1, s2):
"""Utility method. XOR the two strings s1 and s2 (must have same length).
"""Utility method. XOR the two strings s1 and s2 (must have same length).
"""
"""
return
""
.
join
(
map
(
lambda
x
,
y
:
chr
(
ord
(
x
)
^
ord
(
y
)),
s1
,
s2
))
return
""
.
join
(
map
(
lambda
x
,
y
:
chr
(
ord
(
x
)
^
ord
(
y
)),
s1
,
s2
))
class
HMAC
:
class
HMAC
:
"""RFC2104 HMAC class.
"""RFC2104 HMAC class.
This (mostly) supports the API for Cryptographic Hash Functions (PEP 247).
This (mostly) supports the API for Cryptographic Hash Functions (PEP 247).
"""
"""
def
__init__
(
self
,
key
,
msg
=
None
,
digestmod
=
None
):
def
__init__
(
self
,
key
,
msg
=
None
,
digestmod
=
None
):
"""Create a new HMAC object.
"""Create a new HMAC object.
...
@@ -80,7 +80,7 @@ def new(key, msg = None, digestmod = None):
...
@@ -80,7 +80,7 @@ def new(key, msg = None, digestmod = None):
key: The starting key for the hash.
key: The starting key for the hash.
msg: if available, will immediately be hashed into the object's starting
msg: if available, will immediately be hashed into the object's starting
state.
state.
You can now feed arbitrary strings into the object using its update()
You can now feed arbitrary strings into the object using its update()
method, and can ask for the hash value at any time by calling its digest()
method, and can ask for the hash value at any time by calling its digest()
...
...
Lib/posixpath.py
Dosyayı görüntüle @
b64bec3e
...
@@ -398,5 +398,5 @@ symbolic links encountered in the path."""
...
@@ -398,5 +398,5 @@ symbolic links encountered in the path."""
resolved
=
normpath
(
join
(
dir
,
resolved
))
resolved
=
normpath
(
join
(
dir
,
resolved
))
newpath
=
join
(
*
([
resolved
]
+
bits
[
i
:]))
newpath
=
join
(
*
([
resolved
]
+
bits
[
i
:]))
return
realpath
(
newpath
)
return
realpath
(
newpath
)
return
filename
return
filename
Lib/smtplib.py
Dosyayı görüntüle @
b64bec3e
...
@@ -126,7 +126,7 @@ class SMTPAuthenticationError(SMTPResponseException):
...
@@ -126,7 +126,7 @@ class SMTPAuthenticationError(SMTPResponseException):
class
SSLFakeSocket
:
class
SSLFakeSocket
:
"""A fake socket object that really wraps a SSLObject.
"""A fake socket object that really wraps a SSLObject.
It only supports what is needed in smtplib.
It only supports what is needed in smtplib.
"""
"""
def
__init__
(
self
,
realsock
,
sslobj
):
def
__init__
(
self
,
realsock
,
sslobj
):
...
@@ -142,7 +142,7 @@ class SSLFakeSocket:
...
@@ -142,7 +142,7 @@ class SSLFakeSocket:
class
SSLFakeFile
:
class
SSLFakeFile
:
"""A fake file like object that really wraps a SSLObject.
"""A fake file like object that really wraps a SSLObject.
It only supports what is needed in smtplib.
It only supports what is needed in smtplib.
"""
"""
def
__init__
(
self
,
sslobj
):
def
__init__
(
self
,
sslobj
):
...
@@ -524,7 +524,7 @@ class SMTP:
...
@@ -524,7 +524,7 @@ class SMTP:
authmethod
=
method
authmethod
=
method
break
break
if
self
.
debuglevel
>
0
:
print
"AuthMethod:"
,
authmethod
if
self
.
debuglevel
>
0
:
print
"AuthMethod:"
,
authmethod
if
authmethod
==
AUTH_CRAM_MD5
:
if
authmethod
==
AUTH_CRAM_MD5
:
(
code
,
resp
)
=
self
.
docmd
(
"AUTH"
,
AUTH_CRAM_MD5
)
(
code
,
resp
)
=
self
.
docmd
(
"AUTH"
,
AUTH_CRAM_MD5
)
if
code
==
503
:
if
code
==
503
:
...
@@ -532,7 +532,7 @@ class SMTP:
...
@@ -532,7 +532,7 @@ class SMTP:
return
(
code
,
resp
)
return
(
code
,
resp
)
(
code
,
resp
)
=
self
.
docmd
(
encode_cram_md5
(
resp
,
user
,
password
))
(
code
,
resp
)
=
self
.
docmd
(
encode_cram_md5
(
resp
,
user
,
password
))
elif
authmethod
==
AUTH_PLAIN
:
elif
authmethod
==
AUTH_PLAIN
:
(
code
,
resp
)
=
self
.
docmd
(
"AUTH"
,
(
code
,
resp
)
=
self
.
docmd
(
"AUTH"
,
AUTH_PLAIN
+
" "
+
encode_plain
(
user
,
password
))
AUTH_PLAIN
+
" "
+
encode_plain
(
user
,
password
))
elif
authmethod
==
None
:
elif
authmethod
==
None
:
raise
SMTPError
(
"No suitable authentication method found."
)
raise
SMTPError
(
"No suitable authentication method found."
)
...
@@ -544,20 +544,20 @@ class SMTP:
...
@@ -544,20 +544,20 @@ class SMTP:
def
starttls
(
self
,
keyfile
=
None
,
certfile
=
None
):
def
starttls
(
self
,
keyfile
=
None
,
certfile
=
None
):
"""Puts the connection to the SMTP server into TLS mode.
"""Puts the connection to the SMTP server into TLS mode.
If the server supports TLS, this will encrypt the rest of the SMTP
If the server supports TLS, this will encrypt the rest of the SMTP
session. If you provide the keyfile and certfile parameters,
session. If you provide the keyfile and certfile parameters,
the identity of the SMTP server and client can be checked. This,
the identity of the SMTP server and client can be checked. This,
however, depends on whether the socket module really checks the
however, depends on whether the socket module really checks the
certificates.
certificates.
"""
"""
(
resp
,
reply
)
=
self
.
docmd
(
"STARTTLS"
)
(
resp
,
reply
)
=
self
.
docmd
(
"STARTTLS"
)
if
resp
==
220
:
if
resp
==
220
:
sslobj
=
socket
.
ssl
(
self
.
sock
,
keyfile
,
certfile
)
sslobj
=
socket
.
ssl
(
self
.
sock
,
keyfile
,
certfile
)
self
.
sock
=
SSLFakeSocket
(
self
.
sock
,
sslobj
)
self
.
sock
=
SSLFakeSocket
(
self
.
sock
,
sslobj
)
self
.
file
=
SSLFakeFile
(
sslobj
)
self
.
file
=
SSLFakeFile
(
sslobj
)
return
(
resp
,
reply
)
return
(
resp
,
reply
)
def
sendmail
(
self
,
from_addr
,
to_addrs
,
msg
,
mail_options
=
[],
def
sendmail
(
self
,
from_addr
,
to_addrs
,
msg
,
mail_options
=
[],
rcpt_options
=
[]):
rcpt_options
=
[]):
"""This command performs an entire mail transaction.
"""This command performs an entire mail transaction.
...
...
Lib/test/test_doctest.py
Dosyayı görüntüle @
b64bec3e
import
doctest
,
test_support
import
doctest
,
test_support
test_support
.
run_doctest
(
doctest
)
test_support
.
run_doctest
(
doctest
)
Lib/test/test_getargs.py
Dosyayı görüntüle @
b64bec3e
...
@@ -19,6 +19,3 @@ try:
...
@@ -19,6 +19,3 @@ try:
marshal
.
loads
(
u"
\222
"
)
marshal
.
loads
(
u"
\222
"
)
except
UnicodeError
:
except
UnicodeError
:
pass
pass
Lib/threading.py
Dosyayı görüntüle @
b64bec3e
...
@@ -489,12 +489,12 @@ def Timer(*args, **kwargs):
...
@@ -489,12 +489,12 @@ def Timer(*args, **kwargs):
class
_Timer
(
Thread
):
class
_Timer
(
Thread
):
"""Call a function after a specified number of seconds:
"""Call a function after a specified number of seconds:
t = Timer(30.0, f, args=[], kwargs={})
t = Timer(30.0, f, args=[], kwargs={})
t.start()
t.start()
t.cancel() # stop the timer's action if it's still waiting
t.cancel() # stop the timer's action if it's still waiting
"""
"""
def
__init__
(
self
,
interval
,
function
,
args
=
[],
kwargs
=
{}):
def
__init__
(
self
,
interval
,
function
,
args
=
[],
kwargs
=
{}):
Thread
.
__init__
(
self
)
Thread
.
__init__
(
self
)
self
.
interval
=
interval
self
.
interval
=
interval
...
@@ -502,11 +502,11 @@ class _Timer(Thread):
...
@@ -502,11 +502,11 @@ class _Timer(Thread):
self
.
args
=
args
self
.
args
=
args
self
.
kwargs
=
kwargs
self
.
kwargs
=
kwargs
self
.
finished
=
Event
()
self
.
finished
=
Event
()
def
cancel
(
self
):
def
cancel
(
self
):
"""Stop the timer if it hasn't finished yet"""
"""Stop the timer if it hasn't finished yet"""
self
.
finished
.
set
()
self
.
finished
.
set
()
def
run
(
self
):
def
run
(
self
):
self
.
finished
.
wait
(
self
.
interval
)
self
.
finished
.
wait
(
self
.
interval
)
if
not
self
.
finished
.
isSet
():
if
not
self
.
finished
.
isSet
():
...
...
Lib/zipfile.py
Dosyayı görüntüle @
b64bec3e
...
@@ -417,7 +417,7 @@ class ZipFile:
...
@@ -417,7 +417,7 @@ class ZipFile:
zinfo
.
CRC
=
CRC
zinfo
.
CRC
=
CRC
zinfo
.
file_size
=
file_size
zinfo
.
file_size
=
file_size
# Seek backwards and write CRC and file sizes
# Seek backwards and write CRC and file sizes
position
=
self
.
fp
.
tell
()
# Preserve current position in file
position
=
self
.
fp
.
tell
()
# Preserve current position in file
self
.
fp
.
seek
(
zinfo
.
header_offset
+
14
,
0
)
self
.
fp
.
seek
(
zinfo
.
header_offset
+
14
,
0
)
self
.
fp
.
write
(
struct
.
pack
(
"<lll"
,
zinfo
.
CRC
,
zinfo
.
compress_size
,
self
.
fp
.
write
(
struct
.
pack
(
"<lll"
,
zinfo
.
CRC
,
zinfo
.
compress_size
,
zinfo
.
file_size
))
zinfo
.
file_size
))
...
...
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