Convert Python examples to accept both python 2 and python 3

Bug #1849961 reported by Seth Hillbrand
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Unknown

Bug Description

The following scripts need to be converted to allow both Python 2 and 3

pcbnew/python/examples/createFPC40.py
scripts/ddr3_length_match.py
scripts/test_plugin.py
scripts/lib_convert.py
scripts/test_kicad_plugin.py

Tags: python
Revision history for this message
eelik (eelik) wrote :

It's possible that at lest those in scripts/ are already python3 compatible. Running 2to3 (see the python documentation) reveals only print function related possible changes. "from __future__ import print_function" tells that somebody wanted to make them compatible with both 2 and 3.

Revision history for this message
eelik (eelik) wrote :

RefactoringTool: No changes to createFPC40.py

Revision history for this message
eelik (eelik) wrote :

Actually "futurize" is a better tool. It makes scripts compatible with both 2 and 3. 2to3 migrates from 2 to 3. But "__future__" found in the files is a hint about compatibility anyways. Futurize seems to want to make some changes but it doesn't necessarily mean that scripts wouldn't work in their current condition.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/1822

Changed in kicad:
status: Triaged → Expired
Changed in kicad:
importance: Medium → Unknown
status: Expired → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.