Skip to content

Unknown Seq deprecated without major version bump breaking BCBio.GFF  #4239

Closed

Description

@corneliusroemer

Setup

I just installed the newest Biopython version 1.81 and got a bug that took some time to figure out.

Turns out, you deprecated UnknownSeq in 1.81, something that BCBio.GFF uses.

I discover (now) that you announced deprecation in a deprecated.rst for 1.81, but this wasn't quite easy to find - there's no mention of it in the release notes.

It would be great if you could put deprecations in release notes to make it easier to discover why something breaks.

Also, in general, it would be nice if you used semver and increased major version if you deprecate something.

Bug caused by this: nextstrain/augur#1151

Activity

  1. Lioscro commented on Feb 17, 2023

    @Lioscro

    I also encountered this while using BCBio. Would have been great to have the deprecation noted in the changelogs and a major bump.

  2. mdehoon commented on Feb 17, 2023

    @mdehoon
    Contributor

    Also, in general, it would be nice if you used semver and increased major version if you deprecate something.

    This would not be realistic -- stuff gets deprecated in most if not all Biopython releases.

  3. corneliusroemer commented on Feb 17, 2023

    @corneliusroemer
    ContributorAuthor

    Hmm, I don't see why one can't bump major version in most releases. This is what browsers do for example. They deprecate stuff all the time, so they bump.

    At least a deprecation notice when importing this module would have been good, for the future. I don't think I ever saw a warning?

    The removal is not mentioned in NEWS.rst for v1.81. It is mentioned in NEWS.rst for v1.79, but basically impossible to find given the text wall without structure. Something like a heading ## Deprecations with a list of everything deprecated in that version and planned deprecations and their versions would be great.

    https://github.com/biopython/biopython/blob/master/NEWS.rst#12-february-2023-biopython-181

    https://github.com/biopython/biopython/blob/master/NEWS.rst#3-june-2021-biopython-179

  4. JoaoRodrigues commented on Feb 17, 2023

    @JoaoRodrigues
    Member

    And referencing the specific commit, we did do issue DeprecationWarnings: mdehoon@0832381 (since Dec 2020)

    Not blaming anyone for not noticing it, I know that deprecation warnings can be annoying and people often silence them, or if Biopython is an upstream dependency, you might never even see these warnings. So, in the future, we might want to add a note to the NEWS or so, pointing directly to the deprecations for each release, basically linking NEWS.rst and DEPRECATED.rst for easier browsing by users.

    EDIT: The most likely reason why you never saw the warning was that UnknownSeq is never instantiated. It's used in an isinstance call in https://github.com/chapmanb/bcbb/blob/dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027/gff/BCBio/GFF/GFFParser.py#L539.

  5. siddhartasr10 commented on Apr 30, 2023

    @siddhartasr10
    Contributor

    It is instantiated, it also creates a record with an UnknownSeq: https://github.com/chapmanb/bcbb/blob/dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027/gff/BCBio/GFF/GFFParser.py#L543

    But maybe it doesn't show because its done on a private method?

  6. peterjc commented on Apr 30, 2023

    @peterjc
    Member

    @siddhartasr10 update your copy of BCBio, see chapmanb/bcbb@8a36af0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions