diff --git a/python/biobear/bam_reader.py b/python/biobear/bam_reader.py index fa361a3..5346dc8 100644 --- a/python/biobear/bam_reader.py +++ b/python/biobear/bam_reader.py @@ -19,11 +19,9 @@ import pyarrow as pa from biobear.reader import Reader -from biobear.deprecated import deprecated from .biobear import _BamIndexedReader, _ExonReader -@deprecated class BamReader(Reader): """A BAM File Reader.""" diff --git a/python/biobear/bcf_reader.py b/python/biobear/bcf_reader.py index 591cb4f..2413455 100644 --- a/python/biobear/bcf_reader.py +++ b/python/biobear/bcf_reader.py @@ -21,12 +21,10 @@ from biobear.reader import Reader -from biobear.deprecated import deprecated from .biobear import _ExonReader, _BCFIndexedReader -@deprecated class BCFReader(Reader): """A BCF File Reader. @@ -48,7 +46,6 @@ def inner(self): return self._bcf_reader -@deprecated class BCFIndexedReader(Reader): """An Indexed BCF File Reader. diff --git a/python/biobear/deprecated.py b/python/biobear/deprecated.py deleted file mode 100644 index cbf36e2..0000000 --- a/python/biobear/deprecated.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2023 WHERE TRUE Technologies. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import warnings -import functools - - -def deprecated(cls): - """Class decorator to mark a class as deprecated.""" - orig_init = cls.__init__ - - @functools.wraps(orig_init) - def new_init(self, *args, **kwargs): - # pylint: disable=line-too-long - error_msg = f"{cls.__name__} is being deprecated, please use a table function via the session.\nSee https://www.wheretrue.dev/docs/exon/sql-reference#table-functions for more info." - - warnings.warn(error_msg, category=DeprecationWarning, stacklevel=2) - orig_init(self, *args, **kwargs) - - cls.__init__ = new_init - return cls diff --git a/python/biobear/fasta_reader.py b/python/biobear/fasta_reader.py index 625fb58..26668cc 100644 --- a/python/biobear/fasta_reader.py +++ b/python/biobear/fasta_reader.py @@ -17,12 +17,10 @@ from biobear.reader import Reader from biobear.compression import Compression -from biobear.deprecated import deprecated from .biobear import _ExonReader -@deprecated class FastaReader(Reader): """FASTA file reader.""" diff --git a/python/biobear/fastq_reader.py b/python/biobear/fastq_reader.py index af698f5..20de7b0 100644 --- a/python/biobear/fastq_reader.py +++ b/python/biobear/fastq_reader.py @@ -17,12 +17,10 @@ from biobear.reader import Reader from biobear.compression import Compression -from biobear.deprecated import deprecated from .biobear import _ExonReader -@deprecated class FastqReader(Reader): """FASTQ file reader.""" diff --git a/python/biobear/genbank_reader.py b/python/biobear/genbank_reader.py index 0294bf3..5ec46a2 100644 --- a/python/biobear/genbank_reader.py +++ b/python/biobear/genbank_reader.py @@ -3,12 +3,10 @@ from biobear.reader import Reader from biobear.compression import Compression -from biobear.deprecated import deprecated from .biobear import _ExonReader -@deprecated class GenbankReader(Reader): """Genbank file reader.""" diff --git a/python/biobear/gff_reader.py b/python/biobear/gff_reader.py index 3fc5942..d6ff87d 100644 --- a/python/biobear/gff_reader.py +++ b/python/biobear/gff_reader.py @@ -7,12 +7,10 @@ from biobear.compression import Compression from biobear.reader import Reader -from biobear.deprecated import deprecated from .biobear import _ExonReader -@deprecated class GFFReader(Reader): """A GFF File Reader.""" diff --git a/python/biobear/gtf_reader.py b/python/biobear/gtf_reader.py index bb767cb..21f84c8 100644 --- a/python/biobear/gtf_reader.py +++ b/python/biobear/gtf_reader.py @@ -7,12 +7,10 @@ from biobear.compression import Compression from biobear.reader import Reader -from biobear.deprecated import deprecated from .biobear import _ExonReader -@deprecated class GTFReader(Reader): """A GTF File Reader.""" diff --git a/python/biobear/mzml_reader.py b/python/biobear/mzml_reader.py index 64f33ae..d2ec3c2 100644 --- a/python/biobear/mzml_reader.py +++ b/python/biobear/mzml_reader.py @@ -4,12 +4,10 @@ from biobear.compression import Compression from biobear.reader import Reader -from biobear.deprecated import deprecated from .biobear import _ExonReader -@deprecated class MzMLReader(Reader): """A MzML File Reader.""" diff --git a/python/biobear/vcf_reader.py b/python/biobear/vcf_reader.py index dec8edc..8ff85a4 100644 --- a/python/biobear/vcf_reader.py +++ b/python/biobear/vcf_reader.py @@ -19,12 +19,10 @@ import pyarrow as pa from biobear.reader import Reader -from biobear.deprecated import deprecated from .biobear import _ExonReader, _VCFIndexedReader -@deprecated class VCFReader(Reader): """A VCF File Reader. @@ -46,7 +44,6 @@ def inner(self): return self._vcf_reader -@deprecated class VCFIndexedReader(Reader): """An Indexed VCF File Reader.