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

Update SQLAlchemy pin from >=1.4.31,<2.0.0 -> >=2.0.0 #11

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

anmyachev
Copy link
Contributor

@anmyachev anmyachev commented Feb 6, 2024

sqlalchemy 2.0.0 is the minimum supported version for pandas 2.2.0. I started to adopt a new version of pandas (modin-project/modin#6907) and ran into dependency incompatibility.

Hi @suhailrehman, what do you think about updating sqlalchemy versions?

Please note: although I changed the pin, I did not manually test the changes.

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@suhailrehman
Copy link
Owner

Let me try running the tests. Also, I'll see if I can add a pytest runner to the CI to automate the process.

@anmyachev
Copy link
Contributor Author

Hi @suhailrehman! Any updates so far?

@suhailrehman
Copy link
Owner

There's an API change that seems to be breaking tests:

tests/core/test_artifact.py::test_serialize_deserialize[sql_artifact] FAILED                                                                                                                                                                     [  8%]

======================================================================================================================= FAILURES =======================================================================================================================
_______________________________________________________________________________________________________ test_serialize_deserialize[sql_artifact] _______________________________________________________________________________________________________

artifact = 'sql_artifact', request = <FixtureRequest for <Function test_serialize_deserialize[sql_artifact]>>

    @pytest.mark.dependency(depends=["test_generate"])
    @pytest.mark.parametrize('artifact', artifact_fixtures)
    def test_serialize_deserialize(artifact, request):
        concrete_artifact = request.getfixturevalue(artifact)
        df_file = concrete_artifact.filename
        concrete_artifact.serialize()
        assert os.path.exists(df_file)
>       concrete_artifact.destroy()

tests/core/test_artifact.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Artifact(label=test_df)

    def destroy(self):
        if self.sync_df:
            del self.table
>       self.sql_engine.execute(self._del_table)
E       AttributeError: 'Engine' object has no attribute 'execute'

fuzzydata/clients/sqlite.py:81: AttributeError
=================================================================================================================== warnings summary ===================================================================================================================
tests/core/test_artifact.py:9
tests/core/test_artifact.py:17
tests/core/test_workflow.py:21
tests/core/test_workflow.py:33
tests/core/test_workflow.py:47
  PytestUnknownMarkWarning: Unknown pytest.mark.dependency - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html

tests/core/test_artifact.py: 20 warnings
  UserWarning: Distributing <class 'generator'> object. This may take some time.

tests/core/test_artifact.py::test_generate[modin_artifact]
  UserWarning: Ray execution environment not yet initialized. Initializing...
  To remove this warning, run the following python code before doing dataframe operations:
  
      import ray
      ray.init()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================================================================================== short test summary info ================================================================================================================
FAILED tests/core/test_artifact.py::test_serialize_deserialize[sql_artifact] - AttributeError: 'Engine' object has no attribute 'execute'

@suhailrehman
Copy link
Owner

@anmyachev I've made the required changes to support a newer SQLalchemy version. What do you think the best way is to integrate the changes now? Can I commit to your repo to keep things in this PR? Please give me permissions if that makes sense, or let me know what the best option is.

(I've never had to commit back into an external PR of my repo)

@suhailrehman suhailrehman merged commit fb0eeb8 into suhailrehman:main Feb 8, 2024
@suhailrehman
Copy link
Owner

I've merged the changes into main. Stay tuned for a new release today

@anmyachev
Copy link
Contributor Author

@anmyachev I've made the required changes to support a newer SQLalchemy version. What do you think the best way is to integrate the changes now? Can I commit to your repo to keep things in this PR? Please give me permissions if that makes sense, or let me know what the best option is.

@suhailrehman I don't mind if you add your commits to my branch (here and in the future). Apparently I forgot to provide you with this opportunity through the Allowing edits by maintainers option.

I've merged the changes into main. Stay tuned for a new release today

Thanks a lot!

@anmyachev anmyachev deleted the update-sqlalchemy branch February 8, 2024 18:13
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

Successfully merging this pull request may close these issues.

None yet

2 participants