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

[BUG] Issue with consuming the new version of opensearch-py 2.2.0 #309

Closed
VachaShah opened this issue Mar 2, 2023 · 14 comments
Closed

[BUG] Issue with consuming the new version of opensearch-py 2.2.0 #309

VachaShah opened this issue Mar 2, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@VachaShah
Copy link
Collaborator

What is the bug?

When consuming the new version of opensearch-py 2.2.0 in opensearch-dsl-py, the workflows are failing for some python versions:

https://github.com/opensearch-project/opensearch-dsl-py/actions/runs/4309402957/jobs/7516755816

Error:

ERROR: No matching distribution found for certifi>=2022.12.07 (from opensearch-py>=2.0.0->opensearch-dsl==2.0.1)

How can one reproduce the bug?

See the workflow link https://github.com/opensearch-project/opensearch-dsl-py/actions/runs/4309402957/jobs/7516755816.

What is the expected behavior?

The workflows should succeed.

What is your host/environment?

Operating system, version.

Do you have any screenshots?

If applicable, add screenshots to help explain your problem.

Do you have any additional context?

Regarding PR #295

@VachaShah VachaShah added bug Something isn't working untriaged Need triage labels Mar 2, 2023
@VachaShah
Copy link
Collaborator Author

@saimedhi Can you take a look?

@saimedhi
Copy link
Collaborator

saimedhi commented Mar 2, 2023

@saimedhi Can you take a look?

ok

@Yury-Fridlyand
Copy link
Contributor

certify seems doesn't support python 2.7 anymore. Should I exclude it from CI runs if confirmed?
Please, re-check me.

@Yury-Fridlyand
Copy link
Contributor

certifi page says

Requires: Python >=3.6

@saimedhi
Copy link
Collaborator

saimedhi commented Mar 2, 2023

Got it. I think we need to skip certify installation for python 2.7

@saimedhi
Copy link
Collaborator

saimedhi commented Mar 2, 2023

@Yury-Fridlyand Are you working on it. If not, I will make the changes :)

@Yury-Fridlyand
Copy link
Contributor

@saimedhi,
Will do

@Yury-Fridlyand
Copy link
Contributor

@wbeckler wbeckler removed the untriaged Need triage label Mar 22, 2023
@saimedhi
Copy link
Collaborator

@VachaShah, I think we can close this issue

@janderson-cloudian
Copy link

This still breaks older python 2 versions when using the command:

pip install opensearch-py

fixing the version to 2.1.1 is a work around but not ideal.

changes in the setup file seem to be ignored in older python versions. I believe I have the last pip version to support python 2 installed.

Obviously python 2 is EOL but I'm unable to upgrade in this instance.

(qa_venv) [root@env_1r1dc6n-node1 ~]# pip --version
pip 20.3.4 from /root/qa_venv/lib/python2.7/site-packages/pip (python 2.7)
(qa_venv) [root@env_1r1dc6n-node1 ~]# python --version
Python 2.7.5

(qa_venv) [root@env_1r1dc6n-node1 ~]# pip show opensearch-py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Name: opensearch-py
Version: 2.1.1
Summary: Python low-level client for OpenSearch
Home-page: https://github.com/opensearch-project/opensearch-py
Author: Aleksei Atavin, Denis Zalevskiy, Rushi Agrawal, Shephali Mittal
Author-email: axeo@aiven.io, dez@aiven.io, rushi.agr@gmail.com, shephalm@amazon.com
License: Apache-2.0
Location: /root/qa_venv/lib/python2.7/site-packages
Requires: urllib3, certifi, requests
Required-by: 

(qa_venv) [root@env_1r1dc6n-node1 ~]# pip install -U opensearch-py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting opensearch-py
  Using cached opensearch_py-2.2.0-py2.py3-none-any.whl (291 kB)
Requirement already satisfied, skipping upgrade: urllib3<2,>=1.21.1 in ./qa_venv/lib/python2.7/site-packages (from opensearch-py) (1.26.15)
Collecting python-dateutil
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting ipaddress; python_version < "3.3"
  Using cached ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
ERROR: Could not find a version that satisfies the requirement certifi>=2022.12.07 (from opensearch-py) (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 1.0.0, 1.0.1, 14.5.14, 2015.4.28, 2015.9.6, 2015.9.6.1, 2015.9.6.2, 2015.11.20, 2015.11.20.1, 2016.2.28, 2016.8.2, 2016.8.8, 2016.8.31, 2016.9.26, 2017.1.23, 2017.4.17, 2017.7.27, 2017.7.27.1, 2017.11.5, 2018.1.18, 2018.4.16, 2018.8.13, 2018.8.24, 2018.10.15, 2018.11.29, 2019.3.9, 2019.6.16, 2019.9.11, 2019.11.28, 2020.4.5, 2020.4.5.1, 2020.4.5.2, 2020.6.20, 2020.11.8, 2020.12.5, 2021.5.30, 2021.10.8)
ERROR: No matching distribution found for certifi>=2022.12.07 (from opensearch-py)

@dblock
Copy link
Member

dblock commented Mar 24, 2023

Related, a lot of this mess is solved with virtual env I believe, been using pipenv for projects.

@ReinGrad
Copy link

ReinGrad commented Apr 4, 2023

The problem seems to be related to the certifi package and its Python 2.7 support. opensearch-py requires a newer version of certifi (certifi>=2022.12.07), which is not supported in Python 2.7. As a result, workflows do not work for some Python versions.

the error is related to the compatibility issue of the certifi package with Python 2.7 when installing opensearch-py. it is recommended to upgrade to a newer version of Python.

@dblock
Copy link
Member

dblock commented Apr 5, 2023

Shall we close this? Anything we can do in the client?

@saimedhi
Copy link
Collaborator

saimedhi commented Apr 5, 2023

Shall we close this? Anything we can do in the client?

We can close this issue. But I just have a doubt. This pr is fixing github actions, but local tests are still not fixed. We need to exclude CI tests for python versions less than 3.6 in nox file. Can we still do that. Or final version of opensearch-dsl-py is already released?

@saimedhi saimedhi closed this as completed Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants