Bug #9555
closedpython 3 branch syntax errors
0%
Description
A few py2 things sneaked into the py3 branch.
Here's the diff to fix:
[:/projects/chirp.hg] py3(+3/-3) ☿ hg sum parent: 3608:5da559ffde25 Merge pull request #13 from mfncooper/fix_icomciv_set_memory branch: py3 commit: 3 modified update: (current) [:/projects/chirp.hg] py3(+3/-3) ☿ hg diff diff -r 5da559ffde25 chirp/drivers/vx6.py --- a/chirp/drivers/vx6.py Fri Oct 15 16:33:11 2021 -0700 +++ b/chirp/drivers/vx6.py Thu Nov 18 09:37:17 2021 -0700 @@ -871,5 +871,5 @@ elif setting == "password": newval = self._encode_chars(newval, 4) setattr(_settings, setting, newval) - except Exception, e: + except Exception as e: raise diff -r 5da559ffde25 chirp/ui/mainapp.py --- a/chirp/ui/mainapp.py Fri Oct 15 16:33:11 2021 -0700 +++ b/chirp/ui/mainapp.py Thu Nov 18 09:37:17 2021 -0700 @@ -1137,7 +1137,7 @@ query = "http://chirp.danplanet.com/query/rb/1.0/app_direct" \ "?loc=%s&band=%s&dist=%s" % (loc, band, dist) - print query + print(query) # Do this in case the import process is going to take a while # to make sure we process events leading up to this diff -r 5da559ffde25 chirp/ui/memdetail.py --- a/chirp/ui/memdetail.py Fri Oct 15 16:33:11 2021 -0700 +++ b/chirp/ui/memdetail.py Thu Nov 18 09:37:17 2021 -0700 @@ -71,7 +71,7 @@ extra_name = self._name.split("_", 1)[1] LOG.debug('Setting extra %s=%r' % (extra_name, newval)) self._memory.extra[extra_name].value = newval - except settings.InternalError, e: + except settings.InternalError as e: self._errfn(self._name, str(e)) return str(e) else: [:/projects/chirp.hg] py3(+3/-3) ☿
Updated by Anders Knudsen almost 3 years ago
Well. Actually, the py3 branch is littered with py2 constructs... :-/
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/kyd: invalid syntax (kyd.py, line 503)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/radioddity_r2: invalid syntax (radioddity_r2.py, line 614)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/baofeng_common: invalid syntax (baofeng_common.py, line 167)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/retevis_rt23: invalid syntax (retevis_rt23.py, line 849)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ftm350: invalid syntax (ftm350.py, line 281)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ap510: invalid syntax (ap510.py, line 383)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/th_uv8000: invalid syntax (th_uv8000.py, line 1489)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/gmrsuv1: invalid syntax (baofeng_common.py, line 167)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/bjuv55: invalid syntax (bjuv55.py, line 650)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft7100: invalid syntax (ft7100.py, line 571)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/tdxone_tdq8a: invalid syntax (tdxone_tdq8a.py, line 304)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft2d: invalid syntax (ft1d.py, line 1893)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/fd268: invalid syntax (fd268.py, line 793)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft90: invalid syntax (ft90.py, line 335)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/kguv8dplus: invalid syntax (kguv8dplus.py, line 421)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/anytone: invalid syntax (anytone.py, line 180)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/vxa700: invalid syntax (vxa700.py, line 180)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ftm3200d: invalid syntax (ft1d.py, line 1893)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/th7800: invalid syntax (th7800.py, line 539)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/bf-t1: invalid syntax (bf-t1.py, line 228)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft70: invalid syntax (ft70.py, line 1165)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft8100: Missing parentheses in call to 'print'. Did you mean print(self.VARIANT, number, tx_freq, mem.freq)? (ft8100.py, line 178)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/wouxun: invalid syntax (wouxun.py, line 277)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/kguv9dplus: invalid syntax (kguv9dplus.py, line 880)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/kguv8e: invalid syntax (kguv8e.py, line 340)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ts590: invalid syntax (ts590.py, line 1647)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/th_uv3r: invalid syntax (wouxun.py, line 277)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/retevis_rt1: invalid syntax (retevis_rt1.py, line 729)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/anytone_ht: invalid syntax (anytone_ht.py, line 236)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/vgc: invalid syntax (vgc.py, line 1413)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft450d: invalid syntax (ft450d.py, line 502)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/bj9900: invalid syntax (bj9900.py, line 181)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/th9800: invalid syntax (th9800.py, line 601)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft60: invalid syntax (ft60.py, line 406)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/baofeng_uv3r: invalid syntax (baofeng_uv3r.py, line 54)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/radtel_t18: invalid syntax (radtel_t18.py, line 481)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/kguv8d: invalid syntax (kguv8d.py, line 379)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/kyd_IP620: invalid syntax (kyd_IP620.py, line 184)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/rfinder: invalid syntax (rfinder.py, line 243)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/thuv1f: invalid syntax (thuv1f.py, line 217)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft2800: invalid syntax (ft2800.py, line 204)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ts480: invalid syntax (ts480.py, line 1141)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/retevis_rt21: invalid syntax (retevis_rt21.py, line 564)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/lt725uv: invalid syntax (lt725uv.py, line 1396)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/th9000: invalid syntax (th9000.py, line 355)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ts2000: Missing parentheses in call to 'print'. Did you mean print("Bug: unsupported duplex `%s'" % mem.duplex)? (ts2000.py, line 220)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/baofeng_wp970i: invalid syntax (baofeng_common.py, line 167)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/rh5r_v2: Missing parentheses in call to 'print'. Did you mean print(MEM_FORMAT)? (rh5r_v2.py, line 170)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/tk760: 'float' object cannot be interpreted as an integer
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft1d: invalid syntax (ft1d.py, line 1893)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/uv5x3: invalid syntax (baofeng_common.py, line 167)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/thd72: invalid syntax (thd72.py, line 584)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/uv6r: invalid syntax (baofeng_common.py, line 167)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/th_uv3r25: invalid syntax (wouxun.py, line 277)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft2900: invalid syntax (ft2900.py, line 540)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/tk760g: invalid syntax (tk760g.py, line 910)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ts850: 'dict' object has no attribute 'iteritems'
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/retevis_rt22: invalid syntax (retevis_rt22.py, line 608)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/retevis_rt26: invalid syntax (retevis_rt26.py, line 900)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/tk270: 'float' object cannot be interpreted as an integer
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/alinco: invalid syntax (alinco.py, line 202)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/leixen: invalid syntax (leixen.py, line 264)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/ft50: invalid syntax (ft50.py, line 589)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/puxing_px888k: can only concatenate list (not "range") to list
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/puxing: invalid syntax (puxing.py, line 50)
Failed to import /nvme2/projects/chirp.hg/chirp/drivers/mursv1: invalid syntax (baofeng_common.py, line 167)
Updated by Dan Smith about 2 years ago
- Status changed from New to Rejected
The py3 branch started from the py2 one and is slowly being converted (syntax and otherwise). See the py3 branch in github for the latest.