Bug 1896975 - python-sqlobject-3.3.0 does not work for sqlite on python3.9 due to deprecated b64 methods
Summary: python-sqlobject-3.3.0 does not work for sqlite on python3.9 due to deprecate...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sqlobject
Version: 33
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-12 00:22 UTC by Andrei Troie
Modified: 2021-04-24 20:03 UTC (History)
2 users (show)

Fixed In Version: python-sqlobject-3.9.1-1.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-24 19:42:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Simple script to illustrate the issue (109 bytes, text/x-python)
2020-11-12 00:22 UTC, Andrei Troie
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Python 39351 0 None None None 2020-11-12 00:22:04 UTC

Description Andrei Troie 2020-11-12 00:22:05 UTC
Created attachment 1728558 [details]
Simple script to illustrate the issue

Description of problem:
Connecting to a sqlite database with sqlobject 3.3.0 on python3.9 does not work due to deprecated b64.encodestring method being removed.

Version-Release number of selected component (if applicable):
3.3.0-13

How reproducible:


Steps to Reproduce:
1. Install python3.9
2. Install python3-sqlobject
3. Run attached script

Actual results:
Script produces a stack trace complaining about module 'b64' not having any method 'encodestring'

Expected results:
Script should complete successfully. 


Additional info:
The methods 'encodestring' and 'decodestring' in the 'b64' modules have been deprecated since python3.1 and have been removed in python3.9 (see https://bugs.python.org/issue39351). Version 3.3.0 of sqlobject uses these methods in its sqlite module, so connecting to sqlite on python3.9 will not work. 

sqlobject has had quite a few releases since 3.3.0. The issue looks to have been fixed in version 3.4.0 (https://github.com/sqlobject/sqlobject/commit/623a5802b03273b2ef8aa57e6d13dc312f232033#diff-3bce1ac09a6fcef84f0c0ae10137e986b3f69371b796ea40cdbdb126e3327e49R43). So this bug can be easily fixed by upgrading the version of python3-sqlobject to something newer than 3.3.0

Comment 1 Andrei Troie 2020-11-12 15:04:57 UTC
Or maybe an alternate solution, if it's not possible to go to a newer version, is just to patch this version and replace 'encodestring'/'decodestring' with 'encodebytes'/'decodebytes'. The *string methods are just aliases for the *bytes methods anyway.

Comment 2 Peter Lemenkov 2020-12-01 20:34:44 UTC
I think it's better to move up to 3.8.1. We are a bit behind anyway.

Comment 3 Fedora Update System 2021-04-03 19:03:55 UTC
FEDORA-2021-5aab8a8a71 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-5aab8a8a71

Comment 4 Fedora Update System 2021-04-04 01:07:17 UTC
FEDORA-2021-5aab8a8a71 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-5aab8a8a71`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-5aab8a8a71

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-04-24 19:42:23 UTC
FEDORA-2021-5aab8a8a71 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2021-04-24 20:03:16 UTC
FEDORA-2021-5aab8a8a71 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.