gpsd-commit-watch
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-commit-watch] [SCM] GPSD branch, master, updated. release-3.16-254


From: Eric S. Raymond
Subject: [gpsd-commit-watch] [SCM] GPSD branch, master, updated. release-3.16-254-gd550527
Date: Sat, 09 Apr 2016 08:39:21 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GPSD".

The branch, master has been updated
       via  d5505276c450656377e54fa809246f92036f3746 (commit)
       via  94cb114147898af567556a6ca12bf7184bf9d85a (commit)
       via  1c26179ddb12e520c24921809adaf1587f226851 (commit)
       via  62425c4eec4d5fc5ef353012fb7ef980425f16fa (commit)
       via  79991ff14b9e396e319e108d7615d379163347d9 (commit)
       via  d79ddb4f02f8800fe601a5b7f4b1aaae8990ca7c (commit)
       via  6f313def5abd4c914366ca171ebae654b06aa01f (commit)
       via  1edf5d2a7490ec7c1ee0f7ac8a77f30dcea82d03 (commit)
       via  db33488b20d15506eac5ad033b687cc90f8edd69 (commit)
       via  e818ba3a132cc233fd24126802bbbdcafd0fa6d5 (commit)
       via  47c82fdffad20d946d3f485ff03f25d844f925d8 (commit)
       via  fe8c6e2f11014688efdfac179810fb40b6a65814 (commit)
       via  97be9754e1eb6fb83e114af1b2286e287793f693 (commit)
      from  90413f5f16d66b69da2f8d5cd8d989aabb12514b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d5505276c450656377e54fa809246f92036f3746
Author: Eric S. Raymond <address@hidden>
Date:   Sat Apr 9 04:39:11 2016 -0400

    Typo fix.

commit 94cb114147898af567556a6ca12bf7184bf9d85a
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:53 2016 -0700

    Removes redundant polystr/polybytes defs from client.py.
    
    TESTED:
    Ran "scons check" with both Python 2 and Python 3.

commit 1c26179ddb12e520c24921809adaf1587f226851
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:52 2016 -0700

    Adds "target Python" support to SConstruct.
    
    This adds a target_python option to allow building for a specific
    Python version which may differ from the Python running scons.  If
    blank (currently the default), it uses the scons Python as before, but
    otherwise it's expected to be a command to launch some version of
    Python.  In the latter case, all Python-related configuration
    parameters are obtained by running the specified Python as an external
    program.
    
    The primary effect of this is to allow the C extensions to be built
    appropriately for a given Python version, but it also means that all
    Python code used for tests is executed with the target Python (which
    is necessary in some cases, and desirable for consistency in all
    cases).  However, any Python programs executed purely as build helpers
    are executed with the scons Python for consistency.
    
    Note that any "pure Python" programs run from the build directory can
    be run with any compatible Python version, but programs using the C
    extensions will only work with Python versions compatible with the
    target_python used when building.  The built C extensions may or may
    not use versioned naming, depending on how the target Python specifies
    the configuration.
    
    The default value of python_libdir is no longer the libdir for the
    scons Python, but instead the default blank value specifies that the
    actual value should be obtained from the target Python.  It should
    rarely be appropriate to modify this value.
    
    TESTED:
    Ran "scons build-all check valgrind-audit" with the default Python
    (2.7) and with all six available compatible versions (2.6-2.7 and
    3.2-3.5).  Also ran gegps, gpscat, gpsprof, xgps, and xgpsspeed in the
    same circumstances.  Except for xgps and xgpsspeed with 2.6, which
    doesn't work due to py-gobject3 unavailability for 2.6, everything
    worked correctly.

