Skip to content

Jenkins using new python versions in the matrix - #1174

Merged
weideng1 merged 14 commits into
masterfrom
jenkins-new-python
Aug 28, 2023
Merged

Jenkins using new python versions in the matrix#1174
weideng1 merged 14 commits into
masterfrom
jenkins-new-python

Conversation

@weideng1

Copy link
Copy Markdown
Contributor

No description provided.

Comment threadtest-requirements.txt Outdated
Comment threadJenkinsfile Outdated
Comment threadJenkinsfile Outdated
@absurdfarce

absurdfarce commented Aug 25, 2023

Copy link
Copy Markdown
Contributor

Problem reported by @weideng1 when trying to use the approach above (install ccm normally, then update PyYAML after the fact) with 3.11.x Python versions:

$ pipinstall"pyyaml<6.0"Collectingpyyaml<6.0UsingcachedPyYAML-5.4.1.tar.gz (175kB) Installingbuilddependencies ... doneGettingrequirementstobuildwheel ... errorerror: subprocess-exited-with-error × Gettingrequirementstobuildwheeldidnotrunsuccessfully. │ exitcode: 1 ╰─> [68linesofoutput] /tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecatedconfigin`setup.cfg` !! ********************************************************************************Thelicense_fileparameterisdeprecated, uselicense_filesinstead. By2023-Oct-30, youneedtoupdateyourprojectandremovedeprecatedcallsoryourbuildswillnolongerbesupported. Seehttps://setuptools.pypa.io/en/latest/userguide/declarative_config.htmlfordetails.******************************************************************************** !! parsed=self.parsers.get(option_name, lambdax: x)(value) runningegg_infowritinglib3/PyYAML.egg-info/PKG-INFOwritingdependency_linkstolib3/PyYAML.egg-info/dependency_links.txtwritingtop-levelnamestolib3/PyYAML.egg-info/top_level.txtTraceback (mostrecentcalllast): File"/home/automaton/no-previous-cython-venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line353, in<module>main() File"/home/automaton/no-previous-cython-venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line335, inmainjson_out['return_val'] =hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/automaton/no-previous-cython-venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line118, inget_requires_for_build_wheelreturnhook(config_settings)
^^^^^^^^^^^^^^^^^^^^^File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line355, inget_requires_for_build_wheelreturnself._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line325, in_get_build_requiresself.run_setup()
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line341, inrun_setupexec(code, locals())
File"<string>", line271, in<module>File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line107, insetupreturndistutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line185, insetupreturnrun_commands(dist)
^^^^^^^^^^^^^^^^^^File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line201, inrun_commandsdist.run_commands()
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line969, inrun_commandsself.run_command(cmd)
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/dist.py", line1233, inrun_commandsuper().run_command(command)
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line988, inrun_commandcmd_obj.run()
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line319, inrunself.find_sources()
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line327, infind_sourcesmm.run()
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line549, inrunself.add_defaults()
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line587, inadd_defaultssdist.add_defaults(self)
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line113, inadd_defaultssuper().add_defaults()
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line251, inadd_defaultsself._add_defaults_ext()
File"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line336, in_add_defaults_extself.filelist.extend(build_ext.get_source_files())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"<string>", line201, inget_source_filesFile"/tmp/pip-build-env-sqpvlw_j/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line107, in__getattr__raiseAttributeError(attr)
AttributeError: cython_sources
[endofoutput]
note: Thiserrororiginatesfromasubprocess, andislikelynotaproblemwithpip.
error: subprocess-exited-with-error
× Gettingrequirementstobuildwheeldidnotrunsuccessfully.
│ exitcode: 1
╰─>Seeaboveforoutput.
note: Thiserrororiginatesfromasubprocess, andislikelynotaproblemwithpip.

Underlying problem here appears to be the same as that described in yaml/pyyaml#601. PyYAML itself uses cython and it looks like certain versions of cython don't correctly hook into the build infrastructure. The workaround suggested there appears to work, at least with 3.11.x:

