Bug 221842 - [Python-3] base64.encodestring is deprecated
Summary: [Python-3] base64.encodestring is deprecated
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords: InRadar
Depends on:
Blocks: 221815
  Show dependency treegraph
 
Reported: 2021-02-12 13:37 PST by Don Olmstead
Modified: 2021-02-12 15:50 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.37 KB, patch)
2021-02-12 15:01 PST, Don Olmstead
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2021-02-12 13:37:27 PST
base64.encodestring has been deprecated since 3.1. In 3.8 it is an alias of encodebytes. It is completely removed in 3.9.

Found when running tests on Windows

[1480/1658] webkitpy.w3c.wpt_github_unittest.WPTGitHubTest.test_auth_token erred:

  Traceback (most recent call last):
    File "C:\webkit\Tools\Scripts\webkitpy\w3c\wpt_github_unittest.py", line 50, in test_auth_token
      string_utils.decode(base64.encodestring(string_utils.encode('rutabaga:decafbad')), target_type=str).strip())
  AttributeError: module 'base64' has no attribute 'encodestring'
Comment 1 Don Olmstead 2021-02-12 15:01:30 PST
Created attachment 420184 [details]
Patch
Comment 2 EWS 2021-02-12 15:50:00 PST
Committed r272820: <https://commits.webkit.org/r272820>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 420184 [details].
Comment 3 Radar WebKit Bug Importer 2021-02-12 15:50:15 PST
<rdar://problem/74296121>