Skip to content

[KYUUBI #6567] Fix compatibility of pyhive with setuptools==72.0.0 #6568

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

Closed

Conversation

alexrashed
Copy link
Contributor

🔍 Description

Issue References 🔗

This pull request fixes #6567

Describe Your Solution 🔧

With setuptools==72.0.0, the test command was removed after being deprecated for a long time.
This completely breaks the installation of any packages using the test command, including PyHive.
This PR fixes PyHive to be compatible with setuptools 72+ again.
It seems that setup.py test wasn't used anywhere at all, which is why I just removed it.

Types of changes 🔖

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Test Plan 🧪

Behavior Without This Pull Request ⚰️

$ pip install -e .
Obtaining file:///home/localstack/Repos/kyuubi/python
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/localstack/Repos/kyuubi/python/setup.py", line 4, in <module>
          from setuptools.command.test import test as TestCommand
      ModuleNotFoundError: No module named 'setuptools.command.test'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details

Behavior With This Pull Request 🎉

$ pip install --upgrade setuptools
Requirement already satisfied: setuptools in .../.pyenv/versions/3.11.5/lib/python3.11/site-packages (72.0.0)
$ pip install -e .
Obtaining file:///home/.../repos/kyuubi/python
  Preparing metadata (setup.py) ... done
Collecting future (from PyHive==0.7.0)
  Obtaining dependency information for future from https://files.pythonhosted.org/packages/da/71/ae30dadffc90b9006d77af76b393cb9dfbfc9629f339fc1574a1c52e6806/future-1.0.0-py3-none-any.whl.metadata
  Using cached future-1.0.0-py3-none-any.whl.metadata (4.0 kB)
Requirement already satisfied: python-dateutil in /home/.../.pyenv/versions/3.11.5/lib/python3.11/site-packages (from PyHive==0.7.0) (2.8.2)
Requirement already satisfied: six>=1.5 in /home/.../.pyenv/versions/3.11.5/lib/python3.11/site-packages (from python-dateutil->PyHive==0.7.0) (1.16.0)
Using cached future-1.0.0-py3-none-any.whl (491 kB)
Installing collected packages: future, PyHive
  Running setup.py develop for PyHive
Successfully installed PyHive-0.7.0 future-1.0.0

[notice] A new release of pip is available: 23.2.1 -> 24.1.2
[notice] To update, run: pip install --upgrade pip

Related Unit Tests

None


Checklist 📝

Be nice. Be informative.

@pan3793 pan3793 changed the title fix compatibility of pyhive with setuptools==72.0.0 [KYUUBI #6567] Fix compatibility of pyhive with setuptools==72.0.0 Jul 29, 2024
@pan3793
Copy link
Member

pan3793 commented Jul 29, 2024

@alexrashed thanks for reporting and fix this issue. cc @BruceWong96, could you please take a look at this patch?

@pan3793 pan3793 added this to the v1.10.0 milestone Jul 29, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (d9d2109) to head (acfb809).
Report is 1 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #6568   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files         677     677           
  Lines       41806   41806           
  Branches     5711    5711           
======================================
  Misses      41806   41806           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BruceWong96
Copy link
Contributor

@alexrashed thanks for reporting and fix this issue. cc @BruceWong96, could you please take a look at this patch?感谢您报告并解决此问题。抄送@BruceWong96 ,您能看一下这个补丁吗?

Ok, I need to test it.

@BruceWong96
Copy link
Contributor

After testing, setuptools did remove test in version 72.0.0, and we can test it directly with the pytest command.
This pr works.
@pan3793

@pan3793 pan3793 closed this in 996cdcc Jul 29, 2024
@pan3793
Copy link
Member

pan3793 commented Jul 29, 2024

Merged to master, thank you, @alexrashed and @BruceWong96

@alexrashed
Copy link
Contributor Author

@pan3793 Thanks a lot for merging the PR! Since this package has been donated to Kyuubi from Dropbox, what exactly is the release strategy now? Is this fix also going to be released anytime soon? There's no real hurry because the setuptools release has been yanked, but just out of curiosity and in case setuptools moves again with the removal?

@alexrashed alexrashed deleted the fix-pyhive-setuptools-72 branch July 30, 2024 10:52
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.

[Bug] pyhive breaks with setuptools==72.0.0
4 participants