$ pipinstall"Cython<3.0""pyyaml<6.0"--no-build-isolationCollectingCython<3.0ObtainingdependencyinformationforCython<3.0fromhttps://files.pythonhosted.org/packages/43/c9/4c8a84731c0948b408d059c2c17c95cbb8b9c2baefe1c6985c0b29a9055e/Cython-0.29.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.metadataDownloadingCython-0.29.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.metadata (3.1kB)
Collectingpyyaml<6.0DownloadingPyYAML-5.4.1.tar.gz (175kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1kB5.8MB/seta0:00:00Preparingmetadata (pyproject.toml) ... doneDownloadingCython-0.29.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9MB49.7MB/seta0:00:00Buildingwheelsforcollectedpackages: pyyamlBuildingwheelforpyyaml (pyproject.toml) ... doneCreatedwheelforpyyaml: filename=PyYAML-5.4.1-cp311-cp311-linux_x86_64.whlsize=45658sha256=53aa5944120645f9f03c4edd882ca0be069c7125935c64919305d9e285cd9625Storedindirectory: /home/automaton/.cache/pip/wheels/2f/2f/af/a062a8f866dc44812a825da11175d50d7f255900f3b38c79b5SuccessfullybuiltpyyamlInstallingcollectedpackages: pyyaml, CythonSuccessfullyinstalledCython-0.29.36pyyaml-5.4.1
$ python-VPython3.11.5

Note that you'll also have to install the wheel package in order to avoid complaints about "bdist_wheel" missing on install:

pipinstallwheel

You should install wheel before trying to build the PyYAML package.

@weideng1

Copy link
Copy Markdown
ContributorAuthor

Thanks Bret for the latest investigation. Your suggested workaround did solve the ccm installation issue. Please review the latest commit and approve. I'll then run Jenkins tests using master branch.

@absurdfarceabsurdfarce left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, this looks good to me. Only one small (and not really required) comment about documenting the weirdness with older PyYAML < 6.0 installs on Python 3.x but otherwise I think we're good here.

Comment threadJenkinsfile
pip install --upgrade pip
pip install -U setuptools
pip install wheel
pip install "Cython<3.0" "pyyaml<6.0" --no-build-isolation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding a short comment here about why this command is being invoked this way

Comment threadJenkinsfile

sh label: 'Install unit test modules', script: '''#!/bin/bash -lex
pip install nose-ignore-docstring nose-exclude service_identity
pip install pynose nose-ignore-docstring nose-exclude service_identity

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, interesting find! It's at least a better short-term bridge until we can get onto pytest

@weideng1
weideng1 merged commit 8ba0a5c into masterAug 28, 2023
@weideng1
weideng1 deleted the jenkins-new-python branch August 28, 2023 21:45
fruch added a commit to fruch/python-driver that referenced this pull request Jun 6, 2024
…sync_with_upstream_3.29.1
version 3.29.0
* tag '3.29.0' of https://github.com/datastax/python-driver:
Documentation (and other) updates for 3.29.0 (apache#1194)
PYTHON-1331 ssl.match_hostname() is deprecated in 3.7 (apache#1191)
PYTHON-1371 Add explicit exception type for serialization failures (apache#1193)
Remove outdated Python pre-3.7 references (apache#1186)
PYTHON-1368 Avoid installing DSE deps + executing DSE tests for Python 3.12 (apache#1188)
PYTHON-1366 Handle removal of asyncore in Python 3.12 (apache#1187)
Removed backup(.bak) files (apache#1185)
docs: Fix typo in add_callbacks (apache#1177)
Remove some remnants of Python2 (apache#1172)
PYTHON-1313 Fix asyncio removals in Python 3.10 (apache#1179)
PYTHON-1364 Fix ssl.wrap_socket errors (from eventlet) for Python 3.12 (apache#1181)
Add Jenkins support for Python 3.12.0 (apache#1180)
Update redirects in docs.yaml (apache#1178)
Jenkins using new python versions in the matrix (apache#1174)
Update docs.yaml to point to most recent 3.28.0 docs changes
CONN-38 Notes for 3.28.0 on PYTHON-1350 (apache#1167)
Include docs for 3.28.0
Fixed non-valid rst in README
Sign up for freeto 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.

2 participants

@weideng1@absurdfarce