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

Beanquery is incompatible with TatSu 5.13.1 #226

Closed
AlphaJack opened this issue Jan 19, 2025 · 9 comments
Closed

Beanquery is incompatible with TatSu 5.13.1 #226

AlphaJack opened this issue Jan 19, 2025 · 9 comments
Labels
invalid This doesn't seem right

Comments

@AlphaJack
Copy link

With TatSu 5.13.1 I'm having this error that was not present with TatSu 5.7.4:

Traceback (most recent call last):

 ...

  File "/usr/lib/python3.13/site-packages/beanquery/shell.py", line 257, in onecmd
    return self.execute(line)
           ~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/site-packages/beanquery/shell.py", line 333, in execute
    statement = self.parse(query, **kwargs)
  File "/usr/lib/python3.13/site-packages/beanquery/shell.py", line 363, in parse
    statement = self.context.parse(line)
  File "/usr/lib/python3.13/site-packages/beanquery/__init__.py", line 47, in parse
    return parser.parse(query)
           ~~~~~~~~~~~~^^^^^^^
  File "/usr/lib/python3.13/site-packages/beanquery/parser/__init__.py", line 61, in parse
    return parser.BQLParser().parse(text, semantics=BQLSemantics())
           ~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/beanquery/parser/parser.py", line 70, in __init__
    config = ParserConfig.new(
        config,
    ...<9 lines>...
        start='bql',
    )
  File "/usr/lib/python3.13/site-packages/tatsu/infos.py", line 93, in new
    return result.replace(**settings)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/tatsu/infos.py", line 133, in replace
    result = dataclasses.replace(self, **overrides)
  File "/usr/lib/python3.13/dataclasses.py", line 1596, in replace
    return _replace(obj, **changes)
  File "/usr/lib/python3.13/dataclasses.py", line 1630, in _replace
    return self.__class__(**changes)
           ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "<string>", line 31, in __init__
  File "/usr/lib/python3.13/site-packages/tatsu/infos.py", line 69, in __post_init__
    raise AttributeError(
    ...<2 lines>...
    )
AttributeError: Both `comments_re` and `eol_comments_re` have been removed from parser configurations. Please use `comments` and/or `eol_comments` instead
@dnicolodi
Copy link
Collaborator

beanquery 0.1.0 requires TatSu >= 5.7.4, < 5.8.0. beanquery from git master requires TatSu-LTS, thus it is not clear to me how you installed beanquery with TatSu 5.13.1.

@dnicolodi dnicolodi added the invalid This doesn't seem right label Jan 20, 2025
@wzyboy
Copy link

wzyboy commented Jan 27, 2025

@AlphaJack I believe you encountered this issue because I made a mistake in AUR packaging: when I made the beanquery package, I took the tarball of 0.1.0 release but took the the dependency list from the pyproject.toml file in the master branch, not realizing that the dependency changed from tatsu to tatsu-lts between 0.1.0 and the current master.

That's why you ended up with an invalid package combination. I'm sorry!

@dnicolodi Is it possible to make a tagged release of 0.2.0 that depends on Tatus-LTS?

@AlphaJack
Copy link
Author

AlphaJack commented Jan 27, 2025

Hi @dnicolodi, thank you for the explanation. I tried using TatSu-LTS 5.13.1, but I get the same error when visiting the Holdings Fava tab.

