| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Found a bug. Variable steam s/b stream.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
We have to support Python 2 for a bit longer.
|
|
|
|
| |
So gps/client crashes on a failed connection.
|
| |
|
|
|
|
| |
The reconnect patch lost host and port.
|
| |
|
|
|
|
|
|
| |
Whoops, the auto reconnect patch broke scons check.
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
|
|
|
| |
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 2, 'bytes' and 'str' are synonyms, but in Python 3 they are
not. Since the client may return binary data in some cases, 'bytes'
is a more appropriate data type. Rather than requiring double
conversions in this case (the socket returns 'bytes'), this adds an
alternative response item which is typed as 'bytes'.
Although the accessor method 'data()' has always existed, it's
shadowed by a name collision in some cases, resulting in the
requirement that the caller access the 'response' item directly (as
noted in the documentation). Thus, it's not possible to avoid the
conversion to 'str' in the cases where it isn't actually used.
This change doesn't bother to add an accessor method for 'bresponse',
for consistency with the way the API is normally used, though that
should be fixed if this aspect of the API is ever cleaned up.
TESTED:
Ran "scons check" on OSX with all supported versions of Python.
|
|
|
|
|
|
| |
TESTED:
Ran "scons check". Note that this doesn't test the actual change,
since the exception in question is only used in certain error cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although this isn't strictly a Python 3 requirement, using the
new-style class definition syntax improves consistency between Python
2 and Python 3. Old-style classes have been deprecated since Python
2.2, but many such definitions linger on. Python 3 eliminates
old-style classes, but instead of complaining about old-style
definitions, it simply unconditionally and silently makes all classes
new-style. The only incompatible differences are quite subtle and
rarely matter in practice, but things are more consistent across
versions if the new-style definitions are used.
Also, the preferred method for subclasses to invoke parent init
methods is via the super() construct, which is only available with
new-style classes. Using super() is especially useful with multiple
inheritance, which it handles automatically (provided that the init
methods have compatible signatures).
TESTED:
Ran "scons build-all check valgrind-audit", as well as gegps, gpscat,
gpsprof, xgps, and xgpsspeed, with all six supported Python versions
(except 2.6 for xgps*).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the "future import" statements consistently specify
absolute_import, print_function, and division, for maximum consistency
between Python 2 and Python 3. Although absolute_import is probably a
don't care for top-level programs, if unit tests were ever implemented
for the programs they would be imported as modules, making the module
import behavior relevant.
Note that previous Python 3 fixes are a prerequisite for this change.
Also makes the "polyglot comment" consistent across sources.
TESTED:
Using a version of SConstruct patched to use the target Python for
build helpers, ran "scons build-all check valgrind-audit
www/hardware.html" with all six supported Python versions. Also ran
gegps, gpscat, gpsprof, xgps, and xgpsspeed with both Python 2 and
Python 3.
|
|
|
|
|
| |
TESTED:
Ran "scons check" with both Python 2 and Python 3.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 3, exception objects are local to the try/except block,
making them inaccessible outside that block. It was probably actually
an error to set the "message" to be the exception object rather than
its string representation, anyway.
TESTED:
Ran xgps without gpsd running, and verified that the proper error box
is displayed, in both Python 2 and Python 3 (with appropriate builds
of the extensions).
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures that any future changes that accidentally rely on the
Python 2 implicit relative import behavior will fail in Python 2 as
well as 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).
|
|
|
|
| |
Thanks to Fred Wright for locating the trouble spot.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an entire 4K buffer of packet data contains no newlines, it's
simply retained for future use. But the code was failing to clear the
previous response in that case, causing the caller to see duplicate
data.
Since this bug only mattered with lines longer than 4K bytes, and
since even then it varied as a function of the alignment of lines
vs. 4K boundaries, it was never seen on previous regression tests.
TESTED:
Ran "scons build-all check" with the updated code and the corrected
test data for RTCM3.2.
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Verified by testing gpsprof under both versions. leapecond.py is also OK.
Not yet polyglot: gegps, gpscap.py, gpscat, gpsfake, jsongen.py, maskaudit.py,
test_maidenhead.py, valgrind_audit.py, xgps, xgpsspeed.
|
|
|
|
|
| |
large scale autopep8 cleanup of several
pep8 whitespace warnings
|
| |
|
| |
|
|
|
|
| |
All regression tests pass. PPS is live.
|
| |
|
|
|
|
| |
All regression tests pass.
|
| |
|
|
|
|
| |
All regression tests pass. PPS is live in both gpsd and gpsmon.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We're not bumping the minor API number because the C library has had
this all along. Alas, it can't be made to fit the RAII model of the
C++ binding.
All regression tests pass.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This turned out to cause mike_t's bug with doubling of backslashes - praobably
doue to a subtle bug in the Python encode feature. And it seems not to be
necessary, as Python doesn't notice the difference between plain and Unicode
strings unless they contain Unicode.
Has the nice effect of simplifying the Python client code. The only place
decoding to ASCII is now done is where a C extension needs it.
|
| |
|
| |
|
| |
|