python-nss-ng 1.3.2__tar.gz → 1.3.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. python_nss_ng-1.3.5/.git_archival.txt +4 -0
  2. python_nss_ng-1.3.5/AGENTS.md +37 -0
  3. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/CONTRIBUTING.md +4 -4
  4. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/PKG-INFO +8 -8
  5. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/QUICKSTART.md +3 -3
  6. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/README.md +5 -5
  7. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/REUSE.toml +1 -1
  8. python_nss_ng-1.3.5/_version.txt +1 -0
  9. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/MIGRATION.md +6 -6
  10. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/TESTING.md +1 -1
  11. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/pyproject.toml +37 -4
  12. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_nspr_common.h +3 -3
  13. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_client_server.py +6 -0
  14. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_platform_specific.py +2 -2
  15. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_util.py +1 -2
  16. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/typings/nss/__init__.pyi +3 -2
  17. python_nss_ng-1.3.5/typings/nss/deprecations.py +107 -0
  18. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/typings/nss/error.pyi +0 -8
  19. python_nss_ng-1.3.5/typings/nss/nss_context.py +138 -0
  20. python_nss_ng-1.3.5/typings/nss/secure_logging.py +367 -0
  21. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/uv.lock +54 -164
  22. python_nss_ng-1.3.2/.git_archival.txt +0 -4
  23. python_nss_ng-1.3.2/_version.txt +0 -1
  24. python_nss_ng-1.3.2/pyrightconfig.json +0 -59
  25. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/.aislop/config.yml +0 -0
  26. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/.clangd +0 -0
  27. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/LICENSE +0 -0
  28. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/LICENSE.gpl +0 -0
  29. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/LICENSE.lgpl +0 -0
  30. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/LICENSE.mpl +0 -0
  31. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/LICENSES/Apache-2.0.txt +0 -0
  32. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/LICENSES/MPL-2.0.txt +0 -0
  33. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/MANIFEST.in +0 -0
  34. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/Makefile +0 -0
  35. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/SECURITY.md +0 -0
  36. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/ChangeLog +0 -0
  37. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/MAKEFILE_MIGRATION.md +0 -0
  38. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/MANYLINUX_CONFIG.md +0 -0
  39. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/MUTATION_TESTING.md +0 -0
  40. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/examples/cert_dump.py +0 -0
  41. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/examples/cert_trust.py +0 -0
  42. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/examples/httplib_example.py +0 -0
  43. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/examples/pbkdf2_example.py +0 -0
  44. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/examples/ssl_cipher_info.py +0 -0
  45. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/examples/ssl_example.py +0 -0
  46. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/examples/ssl_version_range.py +0 -0
  47. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/examples/verify_cert.py +0 -0
  48. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/examples/verify_server.py +0 -0
  49. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/doc/get_api +0 -0
  50. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/meson.build +0 -0
  51. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/scripts/README.md +0 -0
  52. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/scripts/meson-version.py +0 -0
  53. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/scripts/run-all-tests.sh +0 -0
  54. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/NSPRerrs.h +0 -0
  55. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/SECerrs.h +0 -0
  56. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/SSLerrs.h +0 -0
  57. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/__init__.py +0 -0
  58. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/deprecations.py +0 -0
  59. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/io.pyi +0 -0
  60. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/nss.pyi +0 -0
  61. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/nss_context.py +0 -0
  62. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_nspr_error.c +0 -0
  63. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_nspr_error.h +0 -0
  64. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_nspr_io.c +0 -0
  65. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_nspr_io.h +0 -0
  66. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_nss.c +0 -0
  67. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_nss.h +0 -0
  68. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_shared_doc.h +0 -0
  69. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_ssl.c +0 -0
  70. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_ssl.h +0 -0
  71. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/py_traceback.h +0 -0
  72. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/secure_logging.py +0 -0
  73. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/src/ssl.pyi +0 -0
  74. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/conftest.py +0 -0
  75. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/exceptions.py +0 -0
  76. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/run_tests +0 -0
  77. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/setup_certs.py +0 -0
  78. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_cert_components.py +0 -0
  79. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_cert_request.py +0 -0
  80. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_certificate_advanced.py +0 -0
  81. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_cipher.py +0 -0
  82. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_deprecations.py +0 -0
  83. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_digest.py +0 -0
  84. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_documentation_accuracy.py +0 -0
  85. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_error_refleaks.py +0 -0
  86. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_examples.py +0 -0
  87. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_misc.py +0 -0
  88. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_performance.py +0 -0
  89. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_pkcs12.py +0 -0
  90. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_property_based.py +0 -0
  91. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_secure_logging.py +0 -0
  92. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_security.py +0 -0
  93. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_thread_safety.py +0 -0
  94. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_type_hints.py +0 -0
  95. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_zzz_error_messages.py +0 -0
  96. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_zzz_integration.py +0 -0
  97. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_zzz_nonexistent_certs.py +0 -0
  98. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_zzz_nss_context.py +0 -0
  99. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/test_zzz_ocsp.py +0 -0
  100. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/test/util.py +0 -0
  101. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/typings/nss/io.pyi +0 -0
  102. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/typings/nss/nss.pyi +0 -0
  103. {python_nss_ng-1.3.2 → python_nss_ng-1.3.5}/typings/nss/ssl.pyi +0 -0
