Repository: theupdateframework/python-tuf
Pull request #2636 (2024-05-21 20:31:17)

fixing url link
<!--
Before submitting a pull request:
  * Run linter and tests locally: Use "tox"
  * Ensure your commits are signed-off-by: Use "commit --signoff"
  * Make sure new code has tests and is documented
  * For more info, see docs/CONTRIBUTING.rst

Once commits are signed off and tested, describe the purpose and contents
of the pull request below.
-->

**Description of the changes being introduced by the pull request**:
The files previously found at links [#1](https://github.com/theupdateframework/python-tuf/blob/develop/docs/_posts/2022-02-21-release-1-0-0.md?plain=1#L37) and [#2](https://github.com/theupdateframework/python-tuf/blob/develop/tuf/api/metadata.py#L30) have been moved to a new location.



Fixes #<ISSUE NUMBER>




Patch:
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index b4f5f4d3..fbb82bbb 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -18,7 +18,7 @@ jobs:
     needs: test
     steps:
       - name: Checkout release tag
-        uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+        uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
         with:
           ref: ${{ github.event.workflow_run.head_branch }}
 
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index d502266c..e8478241 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -23,7 +23,7 @@ jobs:
 
     steps:
     - name: Checkout repository
-      uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+      uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
 
     - name: Initialize CodeQL
       uses: github/codeql-action/init@v3 # unpinned since this is not security critical
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
index c19ad31b..d7d8ce58 100644
--- a/.github/workflows/dependency-review.yml
+++ b/.github/workflows/dependency-review.yml
@@ -16,6 +16,6 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: 'Checkout Repository'
-        uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+        uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
       - name: 'Dependency Review'
         uses: actions/dependency-review-action@v4 # unpinned since this is not security critical
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index 4be04168..aa93c998 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -22,7 +22,7 @@ jobs:
 
     steps:
       - name: "Checkout code"
-        uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+        uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
 
       - name: "Run analysis"
         uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
diff --git a/.github/workflows/specification-version-check.yml b/.github/workflows/specification-version-check.yml
index 4bfc1c6a..9d48b796 100644
--- a/.github/workflows/specification-version-check.yml
+++ b/.github/workflows/specification-version-check.yml
@@ -14,7 +14,7 @@ jobs:
     outputs:
       version: ${{ steps.get-version.outputs.version }}
     steps:
-      - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+      - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
       - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
         with:
           python-version: "3.x"
diff --git a/docs/_posts/2022-02-21-release-1-0-0.md b/docs/_posts/2022-02-21-release-1-0-0.md
index 9370597c..33dbb578 100644
--- a/docs/_posts/2022-02-21-release-1-0-0.md
+++ b/docs/_posts/2022-02-21-release-1-0-0.md
@@ -34,7 +34,7 @@ easier to use APIs:
   accelerate future improvements on the project
 - Metadata API provides a solid base to build other tools on top of – as proven
   by the ngclient implementation and the [repository code
-  examples](https://github.com/theupdateframework/python-tuf/tree/develop/examples/repo_example)
+  examples](https://github.com/theupdateframework/python-tuf/tree/develop/examples/repository)
 - Both new APIs are highly extensible and allow application developers to
   include custom network stacks, file storage systems or public-key
   cryptography algorithms, while providing easy-to-use default implementations
diff --git a/requirements/pinned.txt b/requirements/pinned.txt
index c7398192..f5f3bec0 100644
--- a/requirements/pinned.txt
+++ b/requirements/pinned.txt
@@ -5,6 +5,6 @@ cryptography==42.0.7      # via securesystemslib
 idna==3.7                 # via requests
 pycparser==2.22           # via cffi
 pynacl==1.5.0             # via securesystemslib
-requests==2.32.0
+requests==2.31.0
 securesystemslib[crypto,pynacl]==1.0.0
 urllib3==2.2.1           # via requests
diff --git a/tuf/api/metadata.py b/tuf/api/metadata.py
index f436ede8..ce57fdf1 100644
--- a/tuf/api/metadata.py
+++ b/tuf/api/metadata.py
@@ -27,7 +27,7 @@
 Currently Metadata API supports JSON as the file format.
 
 A basic example of repository implementation using the Metadata is available in
-`examples/repo_example <https://github.com/theupdateframework/python-tuf/tree/develop/examples/repo_example>`_.
+`examples/repository <https://github.com/theupdateframework/python-tuf/tree/develop/examples/repository>`_.
 """
 
 import logging
diff --git a/tuf/ngclient/_internal/requests_fetcher.py b/tuf/ngclient/_internal/requests_fetcher.py
index 937357a5..c931b85a 100644
--- a/tuf/ngclient/_internal/requests_fetcher.py
+++ b/tuf/ngclient/_internal/requests_fetcher.py
@@ -141,7 +141,7 @@ def _get_session(self, url: str) -> requests.Session:
             session = requests.Session()
             self._sessions[session_index] = session
 
-            ua = f"python-tuf/{tuf.__version__} {session.headers['User-Agent']}"
+            ua = f"tuf/{tuf.__version__} {session.headers['User-Agent']}"
             if self.app_user_agent is not None:
                 ua = f"{self.app_user_agent} {ua}"
             session.headers["User-Agent"] = ua


Test patch:
diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml
index b97e7da2..8405a3b5 100644
--- a/.github/workflows/_test.yml
+++ b/.github/workflows/_test.yml
@@ -11,7 +11,7 @@ jobs:
 
     steps:
       - name: Checkout TUF
-        uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+        uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
 
       - name: Set up Python (oldest supported version)
         uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
@@ -48,7 +48,7 @@ jobs:
 
     steps:
       - name: Checkout TUF
-        uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+        uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
 
       - name: Set up Python ${{ matrix.python-version }}
         uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
diff --git a/.github/workflows/_test_sslib_main.yml b/.github/workflows/_test_sslib_main.yml
index 3ef85a22..70972c9c 100644
--- a/.github/workflows/_test_sslib_main.yml
+++ b/.github/workflows/_test_sslib_main.yml
@@ -11,7 +11,7 @@ jobs:
 
     steps:
       - name: Checkout TUF
-        uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
+        uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
 
       - name: Set up Python
         uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
diff --git a/tests/test_updater_ng.py b/tests/test_updater_ng.py
index 73437879..ea830c17 100644
--- a/tests/test_updater_ng.py
+++ b/tests/test_updater_ng.py
@@ -325,7 +325,7 @@ def test_user_agent(self) -> None:
         self.updater.refresh()
         session = next(iter(self.updater._fetcher._sessions.values()))
         ua = session.headers["User-Agent"]
-        self.assertEqual(ua[:11], "python-tuf/")
+        self.assertEqual(ua[:4], "tuf/")
 
         # test custom UA
         updater = Updater(
@@ -339,7 +339,7 @@ def test_user_agent(self) -> None:
         session = next(iter(updater._fetcher._sessions.values()))
         ua = session.headers["User-Agent"]
 
-        self.assertEqual(ua[:23], "MyApp/1.2.3 python-tuf/")
+        self.assertEqual(ua[:16], "MyApp/1.2.3 tuf/")
 
 
 if __name__ == "__main__":