Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to replace bp.bparser.BibTexParser() ? #451

Closed
1 of 2 tasks
tillea opened this issue Jan 25, 2024 · 2 comments
Closed
1 of 2 tasks

How to replace bp.bparser.BibTexParser() ? #451

tillea opened this issue Jan 25, 2024 · 2 comments

Comments

@tillea
Copy link

tillea commented Jan 25, 2024

Describe the bug
I'd like to fix a bug in the Debian package qiime which fails its CI test due to this line

parser = bp.bparser.BibTexParser()

I greped through the source code of python-bibtexparser and can't find it any more in 2.0.0b* while it was at least available in version 1.1.0 (which worked nicely with the CI test of qiime.

Reproducing
Its not really a bug if you change the API but it would be great to mention those changes in your changelog to inform users how to fix their code to adapt it to the new version.

Paste a minimal code example to reproduce the issue here

import bibtexparser as bp
parser = bp.bparser.BibTexParser()

        parser = bp.bparser.BibTexParser()
             ^^^^^^^^^^
AttributeError: module 'bibtexparser' has no attribute 'bparser'

This is the case for version 2.0.0b5 of bibtexparser

Workaround

Seems reverting to some 1.x version (definitely 1.1.0 which was packaged in Debian before) makes the code above valid code.

  • I would be willing to contribute a PR to fix this issue.
  • This issue is a blocker, I'd be grateful for an early fix.

I consider some proper documentation of the API change a proper fix. I'd happily create a patch for qiime in Debian and will propagate it to upstream.

@MiWeiss
Copy link
Collaborator

MiWeiss commented Jan 25, 2024

Hi

I am surprised that you are actually installing any 2.0.0b* version, which are beta versions with certainly a bunch of relevant bugs and future small, but breaking api changes expected in future pre-releases.

Thus, your "workaround" is probably the thing you want to do. Note: 1.4.1 is still listed as last stable version of bibtexparser on pypi: https://pypi.org/search/?q=bibtexparser Going to any 2.x version requires to deliberately install a pre-release, e.g. by calling pip install bibtexparser --pre.

Regarding the changelog:

it would be great to mention those changes in your changelog to inform users how to fix their code to adapt it to the new version.

The changelog literally sais:

image

Certainly, before releasing a stable 2.x version, the documentation will continue to grow.

@MiWeiss MiWeiss closed this as completed Jan 25, 2024
@tillea
Copy link
Author

tillea commented Jan 25, 2024

Thanks a lot for the clarification. Just to clarify: It was not me who decided to use a beta version. Some other maintainer decided to grab the latest tag at some point in time. Seems we need to revert this change to the latest stable version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants