Skip to content

Commit

Permalink
Merge pull request #110 from PagerDuty/v5.0.4-fix-exact-match
Browse files Browse the repository at this point in the history
V5.0.4: fix exact canonical URL matching
  • Loading branch information
Deconstrained authored Jun 7, 2023
2 parents 7684db0 + a5976e7 commit f3976df
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
**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

**2023-05-17: Version 5.0.3:**

* Incorporate bugfix from `#103 <https://github.com/PagerDuty/pdpyras/issues/103>`_ by @av1m
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.3',
VERSION: '5.0.4',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
6 changes: 5 additions & 1 deletion 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.3 documentation</title>
<title>Changelog &#8212; PagerDuty Python REST API Sessions 5.0.4 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,10 @@

<section id="changelog">
<h1>Changelog<a class="headerlink" href="#changelog" title="Permalink to this heading"></a></h1>
<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>
</ul>
<p><strong>2023-05-17: Version 5.0.3:</strong></p>
<ul class="simple">
<li><p>Incorporate bugfix from <a class="reference external" href="https://github.com/PagerDuty/pdpyras/issues/103">#103</a> by &#64;av1m</p></li>
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.3 documentation</title>
<title>Contribution Guide &#8212; PagerDuty Python REST API Sessions 5.0.4 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
2 changes: 1 addition & 1 deletion 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.3 documentation</title>
<title>Index &#8212; PagerDuty Python REST API Sessions 5.0.4 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
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.3 documentation</title>
<title>PDPYRAS: PagerDuty Python REST API Sessions &#8212; PagerDuty Python REST API Sessions 5.0.4 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
2 changes: 1 addition & 1 deletion docs/module_reference.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>Module Reference &#8212; PagerDuty Python REST API Sessions 5.0.3 documentation</title>
<title>Module Reference &#8212; PagerDuty Python REST API Sessions 5.0.4 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
Binary file modified docs/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/py-modindex.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>Python Module Index &#8212; PagerDuty Python REST API Sessions 5.0.3 documentation</title>
<title>Python Module Index &#8212; PagerDuty Python REST API Sessions 5.0.4 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
2 changes: 1 addition & 1 deletion docs/search.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>Search &#8212; PagerDuty Python REST API Sessions 5.0.3 documentation</title>
<title>Search &#8212; PagerDuty Python REST API Sessions 5.0.4 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />

Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/user_guide.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>User Guide &#8212; PagerDuty Python REST API Sessions 5.0.3 documentation</title>
<title>User Guide &#8212; PagerDuty Python REST API Sessions 5.0.4 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
2 changes: 1 addition & 1 deletion pdpyras.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from urllib3.exceptions import HTTPError, PoolError
from requests.exceptions import RequestException

__version__ = '5.0.3'
__version__ = '5.0.4'

#######################
### CLIENT DEFAULTS ###
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

__version__ = '5.0.3'
__version__ = '5.0.4'

if __name__ == '__main__':
setup(
Expand Down
6 changes: 5 additions & 1 deletion test_pdpyras.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ def test_canonical_path(self):
(
'/{entity_type}/{id}/change_tags',
'/services/POOPBUG/change_tags',
)
),
( # for https://github.com/PagerDuty/pdpyras/pull/109
'/users/me',
'/users/me',
),
]
for (pattern, url) in identified_urls:
base_url = 'https://api.pagerduty.com'
Expand Down

0 comments on commit f3976df

Please sign in to comment.