You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overview:
Migrate the entire codebase of radproc from Python 2 to modern Python 3 (>=3.8 recommended). This will ensure ongoing support, compatibility with widely used libraries (numpy, pandas, etc), and improved maintainability.
Migration Tasks
Update setup.py to support Python 3 only (add python_requires, modernize classifiers)
Remove all from __future__ import division, print_function statements (now default in Python 3)
Review and update all iteration methods (e.g. .iteritems(), .itervalues(), .iterkeys() → .items(), .values(), .keys())
Replace any basestring/unicode with str and check string/byte conversions ("u''" → no longer needed)
Verify and update file I/O for bytes/str issues, especially in binary/gzip/tar/HDF5 reads
Ensure all usage of print functions are Python 3 compatible print()
Update any exceptions for new syntax (except Exception as e: vs except Exception, e:)
Remove/update any other obsolete Python 2 idioms
Confirm all dependencies support Python 3 and update requirements.txt if needed
Migrate GIS workflow from ArcMap arcpy syntax to ArcGIS Pro arcpy
Run all unit/integration tests under Python 3.8+ and fix incompatibilities
Update documentation (README, docstrings, etc.) to reflect Python 3 as required
Examples of Code Updates:
Update classifiers and python_requires in setup.py:
# Replace Python 2 classifiers: # 'Programming Language :: Python :: 2',# 'Programming Language :: Python :: 2.7',# With Python 3 classifiers, and add python_requires:setup(
...
python_requires='>=3.8',
classifiers=[
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
...
],
...
)
Remove future imports:
# Remove these imports:from __future__ importdivision, print_function
Update dictionary iteration:
# Python 2 style:# for k, v in d. iteritems():# Python 3 style:fork, vind.items():
Overview:
Migrate the entire codebase of
radprocfrom Python 2 to modern Python 3 (>=3.8 recommended). This will ensure ongoing support, compatibility with widely used libraries (numpy, pandas, etc), and improved maintainability.Migration Tasks
setup.pyto support Python 3 only (add python_requires, modernize classifiers)from __future__ import division, print_functionstatements (now default in Python 3).iteritems(),.itervalues(),.iterkeys()→.items(),.values(),.keys())basestring/unicodewithstrand check string/byte conversions ("u''" → no longer needed)print()except Exception as e:vsexcept Exception, e:)requirements.txtif neededExamples of Code Updates:
Update classifiers and python_requires in
setup.py:Remove future imports:
Update dictionary iteration:
Print function:
String/byte distinction:
Type checks:
Optional improvements:
f-stringsfor formattingpathlib.Pathfor file operations instead of string pathsAcceptance criteria:
References: