Ticket #792 (closed enhancement: fixed)

Opened 10 years ago

Last modified 9 years ago

Use Python new-style classes

Reported by: fpierfed Owned by: daues
Priority: normal Milestone:
Component: pex_harness Keywords:
Cc: RayPlante, jbecla, srp, smm Blocked By:
Blocking: Project: LSST
Version Number:
How to repeat:

not applicable

Description

Would it be possible to use Python's new-style classes in pex_harness instead of the deprecated old-style (classic) classes?

Background info: http://www.python.org/doc/newstyle/

Note that classic classes are gone in Python 3 (http://docs.python.org/3.0/whatsnew/3.0.html).

The only change needed is to add object as the class superclass.

Change History

comment:1 Changed 10 years ago by daues

  • Status changed from new to assigned

I will read over the background documentation and look into the migration process; perhaps we can get it switched for DC3b. We definitely do not want to be dead in the water when the time comes to upgrade to Python 3.

comment:2 Changed 10 years ago by ktl

  • Cc RayPlante, jbecla, srp, smm added

Other old-style classes used in the LSST code:

./base/python/lsstimport.py:class LSSTImporter:
./base/python/lsstimport.py:class LSSTLoader:
./cat/python/lsst/cat/MySQLBase.py:class MySQLBase:
./cat/python/lsst/cat/policyReader.py:class PolicyReader:
./pex/harness/python/lsst/pex/harness/Clipboard.py:class Clipboard:
./pex/harness/python/lsst/pex/harness/Slice.py:class Slice:
./pex/harness/python/lsst/pex/harness/Stage.py:class Stage:
./pex/harness/python/lsst/pex/harness/Queue.py:class Queue:
./pex/harness/python/lsst/pex/harness/Directories.py:class Directories:
./pex/harness/python/lsst/pex/harness/Pipeline.py:class Pipeline:
./pex/harness/python/lsst/pex/harness/SimpleStageTester.py:class SimpleStageTester:
./pex/harness/examples/StageRunner.py:class StageRunner:
./ctrl/orca/python/lsst/ctrl/orca/provenance/Provenance.py:class Provenance:
./ctrl/orca/python/lsst/ctrl/orca/dbservers/DatabaseConfigurator.py:class DatabaseConfigurator:
./ctrl/orca/python/lsst/ctrl/orca/pipelines/PipelineManager.py:class PipelineManager:
./ctrl/orca/python/lsst/ctrl/orca/EnvString.py:class EnvString:
./ctrl/orca/python/lsst/ctrl/orca/EventMonitor.py:class EventMonitor:
./ctrl/orca/python/lsst/ctrl/orca/Directories.py:class Directories:
./ctrl/orca/python/lsst/ctrl/orca/NamedClassFactory.py:class NamedClassFactory:
./ctrl/orca/python/lsst/ctrl/orca/ProductionRunManager.py:class ProductionRunManager:
./meas/pipeline/python/lsst/meas/pipeline/SourceClassificationStage.py:    class _Classifier:
./meas/pipeline/python/lsst/meas/pipeline/SourceClassifier.py:class SourceClassifier:

comment:3 Changed 9 years ago by ktl

  • Status changed from assigned to closed
  • Resolution set to fixed

I fixed all of the ones that had not yet been fixed. cat [15328], base [15329], pex_harness [15330], ctrl_orca [15331].

Note: See TracTickets for help on using tickets.