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
9d441824
Kaydet (Commit)
9d441824
authored
May 08, 2008
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
The mutex module has been deprecated for removal in 3.0.
üst
80bb9d92
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
3 deletions
+26
-3
mutex.rst
Doc/library/mutex.rst
+5
-0
mutex.py
Lib/mutex.py
+3
-0
test_mutex.py
Lib/test/test_mutex.py
+2
-2
test_py3kwarn.py
Lib/test/test_py3kwarn.py
+1
-1
test_support.py
Lib/test/test_support.py
+13
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/mutex.rst
Dosyayı görüntüle @
9d441824
...
@@ -4,6 +4,11 @@
...
@@ -4,6 +4,11 @@
.. module:: mutex
.. module:: mutex
:synopsis: Lock and queue for mutual exclusion.
:synopsis: Lock and queue for mutual exclusion.
:deprecated:
.. deprecated::
The mutex module has been removed in Python 3.0.
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
...
...
Lib/mutex.py
Dosyayı görüntüle @
9d441824
...
@@ -11,6 +11,9 @@ implying it now has the lock.
...
@@ -11,6 +11,9 @@ implying it now has the lock.
Of course, no multi-threading is implied -- hence the funny interface
Of course, no multi-threading is implied -- hence the funny interface
for lock, where a function is called once the lock is aquired.
for lock, where a function is called once the lock is aquired.
"""
"""
from
warnings
import
warnpy3k
warnpy3k
(
"the mutex module has been removed in Python 3.0"
,
stacklevel
=
2
)
del
warnpy3k
from
collections
import
deque
from
collections
import
deque
...
...
Lib/test/test_mutex.py
Dosyayı görüntüle @
9d441824
import
mutex
import
unittest
import
unittest
import
test.test_support
import
test.test_support
mutex
=
test
.
test_support
.
import_module
(
"mutex"
,
deprecated
=
True
)
class
MutexTest
(
unittest
.
TestCase
):
class
MutexTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
...
...
Lib/test/test_py3kwarn.py
Dosyayı görüntüle @
9d441824
...
@@ -126,7 +126,7 @@ class TestPy3KWarnings(unittest.TestCase):
...
@@ -126,7 +126,7 @@ class TestPy3KWarnings(unittest.TestCase):
class
TestStdlibRemovals
(
unittest
.
TestCase
):
class
TestStdlibRemovals
(
unittest
.
TestCase
):
all_platforms
=
(
'audiodev'
,
'imputil'
)
all_platforms
=
(
'audiodev'
,
'imputil'
,
'mutex'
)
def
check_removal
(
self
,
module_name
):
def
check_removal
(
self
,
module_name
):
"""Make sure the specified module, when imported, raises a
"""Make sure the specified module, when imported, raises a
...
...
Lib/test/test_support.py
Dosyayı görüntüle @
9d441824
...
@@ -37,6 +37,19 @@ class ResourceDenied(TestSkipped):
...
@@ -37,6 +37,19 @@ class ResourceDenied(TestSkipped):
and unexpected skips.
and unexpected skips.
"""
"""
def
import_module
(
name
,
deprecated
=
False
):
"""Import the module to be tested, raising TestSkipped if it is not
available."""
with
catch_warning
():
if
deprecated
:
warnings
.
filterwarnings
(
"ignore"
,
".+ module"
,
DeprecationWarning
)
try
:
module
=
__import__
(
name
,
level
=
0
)
except
ImportError
:
raise
TestSkipped
(
"No module named "
+
name
)
else
:
return
module
verbose
=
1
# Flag set to 0 by regrtest.py
verbose
=
1
# Flag set to 0 by regrtest.py
use_resources
=
None
# Flag set to [] by regrtest.py
use_resources
=
None
# Flag set to [] by regrtest.py
max_memuse
=
0
# Disable bigmem tests (they will still be run with
max_memuse
=
0
# Disable bigmem tests (they will still be run with
...
...
Misc/NEWS
Dosyayı görüntüle @
9d441824
...
@@ -18,6 +18,8 @@ Extension Modules
...
@@ -18,6 +18,8 @@ Extension Modules
Library
Library
-------
-------
- The mutex module has bene deprecated for removal in Python 3.0.
- The imputil module has been deprecated for removal in Python 3.0.
- The imputil module has been deprecated for removal in Python 3.0.
Build
Build
...
...
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