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-523


From: Fred Wright
Subject: [gpsd-commit-watch] [SCM] GPSD branch, master, updated. release-3.16-523-gadcba9a
Date: Sun, 25 Dec 2016 20:59:35 +0000 (UTC)

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  adcba9ae23b8bce85cf7f3f25e6b30113d7a1e5a (commit)
       via  04ac607bcf742785f08feef5e3f8ce4a85858a05 (commit)
      from  1b0eb63a9646eaf80bec7b77221c5fdb270fd07d (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 adcba9ae23b8bce85cf7f3f25e6b30113d7a1e5a
Author: Fred Wright <address@hidden>
Date:   Sat Dec 24 17:00:20 2016 -0800

    Changes fake.py stream type to 'bytes'.
    
    Given that the data returned bye fake.py may include binary data,
    'bytes' is a more appropriate type.  Unlike the client API, where it's
    easy to provide both return types, it would be less convenient to do
    that here, so 'bytes' is preferred as the one choice (and is
    consistent with network sockets).
    
    When sending such data to stdout (or stderr), the straightforward
    method is to write to sys.stdXXX.buffer rather than sys.stdXXX.  That
    doesn't exist in Python 2, but a helper function is now provided to
    get the appropriate 'bytes' stream for stdXXX.
    
    Since no previous *release* of GPSD is compatible with Python 3,
    changing this now doesn't break anything based on released code.
    
    TESTED:
    Ran "scons check" on OSX with all supported Python versions.

commit 04ac607bcf742785f08feef5e3f8ce4a85858a05
Author: Fred Wright <address@hidden>
Date:   Sat Dec 24 16:01:05 2016 -0800

    Adds bytes-typed alternative response to Python client.
    
    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.

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

Summary of changes:
 gps/client.py        |   17 ++++++++++++-----
 gps/fake.py          |   12 +++++++-----
 gps/misc.py          |    8 ++++++++
 gpsfake              |    6 +++---
 www/client-howto.txt |    4 +++-
 5 files changed, 33 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
GPSD



reply via email to

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