I don't get the error with TatSu-LTS 5.12.2:

Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/flask/app.py", line 1511, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3.13/site-packages/flask/app.py", line 919, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3.13/site-packages/flask/app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3.13/site-packages/flask/app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/fava/json_api.py", line 259, in _wrapper
    res = func(*validator(data))
  File "/usr/lib/python3.13/site-packages/fava/json_api.py", line 286, in get_query
    return g.ledger.query_shell.execute_query_serialised(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        g.filtered.entries, query_string
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/fava/core/query_shell.py", line 185, in execute_query_serialised
    res = self.shell.run(entries, query)
  File "/usr/lib/python3.13/site-packages/fava/core/query_shell.py", line 101, in run
    result = self.onecmd(query)
  File "/usr/lib/python3.13/site-packages/beanquery/shell.py", line 257, in onecmd
    return self.execute(line)
           ~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/site-packages/beanquery/shell.py", line 333, in execute
    statement = self.parse(query, **kwargs)
  File "/usr/lib/python3.13/site-packages/beanquery/shell.py", line 363, in parse
    statement = self.context.parse(line)
  File "/usr/lib/python3.13/site-packages/beanquery/__init__.py", line 47, in parse
    return parser.parse(query)
           ~~~~~~~~~~~~^^^^^^^
  File "/usr/lib/python3.13/site-packages/beanquery/parser/__init__.py", line 61, in parse
    return parser.BQLParser().parse(text, semantics=BQLSemantics())
           ~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/beanquery/parser/parser.py", line 70, in __init__
    config = ParserConfig.new(
        config,
    ...<9 lines>...
        start='bql',
    )
  File "/usr/lib/python3.13/site-packages/tatsu/infos.py", line 100, in new
    return result.replace(**settings)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/tatsu/infos.py", line 140, in replace
    result = dataclasses.replace(self, **overrides)
  File "/usr/lib/python3.13/dataclasses.py", line 1596, in replace
    return _replace(obj, **changes)
  File "/usr/lib/python3.13/dataclasses.py", line 1630, in _replace
    return self.__class__(**changes)
           ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "<string>", line 31, in __init__
  File "/usr/lib/python3.13/site-packages/tatsu/infos.py", line 76, in __post_init__
    raise AttributeError(
    ...<2 lines>...
    )
AttributeError: Both `comments_re` and `eol_comments_re` have been removed from parser configurations. Please use `comments` and/or `eol_comments` instead`.

@dnicolodi
Copy link
Collaborator

Hi @dnicolodi, thank you for the explanation. I tried using TatSu-LTS 5.13.1, but I get the same error when visiting the Holdings Fava tab.

Evidently you are using beanquery version 0.1.0 and that states compatibility only with TatSU >= 5.7.4, < 5.8.0.

@dnicolodi
Copy link
Collaborator

Is it possible to make a tagged release of 0.2.0 that depends on Tatus-LTS?

It is possible, but it is easier to fix your packaging.

@xuhcc
Copy link

xuhcc commented Jan 28, 2025

It is possible, but it is easier to fix your packaging.

@dnicolodi The package tracks tagged versions, and 0.1.0 depends an outdated version of python-tatsu which is not in the repos. How it is supposed to be fixed?

And what exactly prevents you from tagging a new release?

@dnicolodi
Copy link
Collaborator

The package tracks tagged versions, and 0.1.0 depends an outdated version of python-tatsu which is not in the repos. How it is supposed to be fixed?

I'm not the one that decided that beangulp had to be packaged for a distribution that does not have the correct dependencies and that screwed up the dependencies to make the package installable with the wrong version of the dependencies. What about someone packaging the required version of TatSu?

And what exactly prevents you from tagging a new release?

Mostly annoyance for how it has been asked. The tone of requests like that imply that I owe you any support. I have already done a lot of work that you are enjoying for free. Assuming that I must do more work just because I've done already shows unbelievable amount of arrogance and entitlement and it is just offensive.

@xuhcc
Copy link

xuhcc commented Jan 28, 2025

The old version of TatSu can be packaged, but this is not optimal, and having a single package would preferable. This not because someone screwed up.

You were asked politely whether it is possible to tag a new release. There is nothing offensive about that request (it was not even a request), but you closed the issue and now you're saying that there is no technical reason. Do you want to make life more difficult for people who package beancount? They are also doing it for free, by the way.

@blais Perhaps you can add a tag?

@dnicolodi
Copy link
Collaborator

And what exactly prevents you from tagging a new release?

You were asked politely

Evidently we have a very different definition of what a polite request is.

@ blais Perhaps you can add a tag?

You just earned my first use of the "Block this user" GitHub functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants