mirror of
https://github.com/biopython/biopython.git
synced 2025-10-20 13:43:47 +08:00
Remove obj.next() deprecation warning.
e.g. python run_tests.py -g test_GenBank.py
This commit is contained in:
@ -60,12 +60,7 @@ class AlignmentIterator(object):
|
||||
|
||||
if sys.version_info[0] < 3:
|
||||
def next(self):
|
||||
"""Deprecated Python 2 style alias for Python 3 style __next__ method."""
|
||||
import warnings
|
||||
from Bio import BiopythonDeprecationWarning
|
||||
warnings.warn("Please use next(my_iterator) instead of my_iterator.next(), "
|
||||
"the .next() method is deprecated and will be removed in a "
|
||||
"future release of Biopython.", BiopythonDeprecationWarning)
|
||||
"""Python 2 style alias for Python 3 style __next__ method."""
|
||||
return self.__next__()
|
||||
|
||||
def __iter__(self):
|
||||
|
@ -1686,12 +1686,7 @@ class Iterator(object):
|
||||
|
||||
if sys.version_info[0] < 3:
|
||||
def next(self):
|
||||
"""Deprecated Python 2 style alias for Python 3 style __next__ method."""
|
||||
import warnings
|
||||
from Bio import BiopythonDeprecationWarning
|
||||
warnings.warn("Please use next(my_iterator) instead of my_iterator.next(), "
|
||||
"the .next() method is deprecated and will be removed in a "
|
||||
"future release of Biopython.", BiopythonDeprecationWarning)
|
||||
"""Python 2 style alias for Python 3 style __next__ method."""
|
||||
return self.__next__()
|
||||
|
||||
def __iter__(self):
|
||||
|
@ -79,12 +79,7 @@ class BlastTableReader(object):
|
||||
|
||||
if sys.version_info[0] < 3:
|
||||
def next(self):
|
||||
"""Deprecated Python 2 style alias for Python 3 style __next__ method."""
|
||||
import warnings
|
||||
from Bio import BiopythonDeprecationWarning
|
||||
warnings.warn("Please use next(my_iterator) instead of my_iterator.next(), "
|
||||
"the .next() method is deprecated and will be removed in a "
|
||||
"future release of Biopython.", BiopythonDeprecationWarning)
|
||||
"""Python 2 style alias for Python 3 style __next__ method."""
|
||||
return self.__next__()
|
||||
|
||||
def _consume_entry(self, inline):
|
||||
|
@ -144,12 +144,7 @@ class IterationCursor(object):
|
||||
|
||||
if sys.version_info[0] < 3:
|
||||
def next(self):
|
||||
"""Deprecated Python 2 style alias for Python 3 style __next__ method."""
|
||||
import warnings
|
||||
from Bio import BiopythonDeprecationWarning
|
||||
warnings.warn("Please use next(my_iterator) instead of my_iterator.next(), "
|
||||
"the .next() method is deprecated and will be removed in a "
|
||||
"future release of Biopython.", BiopythonDeprecationWarning)
|
||||
"""Python 2 style alias for Python 3 style __next__ method."""
|
||||
return self.__next__()
|
||||
|
||||
|
||||
|
@ -399,12 +399,7 @@ class Iterator(object):
|
||||
|
||||
if sys.version_info[0] < 3:
|
||||
def next(self):
|
||||
"""Deprecated Python 2 style alias for Python 3 style __next__ method."""
|
||||
import warnings
|
||||
from Bio import BiopythonDeprecationWarning
|
||||
warnings.warn("Please use next(my_iterator) instead of my_iterator.next(), "
|
||||
"the .next() method is deprecated and will be removed in a "
|
||||
"future release of Biopython.", BiopythonDeprecationWarning)
|
||||
"""Python 2 style alias for Python 3 style __next__ method."""
|
||||
return self.__next__()
|
||||
|
||||
def __iter__(self):
|
||||
|
@ -168,12 +168,7 @@ class _FileIterator:
|
||||
|
||||
if sys.version_info[0] < 3:
|
||||
def next(self):
|
||||
"""Deprecated Python 2 style alias for Python 3 style __next__ method."""
|
||||
import warnings
|
||||
from Bio import BiopythonDeprecationWarning
|
||||
warnings.warn("Please use next(my_iterator) instead of my_iterator.next(), "
|
||||
"the .next() method is deprecated and will be removed in a "
|
||||
"future release of Biopython.", BiopythonDeprecationWarning)
|
||||
"""Python 2 style alias for Python 3 style __next__ method."""
|
||||
return self.__next__()
|
||||
|
||||
def __del__(self):
|
||||
|
@ -55,12 +55,7 @@ class SequenceIterator(object):
|
||||
|
||||
if sys.version_info[0] < 3:
|
||||
def next(self):
|
||||
"""Deprecated Python 2 style alias for Python 3 style __next__ method."""
|
||||
import warnings
|
||||
from Bio import BiopythonDeprecationWarning
|
||||
warnings.warn("Please use next(my_iterator) instead of my_iterator.next(), "
|
||||
"the .next() method is deprecated and will be removed in a "
|
||||
"future release of Biopython.", BiopythonDeprecationWarning)
|
||||
"""Python 2 style alias for Python 3 style __next__ method."""
|
||||
return self.__next__()
|
||||
|
||||
def __iter__(self):
|
||||
|
Reference in New Issue
Block a user