Skip to content

Commit

Permalink
Issues/194: Correctly format 1octet integers (#196)
Browse files Browse the repository at this point in the history
What:
- Fix a bug where `naz` was not formatting 1octet integers correctly

Why:
- Fixes: #194
  • Loading branch information
komuw authored Feb 16, 2020
1 parent 3375068 commit 10e44b1
Show file tree
Hide file tree
Showing 36 changed files with 154 additions and 134 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ most recent version is listed first.
## **version:** v0.7.8
- Rename `naz.Client.rateLimiter` to `naz.Client.rate_limiter`: https://github.com/komuw/naz/pull/195
This was done so as to maintain consistency with other `naz.Client` attributes.
- Fix a bug where `naz` was not formatting 1octet integers correctly : https://github.com/komuw/naz/pull/196


## **version:** v0.7.7
Expand Down
4 changes: 2 additions & 2 deletions docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Overview: module code &mdash; naz v0.7.7 documentation</title>
<title>Overview: module code &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_modules/naz/broker.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz.broker &mdash; naz v0.7.7 documentation</title>
<title>naz.broker &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
80 changes: 45 additions & 35 deletions docs/_modules/naz/client.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/_modules/naz/codec.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz.codec &mdash; naz v0.7.7 documentation</title>
<title>naz.codec &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_modules/naz/correlater.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz.correlater &mdash; naz v0.7.7 documentation</title>
<title>naz.correlater &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_modules/naz/hooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz.hooks &mdash; naz v0.7.7 documentation</title>
<title>naz.hooks &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_modules/naz/log.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz.log &mdash; naz v0.7.7 documentation</title>
<title>naz.log &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_modules/naz/protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz.protocol &mdash; naz v0.7.7 documentation</title>
<title>naz.protocol &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
8 changes: 4 additions & 4 deletions docs/_modules/naz/ratelimiter.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz.ratelimiter &mdash; naz v0.7.7 documentation</title>
<title>naz.ratelimiter &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down Expand Up @@ -201,8 +201,8 @@ <h1>Source code for naz.ratelimiter</h1><div class="highlight"><pre>
<span class="sd"> .. highlight:: python</span>
<span class="sd"> .. code-block:: python</span>

<span class="sd"> rateLimiter = SimpleRateLimiter(send_rate=10)</span>
<span class="sd"> await rateLimiter.limit()</span>
<span class="sd"> rate_limiter = SimpleRateLimiter(send_rate=10)</span>
<span class="sd"> await rate_limiter.limit()</span>
<span class="sd"> send_messsages()</span>
<span class="sd"> &quot;&quot;&quot;</span>

Expand Down
4 changes: 2 additions & 2 deletions docs/_modules/naz/sequence.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz.sequence &mdash; naz v0.7.7 documentation</title>
<title>naz.sequence &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_modules/naz/state.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz.state &mdash; naz v0.7.7 documentation</title>
<title>naz.state &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/_modules/naz/throttle.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz.throttle &mdash; naz v0.7.7 documentation</title>
<title>naz.throttle &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -60,7 +60,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: 'v0.7.7',
VERSION: 'v0.7.8',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
Expand Down
4 changes: 2 additions & 2 deletions docs/broker.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>broker &mdash; naz v0.7.7 documentation</title>
<title>broker &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -62,7 +62,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
10 changes: 5 additions & 5 deletions docs/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Client &mdash; naz v0.7.7 documentation</title>
<title>Client &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -62,7 +62,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down Expand Up @@ -170,7 +170,7 @@
<span id="client"></span><h1>Client<a class="headerlink" href="#module-naz.client" title="Permalink to this headline"></a></h1>
<dl class="class">
<dt id="naz.client.Client">
<em class="property">class </em><code class="sig-prename descclassname">naz.client.</code><code class="sig-name descname">Client</code><span class="sig-paren">(</span><em class="sig-param">smsc_host</em>, <em class="sig-param">smsc_port</em>, <em class="sig-param">system_id</em>, <em class="sig-param">password</em>, <em class="sig-param">broker</em>, <em class="sig-param">client_id=None</em>, <em class="sig-param">system_type=''</em>, <em class="sig-param">addr_ton=0</em>, <em class="sig-param">addr_npi=0</em>, <em class="sig-param">address_range=''</em>, <em class="sig-param">interface_version=34</em>, <em class="sig-param">enquire_link_interval=55.0</em>, <em class="sig-param">logger=None</em>, <em class="sig-param">codec=None</em>, <em class="sig-param">rateLimiter=None</em>, <em class="sig-param">hook=None</em>, <em class="sig-param">sequence_generator=None</em>, <em class="sig-param">throttle_handler=None</em>, <em class="sig-param">correlation_handler=None</em>, <em class="sig-param">drain_duration=8.0</em>, <em class="sig-param">socket_timeout=30.0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/naz/client.html#Client"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#naz.client.Client" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">naz.client.</code><code class="sig-name descname">Client</code><span class="sig-paren">(</span><em class="sig-param">smsc_host</em>, <em class="sig-param">smsc_port</em>, <em class="sig-param">system_id</em>, <em class="sig-param">password</em>, <em class="sig-param">broker</em>, <em class="sig-param">client_id=None</em>, <em class="sig-param">system_type=''</em>, <em class="sig-param">addr_ton=0</em>, <em class="sig-param">addr_npi=0</em>, <em class="sig-param">address_range=''</em>, <em class="sig-param">interface_version=52</em>, <em class="sig-param">enquire_link_interval=55.0</em>, <em class="sig-param">logger=None</em>, <em class="sig-param">codec=None</em>, <em class="sig-param">rate_limiter=None</em>, <em class="sig-param">hook=None</em>, <em class="sig-param">sequence_generator=None</em>, <em class="sig-param">throttle_handler=None</em>, <em class="sig-param">correlation_handler=None</em>, <em class="sig-param">drain_duration=8.0</em>, <em class="sig-param">socket_timeout=30.0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/naz/client.html#Client"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#naz.client.Client" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>The SMPP client that will interact with SMSC/server.</p>
<p>Example declaration:</p>
Expand Down Expand Up @@ -205,7 +205,7 @@
</div>
<dl class="method">
<dt id="naz.client.Client.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">smsc_host</em>, <em class="sig-param">smsc_port</em>, <em class="sig-param">system_id</em>, <em class="sig-param">password</em>, <em class="sig-param">broker</em>, <em class="sig-param">client_id=None</em>, <em class="sig-param">system_type=''</em>, <em class="sig-param">addr_ton=0</em>, <em class="sig-param">addr_npi=0</em>, <em class="sig-param">address_range=''</em>, <em class="sig-param">interface_version=34</em>, <em class="sig-param">enquire_link_interval=55.0</em>, <em class="sig-param">logger=None</em>, <em class="sig-param">codec=None</em>, <em class="sig-param">rateLimiter=None</em>, <em class="sig-param">hook=None</em>, <em class="sig-param">sequence_generator=None</em>, <em class="sig-param">throttle_handler=None</em>, <em class="sig-param">correlation_handler=None</em>, <em class="sig-param">drain_duration=8.0</em>, <em class="sig-param">socket_timeout=30.0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/naz/client.html#Client.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#naz.client.Client.__init__" title="Permalink to this definition"></a></dt>
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">smsc_host</em>, <em class="sig-param">smsc_port</em>, <em class="sig-param">system_id</em>, <em class="sig-param">password</em>, <em class="sig-param">broker</em>, <em class="sig-param">client_id=None</em>, <em class="sig-param">system_type=''</em>, <em class="sig-param">addr_ton=0</em>, <em class="sig-param">addr_npi=0</em>, <em class="sig-param">address_range=''</em>, <em class="sig-param">interface_version=52</em>, <em class="sig-param">enquire_link_interval=55.0</em>, <em class="sig-param">logger=None</em>, <em class="sig-param">codec=None</em>, <em class="sig-param">rate_limiter=None</em>, <em class="sig-param">hook=None</em>, <em class="sig-param">sequence_generator=None</em>, <em class="sig-param">throttle_handler=None</em>, <em class="sig-param">correlation_handler=None</em>, <em class="sig-param">drain_duration=8.0</em>, <em class="sig-param">socket_timeout=30.0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/naz/client.html#Client.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#naz.client.Client.__init__" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
Expand All @@ -223,7 +223,7 @@
<li><p><strong>enquire_link_interval</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>) – time in seconds to wait before sending an enquire_link request to SMSC to check on its status</p></li>
<li><p><strong>logger</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="docutils literal notranslate"><span class="pre">None</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">Logger</span></code>]) – python <a class="reference external" href="https://docs.python.org/3/library/logging.html#logging.Logger">logger</a> instance to be used for logging</p></li>
<li><p><strong>codec</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="docutils literal notranslate"><span class="pre">None</span></code>, <a class="reference internal" href="codec.html#naz.codec.BaseCodec" title="naz.codec.BaseCodec"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseCodec</span></code></a>]) – python class instance, that is a child class of <cite>naz.codec.BaseCodec</cite> to be used to encode/decode messages.</p></li>
<li><p><strong>rateLimiter</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="docutils literal notranslate"><span class="pre">None</span></code>, <a class="reference internal" href="ratelimiter.html#naz.ratelimiter.BaseRateLimiter" title="naz.ratelimiter.BaseRateLimiter"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseRateLimiter</span></code></a>]) – python class instance implementing rate limitation</p></li>
<li><p><strong>rate_limiter</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="docutils literal notranslate"><span class="pre">None</span></code>, <a class="reference internal" href="ratelimiter.html#naz.ratelimiter.BaseRateLimiter" title="naz.ratelimiter.BaseRateLimiter"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseRateLimiter</span></code></a>]) – python class instance implementing rate limitation</p></li>
<li><p><strong>hook</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="docutils literal notranslate"><span class="pre">None</span></code>, <a class="reference internal" href="hooks.html#naz.hooks.BaseHook" title="naz.hooks.BaseHook"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseHook</span></code></a>]) – python class instance implemeting functionality/hooks to be called by naz just before sending request to SMSC and just after getting response from SMSC</p></li>
<li><p><strong>sequence_generator</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="docutils literal notranslate"><span class="pre">None</span></code>, <a class="reference internal" href="sequence.html#naz.sequence.BaseSequenceGenerator" title="naz.sequence.BaseSequenceGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseSequenceGenerator</span></code></a>]) – python class instance used to generate sequence_numbers</p></li>
<li><p><strong>throttle_handler</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="docutils literal notranslate"><span class="pre">None</span></code>, <a class="reference internal" href="throttle.html#naz.throttle.BaseThrottleHandler" title="naz.throttle.BaseThrottleHandler"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseThrottleHandler</span></code></a>]) – python class instance implementing functionality of what todo when naz starts getting throttled responses from SMSC</p></li>
Expand Down
4 changes: 2 additions & 2 deletions docs/codec.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>codec &mdash; naz v0.7.7 documentation</title>
<title>codec &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -62,7 +62,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/correlater.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>correlater &mdash; naz v0.7.7 documentation</title>
<title>correlater &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -62,7 +62,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Index &mdash; naz v0.7.7 documentation</title>
<title>Index &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -61,7 +61,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/hooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>hooks &mdash; naz v0.7.7 documentation</title>
<title>hooks &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -62,7 +62,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>naz - naz is an async SMPP client. &mdash; naz v0.7.7 documentation</title>
<title>naz - naz is an async SMPP client. &mdash; naz v0.7.8 documentation</title>



Expand Down Expand Up @@ -61,7 +61,7 @@


<div class="version">
v0.7.7
v0.7.8
</div>


Expand Down
Loading

0 comments on commit 10e44b1

Please sign in to comment.