Project

General

Profile

Actions

Bug #14263

closed

wsdiff: replace some deprecated python methods

Added by Andy Fiddaman 10 days ago. Updated 5 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

wsdiff uses deprecated methods that are producing warnings with python 3.10

/data/omnios-build/omniosorg/bloody/illumos/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/wsdiff:826: DeprecationWarning: getName() is deprecated, get the name attribute instead
  tmpFile1 = tmpDir1 + os.path.basename(f1) + t.getName()
/data/omnios-build/omniosorg/bloody/illumos/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/wsdiff:827: DeprecationWarning: getName() is deprecated, get the name attribute instead
  tmpFile2 = tmpDir2 + os.path.basename(f2) + t.getName()
/data/omnios-build/omniosorg/bloody/illumos/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/wsdiff:825: DeprecationWarning: currentThread() is deprecated, use current_thread() instead
  t = threading.currentThread()

threading.current_thread() has been available since Python 2.6, the name attribute too.

Actions #1

Updated by Andy Fiddaman 10 days ago

  • Subject changed from Update some deprecated python methods to wsdiff: replace some deprecated python methods
Actions #2

Updated by Andy Fiddaman 10 days ago

  • Description updated (diff)
Actions #3

Updated by Andy Fiddaman 10 days ago

Tested running the updated wsdiff using python 3.9, 3.10 and 2.7

Actions #4

Updated by Electric Monk 10 days ago

  • Gerrit CR set to 1824
Actions #5

Updated by Andy Fiddaman 9 days ago

I've also tested this on OpenIndiana using Python 2.7 and Python 3.5

Actions #6

Updated by Electric Monk 5 days ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit a2e1144ad94de08080f8d22a0e22ef8fa80633a4

commit  a2e1144ad94de08080f8d22a0e22ef8fa80633a4
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2021-11-29T19:06:14.000Z

    14263 wsdiff: replace some deprecated python methods
    Reviewed by: Rich Lowe <richlowe@richlowe.net>
    Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
    Reviewed by: Sebastian Wiedenroth <wiedi@frubar.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF