[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH 02/12] Fixes fake.py 'packet' import for Python 3.
From: |
Fred Wright |
Subject: |
[gpsd-dev] [PATCH 02/12] Fixes fake.py 'packet' import for Python 3. |
Date: |
Fri, 8 Apr 2016 10:07:43 -0700 |
This changes the import of the 'packet' module to be an explicit
relative import, which is valid in both Python2 and Python 3. The old
implicit relative import doesn't work in Python 3.
TESTED:
Ran "scons build-all check" (with Python 2.7). Also verified that the
regression tests and test_maidenhead.py run with Python 2.6, and that
gpsfake -T and test_maidenhead.py run with Python 3 when the
extensions are built for Python 3 (not yet a build option).
---
gps/fake.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gps/fake.py b/gps/fake.py
index a4ca01f..7041dda 100644
--- a/gps/fake.py
+++ b/gps/fake.py
@@ -74,7 +74,7 @@ from __future__ import print_function, division
import os, sys, time, signal, pty, termios # fcntl, array, struct
import threading, socket, select
import gps
-import packet as sniffer
+from . import packet as sniffer
import stat
# The magic number below has to be derived from observation. If
--
2.8.0
- [gpsd-dev] Python 3 Updates, Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 01/12] Fixes Python C extensions for Python 3 compatibility., Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 02/12] Fixes fake.py 'packet' import for Python 3.,
Fred Wright <=
- [gpsd-dev] [PATCH 04/12] Fixes xgps for Python 3., Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 05/12] Fixes a client.py exception for Python 3., Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 06/12] Fixes Gtk warnings related to xgps/xgpsspeed error boxes., Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 07/12] Changes type checks in misc.py:isotime to use isinstance()., Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 03/12] Forces Python 3 import behavior in all gps/* modules., Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 09/12] Fixes gpscat and test_maidenhead.py for Python 3., Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 08/12] Removes unnecessary Unicode literal from xgps., Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 10/12] Fixes fake.py and gpsfake for Python 3., Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 12/12] Removes redundant polystr/polybytes defs from client.py., Fred Wright, 2016/04/08
- [gpsd-dev] [PATCH 11/12] Adds "target Python" support to SConstruct., Fred Wright, 2016/04/08