Skip to content

Conversation

@StarkillerX42
Copy link

I've been working on this for a while and have tested it using all the if name == 'main' tests I could. I used 2to3-3.7 for most changes, and the rest of the issues were resolved by hand. Notable changes include:

  • Imports like from . import lib fail if lib (file) and lib.lib (class in file) have the same name. CtxMenu is a good example. To resolve this, imports were changed to from .lib import lib since that seemed to be a low impact solution.

  • six.moves and future imports were removed by 2to3-3.7, which doesn't seem to conflict with the design goal of python3-only compatibility.

  • Some other import conflicts like collections.UserString were fixed by hand.

I'm still working on fixing the mistake I made with the BuildForLinux PR on stui, but I have tested this with a python3 version of stui based on the BuildForLinux branch and it runs well. Unlike that PR, this one isn't on the master branch.

Dylan Gatlin added 6 commits February 11, 2020 00:37
…thon3

# Conflicts:
#	python/RO/AddCallback.py
#	python/RO/Alg/IDGen.py
#	python/RO/Alg/ListPlus.py
#	python/RO/Alg/MultiDict.py
#	python/RO/Alg/MultiListIter.py
#	python/RO/Alg/OrderedDict.py
#	python/RO/Alg/RandomWalk.py
#	python/RO/Astro/Cnv/GeoFromICRS.py
#	python/RO/Astro/Cnv/ICRSFromFixedFK4.py
#	python/RO/Astro/llv/euler.py
#	python/RO/Astro/llv/mappa.py
#	python/RO/Astro/llv/nut.py
#	python/RO/Astro/llv/prec.py
#	python/RO/CanvasUtil.py
#	python/RO/Comm/BrowseURL.py
#	python/RO/Comm/FTPGet.py
#	python/RO/Comm/Generic.py
#	python/RO/Comm/HTTPGet.py
#	python/RO/Comm/HubConnection.py
#	python/RO/Comm/TCPConnection.py
#	python/RO/Comm/TkSerial.py
#	python/RO/Comm/TkSocket.py
#	python/RO/Comm/VMSTelnet.py
#	python/RO/Constants.py
#	python/RO/DS9.py
#	python/RO/InputCont.py
#	python/RO/KeyDispatcher.py
#	python/RO/KeyVariable.py
#	python/RO/ParseMsg/GetString.py
#	python/RO/Prefs/PrefEditor.py
#	python/RO/Prefs/PrefVar.py
#	python/RO/Prefs/PrefWdg.py
#	python/RO/SQLUtil.py
#	python/RO/ScriptRunner.py
#	python/RO/SeqUtil.py
#	python/RO/StringUtil.py
#	python/RO/TkUtil.py
#	python/RO/Wdg/BalloonHelp.py
#	python/RO/Wdg/Bindings.py
#	python/RO/Wdg/Button.py
#	python/RO/Wdg/ChangedIndicator.py
#	python/RO/Wdg/Checkbutton.py
#	python/RO/Wdg/CmdWdg.py
#	python/RO/Wdg/CtxMenu.py
#	python/RO/Wdg/DropletApp.py
#	python/RO/Wdg/DropletRunner.py
#	python/RO/Wdg/Entry.py
#	python/RO/Wdg/FTPLogWdg.py
#	python/RO/Wdg/GrayImageDispWdg.py
#	python/RO/Wdg/Gridder.py
#	python/RO/Wdg/HTTPGetWdg.py
#	python/RO/Wdg/HistoryMenu.py
#	python/RO/Wdg/InputContFrame.py
#	python/RO/Wdg/InputContPresetsWdg.py
#	python/RO/Wdg/InputDialog.py
#	python/RO/Wdg/IsCurrentMixin.py
#	python/RO/Wdg/Label.py
#	python/RO/Wdg/LogWdg.py
#	python/RO/Wdg/Menubutton.py
#	python/RO/Wdg/OptionButtons.py
#	python/RO/Wdg/OptionMenu.py
#	python/RO/Wdg/OptionPanelControl.py
#	python/RO/Wdg/PatchedCanvas.py
#	python/RO/Wdg/PathWdg.py
#	python/RO/Wdg/ProgressBar.py
#	python/RO/Wdg/PythonTk.py
#	python/RO/Wdg/PythonWdg.py
#	python/RO/Wdg/RadiobuttonSet.py
#	python/RO/Wdg/ResizableRect.py
#	python/RO/Wdg/ScriptWdg.py
#	python/RO/Wdg/ScrolledWdg.py
#	python/RO/Wdg/SeverityMixin.py
#	python/RO/Wdg/Sound.py
#	python/RO/Wdg/StatusBar.py
#	python/RO/Wdg/StatusConfigGridder.py
#	python/RO/Wdg/StripChartWdg.py
#	python/RO/Wdg/Text.py
#	python/RO/Wdg/Toplevel.py
#	python/RO/Wdg/WdgPrefs.py
#	tests/Comm/testTkSocket.py
#	tools/eventlogger.py
#	tools/keysym.py
#	tools/serialterm.py
#	tools/tcpclient.py
@r-owen
Copy link
Collaborator

r-owen commented Mar 3, 2020

Thanks for doing this. Another change to consider is to make OrderedDict an alias to dict:

OrderedDict = dict

because in Python 3.7 all dicts are ordered.

…have its own methods like _CheckIntegrity for tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants