Skip to content

Commit

Permalink
Merge pull request #113 from PagerDuty/v5.1-exception-inheritance-cha…
Browse files Browse the repository at this point in the history
…nge-event-timestamp

v5.1.0: Exception inheritance and change event timestamp
  • Loading branch information
Deconstrained committed Jun 26, 2023
2 parents f3976df + d097c62 commit da05e07
Show file tree
Hide file tree
Showing 15 changed files with 141 additions and 206 deletions.
24 changes: 22 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
**2023-06-26: Version 5.1.0:**

* **New features:**
* Add the ability to specify a timestamp when submitting a change event by supplying keyword argument ``timestamp`` to ``ChangeEventsAPISession.submit``
* Explicitly include the upstream exception as cause when raising due to a non-transient network error
* **Breaking Changes:**
* Removal of deprecated functions:
* ``pdpyras.tokenize_url_path``
* ``pdpyras.resource_envelope``
* ``pdpyras.object_type``
* ``pdpyras.resource_name``
* ``pdpyras.raise_on_error``
* Removal of deprecated keyword arguments:
* ``__init__`` for all session classes no longer accepts ``name``
* ``pdpyras.APISession.iter_all`` no longer accepts ``paginate``
* ``pdpyras.APISession.iter_cursor`` no longer accepts ``attribute``
* Removal of deprecated object methods/properties:
* ``pdpyras.APISession.profiler_key``
* ``pdpyras.APISession.raise_if_http_error``

**2023-06-07: Version 5.0.4:**

* Fix bug: ``/users/me`` is also ambiguously matched by canonical path ``/users/{id}``; the solution by @asmith-pd short-circuits if there is an exact match for the URL to a canonical path
Expand All @@ -11,7 +31,7 @@
**2023-05-01: Version 5.0:**
Note: version 5.0.0 has been yanked; patch release v5.0.1 addresses an issue in ``setup.py``.

* **New features:**
* **New Features:**
* Methods that assume entity wrapping like ``rget`` and ``iter_all`` now support all API endpoints
* Property ``PDSession.print_debug`` enables printing verbose log messages to ``sys.stderr``
* **Breaking Changes:**
Expand Down Expand Up @@ -72,7 +92,7 @@ Note: version 5.0.0 has been yanked; patch release v5.0.1 addresses an issue in

* Use documented method for including the routing key in the request for API V2 (addresses `#53 <https://github.com/PagerDuty/pdpyras/issues/53>`_)
* Add warning for Python 2.7
* Configurable timeout: argument to ``requests.Session.request`` set in default args to backwards-compatible 5 second value that can be set at the module level (@ctrlaltdel / `#48 <https://github.com/PagerDuty/pdpyras/pull/48>`)
* Configurable timeout: argument to ``requests.Session.request`` set in default args to backwards-compatible 5 second value that can be set at the module level (@ctrlaltdel / `#48 <https://github.com/PagerDuty/pdpyras/pull/48>`_)

**2020-09-15: Version 4.1.2**

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: '5.0.4',
VERSION: '5.1.0',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
51 changes: 48 additions & 3 deletions docs/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

<title>Changelog &#8212; PagerDuty Python REST API Sessions 5.0.4 documentation</title>
<title>Changelog &#8212; PagerDuty Python REST API Sessions 5.1.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
Expand Down Expand Up @@ -36,6 +36,51 @@

