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
d7265d64
Kaydet (Commit)
d7265d64
authored
May 09, 2008
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Deprecate the new module for removal in 3.0.
üst
d03238a6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
5 deletions
+13
-5
new.rst
Doc/library/new.rst
+4
-0
new.py
Lib/new.py
+4
-3
test_new.py
Lib/test/test_new.py
+2
-1
test_py3kwarn.py
Lib/test/test_py3kwarn.py
+1
-1
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/new.rst
Dosyayı görüntüle @
d7265d64
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
.. module:: new
.. module:: new
:synopsis: Interface to the creation of runtime implementation objects.
:synopsis: Interface to the creation of runtime implementation objects.
:deprecated:
.. deprecated:: The new 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/new.py
Dosyayı görüntüle @
d7265d64
...
@@ -3,9 +3,10 @@
...
@@ -3,9 +3,10 @@
This module is no longer required except for backward compatibility.
This module is no longer required except for backward compatibility.
Objects of most types can now be created by calling the type object.
Objects of most types can now be created by calling the type object.
"""
"""
from
warnings
import
warnpy3k
as
_warnpy3k
from
warnings
import
warnpy3k
_warnpy3k
(
"The 'new' module is not supported in 3.x, use the 'types' module "
warnpy3k
(
"The 'new' module has been removed in Python 3.0; use the 'types' "
"instead."
,
stacklevel
=
2
)
"module instead."
,
stacklevel
=
2
)
del
warnpy3k
from
types
import
ClassType
as
classobj
from
types
import
ClassType
as
classobj
from
types
import
FunctionType
as
function
from
types
import
FunctionType
as
function
...
...
Lib/test/test_new.py
Dosyayı görüntüle @
d7265d64
import
unittest
import
unittest
from
test
import
test_support
from
test
import
test_support
import
sys
,
new
import
sys
new
=
test_support
.
import_module
(
'new'
,
deprecated
=
True
)
class
NewTest
(
unittest
.
TestCase
):
class
NewTest
(
unittest
.
TestCase
):
def
test_spam
(
self
):
def
test_spam
(
self
):
...
...
Lib/test/test_py3kwarn.py
Dosyayı görüntüle @
d7265d64
...
@@ -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'
,
'mutex'
,
'user'
)
all_platforms
=
(
'audiodev'
,
'imputil'
,
'mutex'
,
'user'
,
'new'
)
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
...
...
Misc/NEWS
Dosyayı görüntüle @
d7265d64
...
@@ -20,6 +20,8 @@ Extension Modules
...
@@ -20,6 +20,8 @@ Extension Modules
Library
Library
-------
-------
- The new module has been deprecated for removal in Python 3.0.
- The user module has been deprecated for removal in Python 3.0.
- The user module has been deprecated for removal in Python 3.0.
- The stringold module has been deprecated for removal in Python 3.0.
- The stringold module has been deprecated for removal in Python 3.0.
...
...
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