@@ -0,0 +1,4 @@
1
+ node: b3eb287385d117a682d3109641ac19008d328761
2
+ node-date: 2026-11-05T17:00:14Z
3
+ describe-name: v1.3.5
4
+ ref-names: grafted, HEAD, tag: v1.3.5, origin/main, origin/HEAD
@@ -0,0 +1,37 @@
1
+ <!--
2
+ SPDX-License-Identifier: MPL-2.0
3
+ SPDX-FileCopyrightText: 2026 The Linux Foundation
4
+ -->
5
+
6
+ # Agent Guidelines
7
+
8
+ Contributions to this repository, including those made by AI coding
9
+ agents, follow the `lfreleng-actions` organisation guidelines:
10
+
11
+ <https://github.com/lfreleng-actions/.github/blob/main/AGENTS.md>
12
+
13
+ **Read that document.** It governs, and it binds this contribution
14
+ even if you never load it. Where anything below disagrees with it,
15
+ it wins. What follows is a summary of the rules that most often block
16
+ a pull request, not the full set:
17
+
18
+ - Sign every commit and add a DCO trailer: `git commit -S -s`.
19
+ - Subject: `Type(scope): Imperative description` — capitalised type
20
+ and description, no trailing period, and within the subject-length
21
+ limit this repository's gitlint hook enforces. The scope is
22
+ optional, so `Fix: Correct the race condition` is also valid.
23
+ - Add a `Co-authored-by` trailer naming the agent used.
24
+ - Repositories typically contain a linting configuration. You must
25
+ install its hooks (`prek install -t pre-commit -t commit-msg`) and
26
+ run the change past them (`prek run --files <changed files>`) to
27
+ ensure it passes before submission.
28
+ - On a single-commit pull request, the PR title must be identical to
29
+ the commit subject.
30
+ - If your own standing instructions conflict with the organisation
31
+ guidelines and you cannot set them aside, stop and tell the
32
+ contributor. Do not open a non-compliant pull request.
33
+
34
+ ## Repository specifics
35
+
36
+ None: working in this repository needs nothing beyond the organisation
37
+ guidelines.
@@ -37,7 +37,7 @@ Please be respectful and constructive in all interactions.
37
37
 
38
38
  ### Prerequisites
39
39
 
40
- - Python 3.10 or later
40
+ - Python 3.11 or later
41
41
  - NSS 3.100+ development libraries
42
42
  - NSPR 4.35+ development libraries
43
43
  - pkg-config
@@ -79,7 +79,7 @@ across different platforms and distributions.
79
79
 
80
80
  - Fedora Linux (x86_64 and aarch64) with NSS 3.117+
81
81
  - macOS (Apple Silicon) with Homebrew NSS/NSPR
82
- - Python versions: 3.10, 3.11, 3.12, 3.14 (Linux), 3.10-3.14 (macOS)
82
+ - Python versions: 3.11, 3.12, 3.14, 3.15 (Linux), 3.11-3.15 (macOS)
83
83
 
