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

Incompatibility with Flask >= 2.3.x #97

Closed
ddavidlorenzo opened this issue May 29, 2023 · 6 comments
Closed

Incompatibility with Flask >= 2.3.x #97

ddavidlorenzo opened this issue May 29, 2023 · 6 comments

Comments

@ddavidlorenzo
Copy link

Starting 2.3.0, json_encoder and json_decoder attributes on app and blueprint, and the corresponding json.JSONEncoder and JSONDecoder classes, are removed (source: https://flask.palletsprojects.com/en/2.3.x/changes/).
This produces an error in module pyctuator/impl/flask_pyctuator.py, which attempts to load non-existing module JSONEncoder.

Error trace example:

  File "/home/jboss/.local/lib/python3.11/site-packages/pyctuator/pyctuator.py", line 130, in __init__
    success = framework_integration_function(app, self.pyctuator_impl, customizer)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jboss/.local/lib/python3.11/site-packages/pyctuator/pyctuator.py", line 210, in _integrate_flask
    from pyctuator.impl.flask_pyctuator import FlaskPyctuator
  File "/home/jboss/.local/lib/python3.11/site-packages/pyctuator/impl/flask_pyctuator.py", line 9, in <module>
    from flask.json import JSONEncoder
ImportError: cannot import name 'JSONEncoder' from 'flask.json' (/home/jboss/.local/lib/python3.11/site-packages/flask/json/__init__.py)
@linux-china
Copy link

any news? :)

@michaelyaakoby
Copy link
Member

will take a look.
And if you can send and push-request its even better.

@michaelyaakoby
Copy link
Member

Ok, I started working on this, see #99

@rlratcliffe
Copy link

it looks like this fix is merged, any plans for a release soon?

@michaelyaakoby
Copy link
Member

Sure, was hoping to get the other issues fixed too - will try to get this done by the end of this week.

@michaelyaakoby
Copy link
Member

Done, please upgrade to pyctuator 1.1.0

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

4 participants