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

Release a new version on PyPi #45

Open
MitchellWeg opened this issue Feb 10, 2022 · 3 comments
Open

Release a new version on PyPi #45

MitchellWeg opened this issue Feb 10, 2022 · 3 comments

Comments

@MitchellWeg
Copy link
Member

Commit #42 contains an important fix that makes it possible for this driver to work on the newer Python versions. Would it be possible to create a new release and release it on PyPi?

@gijzelaerr
Copy link
Collaborator

will do, but i prefer to first make sure the test suite passes first, currently it doesn't https://github.com/gijzelaerr/sqlalchemy-monetdb/actions/runs/1818959959

@MitchellWeg
Copy link
Member Author

That's cool. I tried to do some digging, but I haven't quite got the problem yet. I suspect there was a change in the way connection strings are parsed from 1.4.0 onwards, because before that it still worked.

@MitchellWeg
Copy link
Member Author

I got the test-suite to work, however a lot of tests still fail. Alot of the tests fail in Pymonetdb and not sqlalchemy_monetdb:

Traceback (most recent call last):
  File "/home/mitchell/Documents/Werk/SQLAlchemy/sqlalchemy-monetdb/.tox/py3.9/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1702, in _execute_context
    context = constructor(
  File "/home/mitchell/Documents/Werk/SQLAlchemy/sqlalchemy-monetdb/.tox/py3.9/lib64/python3.9/site-packages/sqlalchemy/engine/default.py", line 1091, in _init_compiled
    param = {
  File "/home/mitchell/Documents/Werk/SQLAlchemy/sqlalchemy-monetdb/.tox/py3.9/lib64/python3.9/site-packages/sqlalchemy/engine/default.py", line 1092, in <dictcomp>
    key: processors[key](compiled_params[key])
  File "/home/mitchell/Documents/Werk/SQLAlchemy/sqlalchemy-monetdb/.tox/py3.9/lib64/python3.9/site-packages/sqlalchemy/sql/sqltypes.py", line 993, in process
    return DBAPIBinary(value)
  File "/home/mitchell/Documents/Werk/SQLAlchemy/sqlalchemy-monetdb/.tox/py3.9/lib/python3.9/site-packages/pymonetdb/sql/pythonize.py", line 183, in Binary
    return bytes.fromhex(data)
TypeError: fromhex() argument must be str, not bytes

which is this test:

    def test_binary_roundtrip(self, connection):
        binary_table = self.tables.binary_table

        connection.execute(
            binary_table.insert(), {"id": 1, "binary_data": b"this is binary"}
        )
        row = connection.execute(select(binary_table.c.binary_data)).first()
        eq_(row, (b"this is binary",))

https://github.com/sqlalchemy/sqlalchemy/blob/7920fa7995af83943560afc1a07dde4ebb4f9552/lib/sqlalchemy/testing/suite/test_types.py#L214

Should these tests be overridden, or do we need to change something in pymonetdb?

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