Fails in autopkgtest with python3.11

Bug #2003974 reported by Dan Bungert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
crudini (Ubuntu)
Fix Released
Medium
Simon Quigley
openstack-trove (Ubuntu)
Fix Released
Medium
Simon Quigley

Bug Description

openstack-trove currently fails in autopkgtest when triggered with python 3.11, such as seen at https://autopkgtest.ubuntu.com/results/autopkgtest-lunar/lunar/amd64/o/openstack-trove/20230126_012539_e9a11@/log.gz

I believe there are 2 reasons for this failure:

1) Message on stderr related to pipes deprecation

autopkgtest [01:13:15]: test trove-daemons: [-----------------------
/usr/bin/crudini:20: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
  import pipes
autopkgtest [01:13:19]: test trove-daemons: -----------------------]
trove-daemons FAIL non-zero exit status 1
autopkgtest [01:13:20]: test trove-daemons: - - - - - - - - - - results - - - - - - - - - -
autopkgtest [01:13:20]: test trove-daemons: - - - - - - - - - - stderr - - - - - - - - - -
/usr/bin/crudini:20: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
  import pipes

So either fixing the deprecation, suppressing stderr, or adding allow-stderr should suffice.
(Unrelated - I believe this test wants restriction isolation-container)

2) AttributeError: module 'inspect' has no attribute 'getargspec'

When I experimented with adding the allow-stderr restriction, I found that the test still failed.
If one runs the trove-manage db_sync step without redirection outputs to /dev/null, we get some useful info:
+ su -s /bin/sh -c 'python3.11 /usr/bin/trove-manage db_sync' trove
Command failed, please check log for more info.
root [-] Unhandled error: AttributeError: module 'inspect' has no attribute 'getargspec'
root Traceback (most recent call last):
root File "/usr/bin/trove-manage", line 10, in <module>
root sys.exit(main())
root ^^^^^^
root File "/usr/lib/python3/dist-packages/trove/cmd/manage.py", line 390, in main
root Commands().execute()
root File "/usr/lib/python3/dist-packages/trove/cmd/manage.py", line 49, in execute
root args = inspect.getargspec(exec_method)
root ^^^^^^^^^^^^^^^^^^
root AttributeError: module 'inspect' has no attribute 'getargspec'
root
(timestamps trimmed from this log for readability)

Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

This is fixed in the latest crudini 0.9.4 release, so it would be good to update the crudini package in ubuntu

Revision history for this message
Simon Quigley (tsimonq2) wrote :

It seems as if https://github.com/pixelb/crudini/commit/e1650941054822faad4cda788bff6fe364eb4ca3 in crudini would fix the import issue, and according to https://docs.python.org/3.10/library/inspect.html#inspect.getargspec getargspec can be replaced with getfullargspec.

Simon Quigley (tsimonq2)
Changed in crudini (Ubuntu):
assignee: nobody → Simon Quigley (tsimonq2)
importance: Undecided → Medium
status: New → In Progress
status: In Progress → Fix Committed
Simon Quigley (tsimonq2)
Changed in openstack-trove (Ubuntu):
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Simon Quigley (tsimonq2)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openstack-trove - 2:18.0.0+git2023011209.1d8231d3-0ubuntu2

---------------
openstack-trove (2:18.0.0+git2023011209.1d8231d3-0ubuntu2) lunar; urgency=medium

  * Fix test failures with Python 3.11 (LP: #2003974).

 -- Simon Quigley <email address hidden> Mon, 30 Jan 2023 12:50:17 -0600

Changed in openstack-trove (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package crudini - 0.9.3-6ubuntu1

---------------
crudini (0.9.3-6ubuntu1) lunar; urgency=medium

  * Backport upstream patch for Python 3.11 compatibility (LP: #2003974).

 -- Simon Quigley <email address hidden> Mon, 30 Jan 2023 12:26:19 -0600

Changed in crudini (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Patch submitted to upstream trove at https://review.opendev.org/c/openstack/trove/+/879953

Revision history for this message
Corey Bryant (corey.bryant) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.