commit 62425c4eec4d5fc5ef353012fb7ef980425f16fa
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:51 2016 -0700

    Fixes fake.py and gpsfake for Python 3.
    
    This incorporates the following changes:
    
    1) Adds definitions for polystr(), polybytes(), and make_std_wrapper()
    to misc.py (the most logical place for code needed by multiple
    modules), using dummy definitions in the Python 2 case.  For more
    info, see the Practical Python Porting guide.
    
    2) Reworks the logfile->daemon data path in fake.py to use 'bytes'
    consistently.
    
    3) Uses polybytes() in fake.py to construct control-socket commands as
    'bytes', as expected by the socket I/O.
    
    4) Uses make_std_wrapper() in gpsfake, to ensure that binary data is
    correctly written to stdout.
    
    5) Adds 'division' to the future imports in gpsfake for consistency,
    though it doesn't actually matter in practice.
    
    Also updates the compatibility comments in all three files, and fixes
    a minor typo in misc.py.
    
    TESTED:
    Ran "scons build-all check" with Python 2.7, and ran all daemon
    regression tests with Python 2.6 and with Python 3.2-3.5 (with
    appropriately built extensions; not yet a build option).

commit 79991ff14b9e396e319e108d7615d379163347d9
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:50 2016 -0700

    Fixes gpscat and test_maidenhead.py for Python 3.
    
    This fixes two issues with gpscat in Python 3:
    
    1) The data accumulation buffer needs to be 'bytes' rather than a
    'str' in Python 3.  This is easily accomplished by using bytes() as
    the initializer/reinitializer.
    
    2) The hexdump routine (which was also iterating in a rather strange
    way) needs to obtain int values for the characters of the buffer in a
    2/3-independent manner.  This is easily accomplished by converting it
    to a bytearray, which works in both Python 2 and Python 3.  This isn't
    exactly the same as the Python 3 'bytes' type, since it's
    unnecessarily mutable, but it's an easy fix that doesn't require
    version conditionals.
    
    Also, test_maidenhead.py works with Python 3 after updating the
    libraries, so the shebang line and comments now reflect that.
    
    TESTED:
    Ran them under Python 2.6, 2.7, and 3.2-3.5 (with appropriate builds of
    the extensions).

commit d79ddb4f02f8800fe601a5b7f4b1aaae8990ca7c
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:49 2016 -0700

    Removes unnecessary Unicode literal from xgps.
    
    Since the radio-button labels in the add_ui_from_string() text are
    just internal labels not visible to the user, there's no reason that
    they need to rely on non-USASCII characters.  With that text confined
    to 7-bit ASCII, there's no need to use Unicode for the literal, which
    in turn eliminates the last incompatibility with Python 3.2.  Note
    that this isn't the only case where the internal labels mismatch the
    user-visible text (the other ones involve embedded blanks).
    
    The fact that Gtk3 assumes 'ascii' for the encoding in this case may
    actually be a bug.
    
    TESTED:
    Ran xgps with Python 2.7 and 3.2-3.5 (using appropriately built
    extensions).

commit 6f313def5abd4c914366ca171ebae654b06aa01f
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:48 2016 -0700

    Changes type checks in misc.py:isotime to use isinstance().
    
    Using isinstance() rather than type() == is preferable for a few
    reasons:
    
    1) It's generally considered more pythonic.
    
    2) Referring to types by name is a bit more readable than applying
    type() to sample values.
    
    3) Both 'str' and the Python 2 'unicode' type can be checked in a
    single call.
    
    4) Since the 'str' type check was the only use of a Unicode literal in
    the common code, changing this eliminates Python 3.2 incompatibility.
    
    In Python 2, both 'str' and 'unicode' are derived from the abstract
    'basestring' class.  In Python 3, 'unicode' has been folded into
    'str', and the latter is itself the base class.  Thus, an import-time
    conditional is used to set up the proper STR_CLASS for comparison.
    
    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.2-3.5 when the
    extensions are built for Python 3 (not yet a build option).  Also
    verified that xgps and xgpsspeed work with 2.7 and 3.2-3.5 (with
    a pending fix to xgps for 3.2).

