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
32476fc5
Kaydet (Commit)
32476fc5
authored
Eyl 05, 2008
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Deprecate bsddb for removal in Python 3.0.
Closes issue 3776. Review by Nick Coghlan.
üst
6024834e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
6 deletions
+26
-6
bsddb.rst
Doc/library/bsddb.rst
+3
-0
dbhash.rst
Doc/library/dbhash.rst
+2
-4
__init__.py
Lib/bsddb/__init__.py
+6
-0
dbhash.py
Lib/dbhash.py
+3
-0
test_py3kwarn.py
Lib/test/test_py3kwarn.py
+1
-1
test_warnings.py
Lib/test/test_warnings.py
+1
-0
warnings.py
Lib/warnings.py
+8
-1
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/bsddb.rst
Dosyayı görüntüle @
32476fc5
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
:synopsis: Interface to Berkeley DB database library
:synopsis: Interface to Berkeley DB database library
.. sectionauthor:: Skip Montanaro <skip@pobox.com>
.. sectionauthor:: Skip Montanaro <skip@pobox.com>
.. deprecated:: 2.6
The :mod:`bsddb` module has been deprecated for removal in Python 3.0.
The :mod:`bsddb` module provides an interface to the Berkeley DB library. Users
The :mod:`bsddb` module provides an interface to the Berkeley DB library. Users
can create hash, btree or record based library files using the appropriate open
can create hash, btree or record based library files using the appropriate open
...
...
Doc/library/dbhash.rst
Dosyayı görüntüle @
32476fc5
...
@@ -5,10 +5,8 @@
...
@@ -5,10 +5,8 @@
:synopsis: DBM-style interface to the BSD database library.
:synopsis: DBM-style interface to the BSD database library.
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. note::
.. deprecated:: 2.6
The :mod:`dbhash` module has been renamed to :mod:`dbm.bsd` in Python 3.0.
The :mod:`dbhash` module has been deprecated for removal in Python 3.0.
The :term:`2to3` tool will automatically adapt imports when converting your
sources to 3.0.
.. index:: module: bsddb
.. index:: module: bsddb
...
...
Lib/bsddb/__init__.py
Dosyayı görüntüle @
32476fc5
...
@@ -42,6 +42,12 @@ instead. It mirrors the Oracle Berkeley DB C API.
...
@@ -42,6 +42,12 @@ instead. It mirrors the Oracle Berkeley DB C API.
import
sys
import
sys
absolute_import
=
(
sys
.
version_info
[
0
]
>=
3
)
absolute_import
=
(
sys
.
version_info
[
0
]
>=
3
)
if
sys
.
py3kwarning
:
import
warnings
warnings
.
warnpy3k
(
"in 3.x, bsddb has been removed; "
"please use the pybsddb project instead"
,
DeprecationWarning
,
2
)
try
:
try
:
if
__name__
==
'bsddb3'
:
if
__name__
==
'bsddb3'
:
# import _pybsddb binary as it should be the more recent version from
# import _pybsddb binary as it should be the more recent version from
...
...
Lib/dbhash.py
Dosyayı görüntüle @
32476fc5
"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""
"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""
import
sys
import
sys
if
sys
.
py3kwarning
:
import
warnings
warnings
.
warnpy3k
(
"in 3.x, dbhash has been removed"
,
DeprecationWarning
,
2
)
try
:
try
:
import
bsddb
import
bsddb
except
ImportError
:
except
ImportError
:
...
...
Lib/test/test_py3kwarn.py
Dosyayı görüntüle @
32476fc5
...
@@ -305,7 +305,7 @@ class TestStdlibRemovals(unittest.TestCase):
...
@@ -305,7 +305,7 @@ class TestStdlibRemovals(unittest.TestCase):
'sunos5'
:
(
'sunaudiodev'
,
'SUNAUDIODEV'
),
'sunos5'
:
(
'sunaudiodev'
,
'SUNAUDIODEV'
),
}
}
optional_modules
=
(
'bsddb185'
,
'Canvas'
,
'dl'
,
'linuxaudiodev'
,
'imageop'
,
optional_modules
=
(
'bsddb185'
,
'Canvas'
,
'dl'
,
'linuxaudiodev'
,
'imageop'
,
'sv'
,
'cPickle'
)
'sv'
,
'cPickle'
,
'bsddb'
,
'dbhash'
)
def
check_removal
(
self
,
module_name
,
optional
=
False
):
def
check_removal
(
self
,
module_name
,
optional
=
False
):
"""Make sure the specified module, when imported, raises a
"""Make sure the specified module, when imported, raises a
...
...
Lib/test/test_warnings.py
Dosyayı görüntüle @
32476fc5
...
@@ -508,6 +508,7 @@ class CatchWarningTests(BaseTest):
...
@@ -508,6 +508,7 @@ class CatchWarningTests(BaseTest):
wmod
=
self
.
module
wmod
=
self
.
module
with
wmod
.
catch_warnings
(
module
=
wmod
,
record
=
True
)
as
w
:
with
wmod
.
catch_warnings
(
module
=
wmod
,
record
=
True
)
as
w
:
self
.
assertEqual
(
w
,
[])
self
.
assertEqual
(
w
,
[])
self
.
assertRaises
(
AttributeError
,
getattr
,
w
,
'message'
)
wmod
.
simplefilter
(
"always"
)
wmod
.
simplefilter
(
"always"
)
wmod
.
warn
(
"foo"
)
wmod
.
warn
(
"foo"
)
self
.
assertEqual
(
str
(
w
.
message
),
"foo"
)
self
.
assertEqual
(
str
(
w
.
message
),
"foo"
)
...
...
Lib/warnings.py
Dosyayı görüntüle @
32476fc5
...
@@ -314,7 +314,14 @@ class WarningsRecorder(list):
...
@@ -314,7 +314,14 @@ class WarningsRecorder(list):
self
.
append
(
WarningMessage
(
*
args
,
**
kwargs
))
self
.
append
(
WarningMessage
(
*
args
,
**
kwargs
))
def
__getattr__
(
self
,
attr
):
def
__getattr__
(
self
,
attr
):
return
getattr
(
self
[
-
1
],
attr
)
"""Return attributes from the last caught warning, or raise
AttributeError."""
try
:
return
getattr
(
self
[
-
1
],
attr
)
except
IndexError
:
raise
AttributeError
(
"no recorded warning to read "
"{0!r} attribute from"
.
format
(
attr
))
def
reset
(
self
):
def
reset
(
self
):
del
self
[:]
del
self
[:]
...
...
Misc/NEWS
Dosyayı görüntüle @
32476fc5
...
@@ -56,6 +56,8 @@ C-API
...
@@ -56,6 +56,8 @@ C-API
Library
Library
-------
-------
- Issue 3776: Deprecate the bsddb package for removal in 3.0.
- Issue #3762: platform.architecture() fails if python is lanched via
- Issue #3762: platform.architecture() fails if python is lanched via
its symbolic link.
its symbolic link.
...
...
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