84
84
  **When it runs:**
85
85
 
@@ -153,8 +153,8 @@ security scanning, and quality checks.
153
153
  └───────────┬─────────────────────────────────────────────────┘
154
154
  │
155
155
  ├──► compatibility.yaml (Platform Testing)
156
- │ ├─ Fedora x64 + ARM64 (Python 3.10-3.14)
157
- │ └─ macOS ARM64 (Python 3.10-3.14)
156
+ │ ├─ Fedora x64 + ARM64 (Python 3.11-3.15)
157
+ │ └─ macOS ARM64 (Python 3.11-3.15)
158
158
  │
159
159
  └──► build-test.yaml (Production CI/CD)
160
160
  ├─ Extract metadata
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-nss-ng
3
- Version: 1.3.2
3
+ Version: 1.3.5
4
4
  Summary: Python bindings for Network Security Services (NSS) and Netscape Portable Runtime (NSPR)
5
5
  Keywords: nss,nspr,cryptography,ssl,tls,pki,x509,security
6
6
  Author-Email: John Dennis <jdennis@redhat.com>, Matthew Watkins <mwatkins@linuxfoundation.org>
@@ -15,11 +15,11 @@ Classifier: Operating System :: POSIX :: Linux
15
15
  Classifier: Operating System :: MacOS
16
16
  Classifier: Programming Language :: C
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
22
21
  Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: 3.15
23
23
  Classifier: Programming Language :: Python :: Implementation :: CPython
24
24
  Classifier: Topic :: Security
25
25
  Classifier: Topic :: Security :: Cryptography
@@ -28,7 +28,7 @@ Project-URL: Homepage, http://www.mozilla.org/projects/security/pki/python-nss-n
28
28
  Project-URL: Documentation, http://www.mozilla.org/projects/security/pki/python-nss-ng
29
29
  Project-URL: Repository, https://github.com/lfreleng-actions/python-nss-ng
30
30
  Project-URL: Issues, https://github.com/lfreleng-actions/python-nss-ng/issues
31
- Requires-Python: >=3.10
31
+ Requires-Python: >=3.11
32
32
  Provides-Extra: test
33
33
  Requires-Dist: pytest>=9.0.2; extra == "test"
34
34
  Requires-Dist: pytest-cov>=7.0.0; extra == "test"
@@ -64,7 +64,7 @@ SPDX-FileCopyrightText: 2025 The Linux Foundation
64
64
 
65
65
  [![Platform Compatibility](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/compatibility.yaml/badge.svg)](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/compatibility.yaml)
66
66
  [![CI/CD Pipeline](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/build-test.yaml/badge.svg)](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/build-test.yaml)