commit 1edf5d2a7490ec7c1ee0f7ac8a77f30dcea82d03
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:47 2016 -0700

    Fixes Gtk warnings related to xgps/xgpsspeed error boxes.
    
    The Gtk MessageDialog function gives a warning if no parent window is
    specified.  Since the main window already exists in those cases, it's
    simply a matter of passing the extra argument to MessageDialog.
    
    This has the side effect of changing the position of the dialog box,
    such that it's centered over the parent window rather than being near
    its upper left-hand corner.  In the xgps case, it appears to be
    centered over whichever subwindow was most recently updated.
    
    TESTED:
    Verified that both the gpsd not running and gpsd stopped running cases
    no longer produce warning messages on the terminal.

commit db33488b20d15506eac5ad033b687cc90f8edd69
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:46 2016 -0700

    Fixes a client.py exception for 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).

commit e818ba3a132cc233fd24126802bbbdcafd0fa6d5
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:45 2016 -0700

    Fixes xgps for Python 3.
    
    This replaces the obsolete 'cmp' keyword for 'sorted' with the
    still-available (and more efficient) 'key' keyword.
    
    TESTED:
    Ran xgps with Python 2.7, 3.3, 3.4, and 3.5 (with appropriate
    builds).

commit 47c82fdffad20d946d3f485ff03f25d844f925d8
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:44 2016 -0700

    Forces Python 3 import behavior in all gps/* modules.
    
    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).

commit fe8c6e2f11014688efdfac179810fb40b6a65814
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:43 2016 -0700

    Fixes fake.py 'packet' import for Python 3.
    
    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).

commit 97be9754e1eb6fb83e114af1b2286e287793f693
Author: Fred Wright <address@hidden>
Date:   Fri Apr 8 10:07:42 2016 -0700

    Fixes Python C extensions for Python 3 compatibility.
    
    These are necessary, but not sufficient, changes to make the C
    extensions work "polyglot".  These are believed to be complete as far
    as the C code is concerned, and don't break Python 2 compatibility.
    
    This puts all the stuff that needs to differ between Python 2 and
    Python 3 into conditionally-defined macros in a new header file
    python_compatibility.h.  The definitions assume Python 2.6 or later.
    
    In addition to the things requiring conditionals, the Lexer object was
    using the deprecated tp_getattr entry, with a function based on
    Py_FindMethod, which is gone in Python 3.  However, the newer
    tp_getattro entry can be pointed directly to PyObject_GenericGetAttr,
    which works in Python 2 and 3.
    
    Packet data returned by the Lexer is now 'bytes' in Python 3, which is
    appropriate given that it may contain binary data.  However, it means
    that packet data can't be passed directly to anything expecting a
    'str'.  In Python 2, the data is just a 'str' as usual.
    
    TESTED:
    Ran "scons build-all check" and xgps (using Python 2.7).  Also ran the
    daemon and maidenhead-locator tests with Python 2.6.

-----------------------------------------------------------------------

Summary of changes:
 SConstruct                      |  141 +++++++++++++++++++++++++++------------
 gps/__init__.py                 |    2 +
 gps/client.py                   |   30 ++-------
 gps/fake.py                     |   36 +++++-----
 gps/gps.py                      |    2 +-
 gps/misc.py                     |   74 ++++++++++++++++++--
 gpscat                          |   19 +++--
 gpsclient.c                     |   13 +++-
 gpsfake                         |    8 ++-
 gpspacket.c                     |   31 ++++-----
 python_compatibility.h          |   44 ++++++++++++
 test_maidenhead.py              |    4 +-
 www/gpsd-time-service-howto.txt |    2 +-
 xgps                            |   18 +++--
 xgpsspeed                       |    2 +
 15 files changed, 291 insertions(+), 135 deletions(-)
 create mode 100644 python_compatibility.h


hooks/post-receive
-- 
GPSD



reply via email to

[Prev in Thread] Current Thread [Next in Thread]