oauth.py uses cgi.parse_qs which isn't available anymore

Bug #1883875 reported by Alberto Donato
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-oauth (Ubuntu)
Incomplete
Undecided
Unassigned
Focal
Confirmed
Undecided
Unassigned
Groovy
Incomplete
Undecided
Unassigned

Bug Description

python-oauth uses cgi.parse_qs, which was deprecated in python3 (in favor of the urllib equivalent), and is no longer available in python 3.8.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: python3-oauth 1.0.1-6ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-29.33-generic 5.4.30
Uname: Linux 5.4.0-29-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.2
Architecture: amd64
CasperMD5CheckResult: skip
Date: Wed Jun 17 10:51:57 2020
Dependencies:

PackageArchitecture: all
SourcePackage: python-oauth
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Alberto Donato (ack) wrote :
description: updated
Revision history for this message
Paride Legovini (paride) wrote :

Thanks Alberto. The library is not in a very nice shape, with no upstream development for more than 11 years and the python3 module being auto-generated with 2to3. Apparently 2to3 doesn't handle switching cgi.parse_qs to the urllib equivalent.

Currently python-oauth and python3-oauth have no reverse dependencies in the archive, at least in Focal and Groovy, so I wonder if we still want the package in the archive. There are probably reasons for which we do, given that you hit this bug and doko restored the python-oauth binary package in 1.0.1-6ubuntu1 mentioning in the changelog that it's still needed. The reasons are however not clear to me.

Can we consider dropping the package from the archive in Groovy?

Changed in python-oauth (Ubuntu Focal):
status: New → Confirmed
Changed in python-oauth (Ubuntu Groovy):
status: New → Incomplete
Revision history for this message
Adam Collard (adam-collard) wrote :

https://git.launchpad.net/~ubuntu-core-dev/ubuntu-seeds/+git/platform/tree/supported-maas?h=focal#n52

It's needed for MAAS, Alberto hit this bug whilst looking to update MAAS to a Focal (core20) base.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

FWIW, there's a pending request to remove python-oauth from the archives at #1118815.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Hi Adam,

Interesting. Given that Focal ships Python 3.8, how do you guys make python-oauth work?

Thanks!

Revision history for this message
Alberto Donato (ack) wrote :

@Paride @Sergio, we're getting rid of python-oauth uses in MAAS, so there's no blocker on our side for the focal RM.

Revision history for this message
Alberto Donato (ack) wrote :

(Sorry I meant groovy RM)

Revision history for this message
José Pekkarinen (koalinux) wrote :

the python maas cli hits this for dns-ha, the fix is quite straight
forward as now parse_qs comes from urllib.parse, instead of cgi,
changing the calls to use this package will fix it.

José.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Hi José, is the cli in question python-libmaas?

If so, this has been switched to oauthlib in

https://github.com/maas/python-libmaas/commit/e2660f5e4b560eced243dc295976ea6fe1d3bfdd

and it should be OK to remove python-oauth in jammy from this perspective, right?

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

I will start pushing this forward in https://bugs.launchpad.net/ubuntu/+source/python-oauth/+bug/1118815 since there are no objections here and MAAS seems to no longer use python-oauth

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.