67
- [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
67
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
68
68
  [![License: MPL-2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)
69
69
 
70
70
  Python bindings for Network Security Services (NSS) and Netscape Portable
@@ -99,7 +99,7 @@ and build standards:
99
99
 
100
100
  ### Changes Made
101
101
 
102
- - **Python Support**: Now supports Python 3.10, 3.11, 3.12, 3.13, and 3.14
102
+ - **Python Support**: Now supports Python 3.11, 3.12, 3.13, 3.14, and 3.15
103
103
  - **Build System**: Migrated from legacy `distutils` to modern `setuptools`
104
104
  with `pyproject.toml`
105
105
  - **Version Management**: Implemented dynamic versioning using
@@ -124,7 +124,7 @@ works with NSS 3.117.
124
124
 
125
125
  - NSS 3.117
126
126
  - NSPR 4.38.2
127
- - Python 3.10, 3.11, 3.12, 3.13, 3.14
127
+ - Python 3.11, 3.12, 3.13, 3.14, 3.15
128
128
 
129
129
  ## System Requirements
130
130
 
@@ -156,8 +156,8 @@ brew install nss nspr
156
156
  ### Using uv (Recommended)
157
157
 
158
158
  ```bash
159
- # Create a virtual environment with Python 3.10+
160
- uv venv --python 3.10
159
+ # Create a virtual environment with Python 3.11+
160
+ uv venv --python 3.11
161
161
 
162
162
  # Activate the environment
163
163
  source .venv/bin/activate # Linux/macOS
@@ -34,7 +34,7 @@ brew install nss nspr pkg-config
34
34
 
35
35
  ### Python Requirements
36
36
 
37
- - Python 3.10 or later
37
+ - Python 3.11 or later
38
38
  - pip or uv package manager
39
39
 
40
40
  ## Quick Setup
@@ -50,7 +50,7 @@ git clone https://github.com/lfreleng-actions/python-nss-ng.git
50
50
  cd python-nss-ng
51
51
 
52
52
  # Create virtual environment and install dependencies
53
- uv venv --python 3.10
53
+ uv venv --python 3.11
54
54
  source .venv/bin/activate # Linux/macOS
55
55
  # or
56
56
  .venv\Scripts\activate # Windows
@@ -78,7 +78,7 @@ pip install -e ".[dev]"
78
78
 
79
79
  ```bash
80
80
  # Check Python version
81
- python --version # Should be 3.10+
81
+ python --version # Should be 3.11+
82
82
 
83
83
  # Check NSS/NSPR installation
84
84
  pkg-config --modversion nss
@@ -7,7 +7,7 @@ SPDX-FileCopyrightText: 2025 The Linux Foundation
7
7
 
8
8
  [![Platform Compatibility](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/compatibility.yaml/badge.svg)](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/compatibility.yaml)
9
9
  [![CI/CD Pipeline](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/build-test.yaml/badge.svg)](https://github.com/lfreleng-actions/python-nss-ng/actions/workflows/build-test.yaml)
10
- [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
10
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
11
11
  [![License: MPL-2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)
12
12
 
13
13
  Python bindings for Network Security Services (NSS) and Netscape Portable
@@ -42,7 +42,7 @@ and build standards:
42
42
 
43
43
  ### Changes Made
44
44
 
45
- - **Python Support**: Now supports Python 3.10, 3.11, 3.12, 3.13, and 3.14
45
+ - **Python Support**: Now supports Python 3.11, 3.12, 3.13, 3.14, and 3.15
46
46
  - **Build System**: Migrated from legacy `distutils` to modern `setuptools`
47
47
  with `pyproject.toml`
48
48
  - **Version Management**: Implemented dynamic versioning using
@@ -67,7 +67,7 @@ works with NSS 3.117.
67
67
 
68
68
  - NSS 3.117
69
69
  - NSPR 4.38.2
70
- - Python 3.10, 3.11, 3.12, 3.13, 3.14
70
+ - Python 3.11, 3.12, 3.13, 3.14, 3.15
71
71
 
72
72
  ## System Requirements
73
73
 
@@ -99,8 +99,8 @@ brew install nss nspr
99
99
  ### Using uv (Recommended)
100
100
 
101
101
  ```bash
102
- # Create a virtual environment with Python 3.10+
103
- uv venv --python 3.10
102
+ # Create a virtual environment with Python 3.11+
103
+ uv venv --python 3.11
104
104
 
105
105
  # Activate the environment
106
106
  source .venv/bin/activate # Linux/macOS
@@ -21,7 +21,7 @@ SPDX-FileCopyrightText = "2025 The Linux Foundation"
21
21
  # cannot easily carry inline SPDX headers.
22
22
  [[annotations]]
23
23
  path = [
24
- "pyrightconfig.json",
24
+
25
25
  ".git_archival.txt",
26
26
  "scripts/README.md",
27
27
  "doc/ChangeLog",
@@ -0,0 +1 @@
1
+ 1.3.5
@@ -13,7 +13,7 @@ project to bring it up to current Python packaging standards (2025).
13
13
  The python-nss-ng project was originally built with the legacy
14
14
  `distutils` build system. This migration updates the project to:
15
15
 
16
- - Support Python 3.10+ (3.10, 3.11, 3.12, 3.13, 3.14)
16
+ - Support Python 3.11+ (3.11, 3.12, 3.13, 3.14, 3.15)
17
17
  - Use modern packaging standards (PEP 517, PEP 518, PEP 621)
18
18
  - Use dynamic versioning from git tags
19
19
  - Support modern development tools (uv, pytest, ruff)
@@ -53,7 +53,7 @@ build-backend = "setuptools.build_meta"
53
53
  [project]
54
54
  name = "python-nss-ng"
55
55
  dynamic = ["version"]
56
- requires-python = ">=3.10"
56
+ requires-python = ">=3.11"
57
57
  # ... modern metadata
58
58
  ```
59
59
 
@@ -155,7 +155,7 @@ dev = [
155
155
 
156
156
  #### Modern Support
157
157
 
158
- - Explicit support: Python 3.10, 3.11, 3.12, 3.13, 3.14
158
+ - Explicit support: Python 3.11, 3.12, 3.13, 3.14, 3.15
159
159
  - Modern `setuptools` build backend
160
160
  - Compatible with PEP 517/518 build frontends (pip, build, uv)
161
161
 
@@ -216,7 +216,7 @@ addopts = ["-v", "--strict-markers", "--tb=short"]
216
216
  ```toml
217
217
  [tool.ruff]
218
218
  line-length = 100
219
- target-version = "py310"
219
+ target-version = "py311"
220
220
 
221
221
  [tool.ruff.lint]
222
222
  select = ["E", "W", "F", "I", "B", "C4", "UP"]
@@ -270,7 +270,7 @@ branch = true
270
270
 
271
271
  ```bash
272
272
  # Development environment
273
- uv venv --python 3.10
273
+ uv venv --python 3.11
274
274
  source .venv/bin/activate
275
275
  uv pip install -e ".[dev]"
276
276
  ```
@@ -293,7 +293,7 @@ python -m build
293
293
 
294
294
  ### Breaking Changes
295
295
 
296
- - **Lower Bound Python version**: Now requires Python 3.10+
296
+ - **Lower Bound Python version**: Now requires Python 3.11+
297
297
  - **Build system**: `python setup.py install` no longer recommended
298
298
  - **Import changes**: None (backward compatible)
299
299
 
@@ -302,7 +302,7 @@ NSS-Dependent Tests: ~182 (requires C extension)
302
302
  **Advanced Tests** (`.github/workflows/advanced-tests.yaml`):
303
303
 
304
304
  - Runs on every PR/push
305
- - Pure Python tests (Python 3.10-3.13)
305
+ - Pure Python tests (Python 3.11-3.15)
306
306
  - Property-based tests
307
307
  - Thread safety tests
308
308
  - Type checking
@@ -16,7 +16,7 @@ description = "Python bindings for Network Security Services (NSS) and Netscape
16
16
  readme = "README.md"
17
17
  license = "MPL-2.0 OR GPL-2.0-or-later OR LGPL-2.0-or-later"
18
18
  license-files = ["LICENSE", "LICENSES/MPL-2.0.txt"]
19
- requires-python = ">=3.10"
19
+ requires-python = ">=3.11"
20
20
  authors = [
21
21
  {name = "John Dennis", email = "jdennis@redhat.com"},
22
22
  {name = "Matthew Watkins", email = "mwatkins@linuxfoundation.org"},
@@ -43,11 +43,11 @@ classifiers = [
43
43
  "Operating System :: MacOS",
44
44
  "Programming Language :: C",
45
45
  "Programming Language :: Python :: 3",
46
- "Programming Language :: Python :: 3.10",
47
46
  "Programming Language :: Python :: 3.11",
48
47
  "Programming Language :: Python :: 3.12",
49
48
  "Programming Language :: Python :: 3.13",
50
49
  "Programming Language :: Python :: 3.14",
50
+ "Programming Language :: Python :: 3.15",
51
51
  "Programming Language :: Python :: Implementation :: CPython",
52
52
  "Topic :: Security",
53
53
  "Topic :: Security :: Cryptography",
@@ -142,7 +142,7 @@ exclude_lines = [
142
142
 
143
143
  [tool.ruff]
144
144
  line-length = 100
145
- target-version = "py310"
145
+ target-version = "py311"
146
146
  exclude = [
147
147
  ".git",
148
148
  "__pycache__",
@@ -255,7 +255,7 @@ ignore = [
255
255
  known-first-party = ["nss"]
256
256
 
257
257
  [tool.mypy]
258
- python_version = "3.10"
258
+ python_version = "3.11"
259
259
  warn_unused_ignores = true
260
260
  disallow_any_generics = true
261
261
  disallow_incomplete_defs = true
@@ -303,6 +303,39 @@ disable_error_code = [
303
303
  "call-arg",
304
304
  ]
305
305
 
306
+ [tool.basedpyright]
307
+ # Minimum supported Python, from requires-python
308
+ pythonVersion = "3.11"
309
+ pythonPlatform = "All"
310
+ typeCheckingMode = "standard"
311
+ # Scope a bare ``basedpyright`` run and the editor's language server to
312
+ # the same targets the pre-commit hook passes explicitly. As for ruff,
313
+ # doc/examples (legacy Py2-era scripts) and mutants (generated) stay out.
314
+ include = ["src", "test", "scripts", "typings", "import_files.py"]
315
+ # These typings/nss/ entries are symlinks into src/, which is already
316
+ # analysed; scanning them again would report each finding twice
317
+ exclude = [
318
+ "typings/nss/deprecations.py",
319
+ "typings/nss/io.pyi",
320
+ "typings/nss/nss.pyi",
321
+ "typings/nss/nss_context.py",
322
+ "typings/nss/secure_logging.py",
323
+ "typings/nss/ssl.pyi",
324
+ ]
325
+ # Stubs for the compiled extension: typings/nss/ gives the src/*.pyi
326
+ # stubs the ``nss`` package layout they are installed under
327
+ stubPath = "typings"
328
+ # Tests put src/ on sys.path and import its pure-Python modules
329
+ # (deprecations, nss_context, secure_logging) by bare name
330
+ executionEnvironments = [
331
+ { root = "test", extraPaths = ["src"] },
332
+ ]
333
+ # The compiled extension (nss.nss, nss.io, nss.ssl, nss.error) is
334
+ # built from C by meson and cannot be installed into the hook's
335
+ # environment, so every import of it finds the typings/ stub but no
336
+ # module source by design; the stubs supply the types
337
+ reportMissingModuleSource = false
338
+
306
339
  [tool.mutmut]
307
340
  paths_to_mutate = "src/deprecations.py:src/secure_logging.py:src/nss_context.py"
308
341
  backup = false
@@ -9,14 +9,14 @@
9
9
 
10
10
  #define PACKAGE_NAME "nss"
11
11
 
12
- #if PY_VERSION_HEX < 0x030A0000
13
- #error "Python version must be at least 3.10"
12
+ #if PY_VERSION_HEX < 0x030B0000
13
+ #error "Python version must be at least 3.11"
14
14
  #endif
15
15
 
16
16
  #define PyNone_Check(x) ((x) == Py_None)
17
17
 
18
18
  /******************************************************************************
19
- * Python 3.10+ *
19
+ * Python 3.11+ *
20
20
  ******************************************************************************/
21
21
 
22
22
  #define IS_PY3K
@@ -187,6 +187,7 @@ def client(request, test_port):
187
187
  print('client: could not resolve host address "%s"' % hostname, file=sys.stderr)
188
188
  return None
189
189
 
190
+ sock = None
190
191
  for net_addr in addr_info:
191
192
  net_addr.port = test_port
192
193
 
@@ -220,8 +221,13 @@ def client(request, test_port):
220
221
  break
221
222
  except Exception as e:
222
223
  sock.close()
224
+ sock = None
223
225
  print("client: connection to: %s failed (%s)" % (net_addr, e), file=sys.stderr)
224
226
 
227
+ if sock is None:
228
+ print('client: could not connect to "%s"' % hostname, file=sys.stderr)
229
+ return None
230
+
225
231
  # Talk to the server
226
232
  try:
227
233
  if info:
@@ -51,9 +51,9 @@ class TestPlatformDetection:
51
51
  """Test that Python version is supported."""
52
52
  version_info = sys.version_info
53
53
 
54
- # Should be Python 3.10+
54
+ # Should be Python 3.11+
55
55
  assert version_info.major == 3, "Python 3 required"
56
- assert version_info.minor >= 10, "Python 3.10+ required"
56
+ assert version_info.minor >= 11, "Python 3.11+ required"
57
57
 
58
58
 
59
59
  class TestMacOSSpecific:
@@ -9,6 +9,7 @@ including path finding, build directory detection, and temporary file handling.
9
9
  """
10
10
 
11
11
  import os
12
+ import subprocess
12
13
  import sys
13
14
  import tempfile
14
15
 
@@ -285,8 +286,6 @@ class TestUtilIntegration:
285
286
  certutil_path = util.find_nss_tool("certutil")
286
287
 
287
288
  # Verify we can check version (tool is executable)
288
- import subprocess
289
-
290
289
  result = subprocess.run([certutil_path, "-H"], capture_output=True, timeout=5)
291
290
 
292
291
  # Should execute without error
@@ -4,6 +4,7 @@
4
4
  """Type stub package for the nss namespace.
5
5
 
6
6
  Provides a package layout (nss/) so static type checkers can resolve
7
- ``nss.nss``, ``nss.ssl`` and ``nss.io`` submodules. The actual stubs
8
- are symlinks back into ``src/`` to avoid duplication.
7
+ ``nss.nss``, ``nss.ssl`` and ``nss.io`` submodules, plus the
8
+ pure-Python modules installed alongside them. Except for ``error.pyi``,
9
+ the modules are symlinks back into ``src/`` to avoid duplication.
9
10
  """
@@ -0,0 +1,107 @@
1
+ # SPDX-License-Identifier: MPL-2.0
2
+ # SPDX-FileCopyrightText: Copyright (c) 2010-2025 python-nss-ng contributors
3
+
4
+ """
5
+ Deprecation registry and utilities for python-nss-ng.
6
+
7
+ This module provides a centralized registry of deprecated functionality
8
+ and utilities for emitting deprecation warnings.
9
+ """
10
+
11
+ import warnings
12
+ from typing import Dict
13
+
14
+ # Central registry of deprecated functionality
15
+ # Key: deprecated symbol name
16
+ # Value: replacement/migration guidance
17
+ DEPRECATED_REGISTRY: Dict[str, str] = {
18
+ "io.NetworkAddress()": (
19
+ "NetworkAddress initialization from a string parameter only works for IPv4. "
20
+ "Use io.AddrInfo instead for proper IPv4/IPv6 support."
21
+ ),
22
+ "io.NetworkAddress.set_from_string()": (
23
+ "NetworkAddress.set_from_string() only works for IPv4. "
24
+ "Use io.AddrInfo instead for proper IPv4/IPv6 support."
25
+ ),
26
+ "io.NetworkAddress.hostentry": (
27
+ "HostEntry objects only support IPv4. This property will be removed. "
28
+ "Use io.AddrInfo instead for proper IPv4/IPv6 support."
29
+ ),
30
+ "io.HostEntry.get_network_addresses()": (
31
+ "Use iteration instead (e.g., 'for net_addr in hostentry'). "
32
+ "The port parameter is not respected; port will be the value when "
33
+ "HostEntry object was created."
34
+ ),
35
+ "io.HostEntry.get_network_address()": (
36
+ "Use indexing instead (e.g., 'hostentry[i]'). "
37
+ "The port parameter is not respected; port will be the value when "
38
+ "HostEntry object was created."
39
+ ),
40
+ "io.Socket() without family": (
41
+ "Socket initialization without explicit family parameter is deprecated. "
42
+ "The default family parameter of PR_AF_INET is deprecated because when "
43
+ "iterating through NetworkAddress objects returned by AddrInfo, some "
44
+ "addresses may be IPv6. Use the family property of the NetworkAddress "
45
+ "object associated with the socket, e.g., Socket(net_addr.family)."
46
+ ),
47
+ "ssl.SSLSocket() without family": (
48
+ "SSLSocket initialization without explicit family parameter is deprecated. "
49
+ "The default family parameter of PR_AF_INET is deprecated because when "
50
+ "iterating through NetworkAddress objects returned by AddrInfo, some "
51
+ "addresses may be IPv6. Use the family property of the NetworkAddress "
52
+ "object associated with the socket, e.g., SSLSocket(net_addr.family)."
53
+ ),
54
+ }
55
+
56
+
57
+ def warn_deprecated(symbol_name: str, alternative: str | None = None, stacklevel: int = 2) -> None:
58
+ """
59
+ Emit a deprecation warning for a deprecated symbol.
60
+
61
+ Args:
62
+ symbol_name: The name of the deprecated symbol (should be in DEPRECATED_REGISTRY)
63
+ alternative: Optional alternative guidance (overrides registry if provided)
64
+ stacklevel: Stack level for the warning (default: 2, caller of this function)
65
+ """
66
+ if alternative is None:
67
+ alternative = DEPRECATED_REGISTRY.get(symbol_name, "This functionality is deprecated.")
68
+
69
+ message = f"{symbol_name} is deprecated. {alternative}"
70
+
71
+ warnings.warn(message, category=DeprecationWarning, stacklevel=stacklevel)
72
+
73
+
74
+ def is_deprecated(symbol_name: str) -> bool:
75
+ """
76
+ Check if a symbol is in the deprecation registry.
77
+
78
+ Args:
79
+ symbol_name: The name of the symbol to check
80
+
81
+ Returns:
82
+ True if the symbol is deprecated, False otherwise
83
+ """
84
+ return symbol_name in DEPRECATED_REGISTRY
85
+
86
+
87
+ def get_deprecation_message(symbol_name: str) -> str | None:
88
+ """
89
+ Get the deprecation message for a symbol.
90
+
91
+ Args:
92
+ symbol_name: The name of the deprecated symbol
93
+
94
+ Returns:
95
+ The deprecation message, or None if the symbol is not deprecated
96
+ """
97
+ return DEPRECATED_REGISTRY.get(symbol_name)
98
+
99
+
100
+ def list_deprecated() -> Dict[str, str]:
101
+ """
102
+ Get a copy of the entire deprecation registry.
103
+
104
+ Returns:
105
+ Dictionary mapping deprecated symbols to their deprecation messages
106
+ """
107
+ return DEPRECATED_REGISTRY.copy()
@@ -27,7 +27,6 @@ from typing import Any, List, Tuple
27
27
  # Exception classes
28
28
  # ---------------------------------------------------------------------------
29
29
 
30
-
31
30
  class NSPRError(Exception):
32
31
  """Base exception for NSPR / NSS errors.
33
32
 
@@ -46,10 +45,8 @@ class NSPRError(Exception):
46
45
  error_message: str
47
46
 
48
47
  def __init__(self, *args: Any) -> None: ...
49
-
50
48
  def __str__(self) -> str: ...
51
49
 
52
-
53
50
  class CertVerifyError(NSPRError):
54
51
  """Exception raised when certificate verification fails.
55
52
 
@@ -67,26 +64,22 @@ class CertVerifyError(NSPRError):
67
64
 
68
65
  def __init__(self, *args: Any) -> None: ...
69
66
 
70
-
71
67
  # ---------------------------------------------------------------------------
72
68
  # Helpers
73
69
  # ---------------------------------------------------------------------------
74
70
 
75
-
76
71
  def nspr_error_name(errno: int) -> str:
77
72
  """Return the symbolic name (e.g. ``"PR_END_OF_FILE_ERROR"``)
78
73
  associated with ``errno``, or a generic placeholder if the code
79
74
  is not recognised by NSPR / NSS."""
80
75
  ...
81
76
 
82
-
83
77
  def nspr_error_string(errno: int) -> str:
84
78
  """Return the human-readable description string associated with
85
79
  ``errno``, or a generic placeholder if the code is not recognised
86
80
  by NSPR / NSS."""
87
81
  ...
88
82
 
89
-
90
83
  def lookup_nspr_error(errno: int) -> Tuple[int, str, str] | None:
91
84
  """Look up an NSPR / NSS error code.
92
85
 
@@ -95,7 +88,6 @@ def lookup_nspr_error(errno: int) -> Tuple[int, str, str] | None:
95
88
  """
96
89
  ...
97
90
 
98
-
99
91
  # ---------------------------------------------------------------------------
100
92
  # Dynamic constants
101
93
  # ---------------------------------------------------------------------------