Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1790706 - python-txws: Fix Python 3.9 compatibility
Summary: python-txws: Fix Python 3.9 compatibility
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-txws
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39 1790701
TreeView+ depends on / blocked
 
Reported: 2020-01-14 00:24 UTC by Charalampos Stratakis
Modified: 2020-02-10 21:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-10 21:58:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github MostAwesomeDude txWS pull 34 0 None open Remove deprecated usage of array.tostring() 2020-02-10 18:49:45 UTC

Description Charalampos Stratakis 2020-01-14 00:24:16 UTC
python-txws code is not compatible with Python 3.9

More specifically the tostring() method was removed (which was an alias to the tobytes()).

While the package compiles successfully, code that uses it fail with a traceback.

A minimal fix is required to fix that:

diff --git a/txws.py b/txws.py
index 7de92a4..b81a274 100644
--- a/txws.py
+++ b/txws.py
@@ -214,7 +214,7 @@ def mask(buf, key):
     buf = array.array("B", buf)
     for i in range(len(buf)):
         buf[i] ^= key[i % 4]
-    return buf.tostring()
+    return buf.tobytes()
 
 def make_hybi07_frame(buf, opcode=0x1):
     """


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