<section id="changelog">
<h1>Changelog<a class="headerlink" href="#changelog" title="Permalink to this heading"></a></h1>
<p><strong>2023-06-26: Version 5.1.0:</strong></p>
<ul class="simple">
<li><dl class="simple">
<dt><strong>New features:</strong></dt><dd><ul>
<li><p>Add the ability to specify a timestamp when submitting a change event by supplying keyword argument <code class="docutils literal notranslate"><span class="pre">timestamp</span></code> to <code class="docutils literal notranslate"><span class="pre">ChangeEventsAPISession.submit</span></code></p></li>
<li><p>Explicitly include the upstream exception as cause when raising due to a non-transient network error</p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><strong>Breaking Changes:</strong></dt><dd><ul>
<li><dl class="simple">
<dt>Removal of deprecated functions:</dt><dd><ul>
<li><p><code class="docutils literal notranslate"><span class="pre">pdpyras.tokenize_url_path</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pdpyras.resource_envelope</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pdpyras.object_type</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pdpyras.resource_name</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pdpyras.raise_on_error</span></code></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Removal of deprecated keyword arguments:</dt><dd><ul>
<li><p><code class="docutils literal notranslate"><span class="pre">__init__</span></code> for all session classes no longer accepts <code class="docutils literal notranslate"><span class="pre">name</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pdpyras.APISession.iter_all</span></code> no longer accepts <code class="docutils literal notranslate"><span class="pre">paginate</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pdpyras.APISession.iter_cursor</span></code> no longer accepts <code class="docutils literal notranslate"><span class="pre">attribute</span></code></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Removal of deprecated object methods/properties:</dt><dd><ul>
<li><p><code class="docutils literal notranslate"><span class="pre">pdpyras.APISession.profiler_key</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">pdpyras.APISession.raise_if_http_error</span></code></p></li>
</ul>
</dd>
</dl>
</li>
</ul>
</dd>
</dl>
</li>
</ul>
<p><strong>2023-06-07: Version 5.0.4:</strong></p>
<ul class="simple">
<li><p>Fix bug: <code class="docutils literal notranslate"><span class="pre">/users/me</span></code> is also ambiguously matched by canonical path <code class="docutils literal notranslate"><span class="pre">/users/{id}</span></code>; the solution by &#64;asmith-pd short-circuits if there is an exact match for the URL to a canonical path</p></li>
Expand All @@ -50,7 +95,7 @@ <h1>Changelog<a class="headerlink" href="#changelog" title="Permalink to this he
Note: version 5.0.0 has been yanked; patch release v5.0.1 addresses an issue in <code class="docutils literal notranslate"><span class="pre">setup.py</span></code>.</p>
<ul class="simple">
<li><dl class="simple">
<dt><strong>New features:</strong></dt><dd><ul>
<dt><strong>New Features:</strong></dt><dd><ul>
<li><p>Methods that assume entity wrapping like <code class="docutils literal notranslate"><span class="pre">rget</span></code> and <code class="docutils literal notranslate"><span class="pre">iter_all</span></code> now support all API endpoints</p></li>
<li><p>Property <code class="docutils literal notranslate"><span class="pre">PDSession.print_debug</span></code> enables printing verbose log messages to <code class="docutils literal notranslate"><span class="pre">sys.stderr</span></code></p></li>
</ul>
Expand Down Expand Up @@ -130,7 +175,7 @@ <h1>Changelog<a class="headerlink" href="#changelog" title="Permalink to this he
<ul class="simple">
<li><p>Use documented method for including the routing key in the request for API V2 (addresses <a class="reference external" href="https://github.com/PagerDuty/pdpyras/issues/53">#53</a>)</p></li>
<li><p>Add warning for Python 2.7</p></li>
<li><p>Configurable timeout: argument to <code class="docutils literal notranslate"><span class="pre">requests.Session.request</span></code> set in default args to backwards-compatible 5 second value that can be set at the module level (&#64;ctrlaltdel / <cite>#48 &lt;https://github.com/PagerDuty/pdpyras/pull/48&gt;</cite>)</p></li>
<li><p>Configurable timeout: argument to <code class="docutils literal notranslate"><span class="pre">requests.Session.request</span></code> set in default args to backwards-compatible 5 second value that can be set at the module level (&#64;ctrlaltdel / <a class="reference external" href="https://github.com/PagerDuty/pdpyras/pull/48">#48</a>)</p></li>
</ul>
<p><strong>2020-09-15: Version 4.1.2</strong></p>
<ul class="simple">
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

<title>Contribution Guide &#8212; PagerDuty Python REST API Sessions 5.0.4 documentation</title>
<title>Contribution Guide &#8212; PagerDuty Python REST API Sessions 5.1.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
Expand Down
20 changes: 6 additions & 14 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &#8212; PagerDuty Python REST API Sessions 5.0.4 documentation</title>
<title>Index &#8212; PagerDuty Python REST API Sessions 5.1.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
Expand Down Expand Up @@ -249,11 +249,11 @@ <h2 id="P">P</h2>
<li><a href="module_reference.html#pdpyras.PDSession">PDSession (class in pdpyras)</a>
</li>
<li><a href="module_reference.html#pdpyras.PDSession.permitted_methods">permitted_methods (pdpyras.PDSession attribute)</a>
</li>
<li><a href="module_reference.html#pdpyras.APISession.persist">persist() (pdpyras.APISession method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="module_reference.html#pdpyras.APISession.persist">persist() (pdpyras.APISession method)</a>
</li>
<li><a href="module_reference.html#pdpyras.plural_name">plural_name() (in module pdpyras)</a>
</li>
<li><a href="module_reference.html#pdpyras.EventsAPISession.post">post() (pdpyras.EventsAPISession method)</a>
Expand All @@ -273,17 +273,13 @@ <h2 id="P">P</h2>
</li>
</ul></li>
<li><a href="module_reference.html#pdpyras.PDSession.print_debug">print_debug (pdpyras.PDSession property)</a>
</li>
<li><a href="module_reference.html#pdpyras.APISession.profiler_key">profiler_key() (pdpyras.APISession method)</a>
</li>
</ul></td>
</tr></table>

<h2 id="R">R</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="module_reference.html#pdpyras.PDSession.raise_if_http_error">raise_if_http_error (pdpyras.PDSession property)</a>
</li>
<li><a href="module_reference.html#pdpyras.APISession.rdelete">rdelete() (pdpyras.APISession method)</a>
</li>
<li><a href="module_reference.html#pdpyras.PDSession.request">request() (pdpyras.PDSession method)</a>
Expand All @@ -292,12 +288,10 @@ <h2 id="R">R</h2>
</li>
<li><a href="module_reference.html#pdpyras.EventsAPISession.resolve">resolve() (pdpyras.EventsAPISession method)</a>
</li>
<li><a href="module_reference.html#pdpyras.resource_envelope">resource_envelope() (in module pdpyras)</a>
<li><a href="module_reference.html#pdpyras.resource_url">resource_url() (in module pdpyras)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="module_reference.html#pdpyras.resource_url">resource_url() (in module pdpyras)</a>
</li>
<li><a href="module_reference.html#pdpyras.PDClientError.response">response (pdpyras.PDClientError attribute)</a>
</li>
<li><a href="module_reference.html#pdpyras.PDSession.retry">retry (pdpyras.PDSession attribute)</a>
Expand Down Expand Up @@ -343,15 +337,13 @@ <h2 id="T">T</h2>
<li><a href="module_reference.html#pdpyras.TIMEOUT">TIMEOUT (in module pdpyras)</a>
</li>
<li><a href="module_reference.html#pdpyras.PDSession.timeout">timeout (pdpyras.PDSession attribute)</a>
</li>
<li><a href="module_reference.html#pdpyras.tokenize_url_path">tokenize_url_path() (in module pdpyras)</a>
</li>
<li><a href="module_reference.html#pdpyras.APISession.total_call_count">total_call_count (pdpyras.APISession property)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="module_reference.html#pdpyras.APISession.total_call_time">total_call_time (pdpyras.APISession property)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="module_reference.html#pdpyras.EventsAPISession.trigger">trigger() (pdpyras.EventsAPISession method)</a>
</li>
<li><a href="module_reference.html#pdpyras.PDSession.trunc_key">trunc_key (pdpyras.PDSession property)</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

<title>PDPYRAS: PagerDuty Python REST API Sessions &#8212; PagerDuty Python REST API Sessions 5.0.4 documentation</title>
<title>PDPYRAS: PagerDuty Python REST API Sessions &#8212; PagerDuty Python REST API Sessions 5.1.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
Expand Down

0 comments on commit da05e07

Please sign in to comment.