python-nss-ng 1.1.0__tar.gz → 1.2.1__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 (132) hide show
  1. python_nss_ng-1.2.1/.git_archival.txt +4 -0
  2. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/PKG-INFO +1 -1
  3. python_nss_ng-1.2.1/SECURITY.md +77 -0
  4. python_nss_ng-1.2.1/_version.txt +1 -0
  5. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/pyproject.toml +6 -0
  6. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/setup_certs.py +1 -1
  7. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_client_server.py +5 -3
  8. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/uv.lock +4 -0
  9. python_nss_ng-1.1.0/.git_archival.txt +0 -4
  10. python_nss_ng-1.1.0/_version.txt +0 -1
  11. python_nss_ng-1.1.0/mutants/pyproject.toml +0 -216
  12. python_nss_ng-1.1.0/mutants/src/deprecations.py +0 -539
  13. python_nss_ng-1.1.0/mutants/src/deprecations.py.meta +0 -26
  14. python_nss_ng-1.1.0/mutants/src/nss_context.py +0 -828
  15. python_nss_ng-1.1.0/mutants/src/nss_context.py.meta +0 -39
  16. python_nss_ng-1.1.0/mutants/src/secure_logging.py +0 -5602
  17. python_nss_ng-1.1.0/mutants/src/secure_logging.py.meta +0 -201
  18. python_nss_ng-1.1.0/mutants/test/conftest.py +0 -409
  19. python_nss_ng-1.1.0/mutants/test/exceptions.py +0 -69
  20. python_nss_ng-1.1.0/mutants/test/run_tests +0 -78
  21. python_nss_ng-1.1.0/mutants/test/setup_certs.py +0 -623
  22. python_nss_ng-1.1.0/mutants/test/test_cert_components.py +0 -330
  23. python_nss_ng-1.1.0/mutants/test/test_cert_request.py +0 -202
  24. python_nss_ng-1.1.0/mutants/test/test_certificate_advanced.py +0 -563
  25. python_nss_ng-1.1.0/mutants/test/test_cipher.py +0 -175
  26. python_nss_ng-1.1.0/mutants/test/test_client_server.py +0 -427
  27. python_nss_ng-1.1.0/mutants/test/test_deprecations.py +0 -207
  28. python_nss_ng-1.1.0/mutants/test/test_digest.py +0 -115
  29. python_nss_ng-1.1.0/mutants/test/test_documentation_accuracy.py +0 -432
  30. python_nss_ng-1.1.0/mutants/test/test_error_messages.py +0 -390
  31. python_nss_ng-1.1.0/mutants/test/test_examples.py +0 -471
  32. python_nss_ng-1.1.0/mutants/test/test_integration.py +0 -574
  33. python_nss_ng-1.1.0/mutants/test/test_misc.py +0 -48
  34. python_nss_ng-1.1.0/mutants/test/test_nss_context.py +0 -558
  35. python_nss_ng-1.1.0/mutants/test/test_ocsp.py +0 -378
  36. python_nss_ng-1.1.0/mutants/test/test_performance.py +0 -469
  37. python_nss_ng-1.1.0/mutants/test/test_pkcs12.py +0 -323
  38. python_nss_ng-1.1.0/mutants/test/test_platform_specific.py +0 -450
  39. python_nss_ng-1.1.0/mutants/test/test_property_based.py +0 -385
  40. python_nss_ng-1.1.0/mutants/test/test_secure_logging.py +0 -314
  41. python_nss_ng-1.1.0/mutants/test/test_security.py +0 -474
  42. python_nss_ng-1.1.0/mutants/test/test_thread_safety.py +0 -551
  43. python_nss_ng-1.1.0/mutants/test/test_type_hints.py +0 -328
  44. python_nss_ng-1.1.0/mutants/test/test_util.py +0 -365
  45. python_nss_ng-1.1.0/mutants/test/util.py +0 -144
  46. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/.clangd +0 -0
  47. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/CONTRIBUTING.md +0 -0
  48. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/LICENSE +0 -0
  49. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/LICENSE.gpl +0 -0
  50. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/LICENSE.lgpl +0 -0
  51. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/LICENSE.mpl +0 -0
  52. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/LICENSES/Apache-2.0.txt +0 -0
  53. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/LICENSES/MPL-2.0.txt +0 -0
  54. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/MANIFEST.in +0 -0
  55. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/Makefile +0 -0
  56. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/QUICKSTART.md +0 -0
  57. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/README.md +0 -0
  58. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/REUSE.toml +0 -0
  59. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/ChangeLog +0 -0
  60. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/MAKEFILE_MIGRATION.md +0 -0
  61. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/MANYLINUX_CONFIG.md +0 -0
  62. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/MIGRATION.md +0 -0
  63. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/MUTATION_TESTING.md +0 -0
  64. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/TESTING.md +0 -0
  65. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/examples/cert_dump.py +0 -0
  66. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/examples/cert_trust.py +0 -0
  67. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/examples/httplib_example.py +0 -0
  68. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/examples/pbkdf2_example.py +0 -0
  69. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/examples/ssl_cipher_info.py +0 -0
  70. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/examples/ssl_example.py +0 -0
  71. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/examples/ssl_version_range.py +0 -0
  72. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/examples/verify_cert.py +0 -0
  73. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/examples/verify_server.py +0 -0
  74. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/doc/get_api +0 -0
  75. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/meson.build +0 -0
  76. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/pyrightconfig.json +0 -0
  77. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/scripts/README.md +0 -0
  78. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/scripts/meson-version.py +0 -0
  79. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/scripts/run-all-tests.sh +0 -0
  80. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/NSPRerrs.h +0 -0
  81. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/SECerrs.h +0 -0
  82. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/SSLerrs.h +0 -0
  83. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/__init__.py +0 -0
  84. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/deprecations.py +0 -0
  85. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/io.pyi +0 -0
  86. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/nss.pyi +0 -0
  87. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/nss_context.py +0 -0
  88. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_nspr_common.h +0 -0
  89. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_nspr_error.c +0 -0
  90. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_nspr_error.h +0 -0
  91. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_nspr_io.c +0 -0
  92. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_nspr_io.h +0 -0
  93. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_nss.c +0 -0
  94. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_nss.h +0 -0
  95. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_shared_doc.h +0 -0
  96. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_ssl.c +0 -0
  97. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_ssl.h +0 -0
  98. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/py_traceback.h +0 -0
  99. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/secure_logging.py +0 -0
  100. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/src/ssl.pyi +0 -0
  101. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/conftest.py +0 -0
  102. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/exceptions.py +0 -0
  103. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/run_tests +0 -0
  104. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_cert_components.py +0 -0
  105. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_cert_request.py +0 -0
  106. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_certificate_advanced.py +0 -0
  107. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_cipher.py +0 -0
  108. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_deprecations.py +0 -0
  109. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_digest.py +0 -0
  110. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_documentation_accuracy.py +0 -0
  111. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_examples.py +0 -0
  112. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_misc.py +0 -0
  113. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_performance.py +0 -0
  114. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_pkcs12.py +0 -0
  115. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_platform_specific.py +0 -0
  116. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_property_based.py +0 -0
  117. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_secure_logging.py +0 -0
  118. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_security.py +0 -0
  119. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_thread_safety.py +0 -0
  120. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_type_hints.py +0 -0
  121. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_util.py +0 -0
  122. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_zzz_error_messages.py +0 -0
  123. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_zzz_integration.py +0 -0
  124. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_zzz_nonexistent_certs.py +0 -0
  125. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_zzz_nss_context.py +0 -0
  126. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/test_zzz_ocsp.py +0 -0
  127. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/test/util.py +0 -0
  128. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/typings/nss/__init__.pyi +0 -0
  129. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/typings/nss/error.pyi +0 -0
  130. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/typings/nss/io.pyi +0 -0
  131. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/typings/nss/nss.pyi +0 -0
  132. {python_nss_ng-1.1.0 → python_nss_ng-1.2.1}/typings/nss/ssl.pyi +0 -0
@@ -0,0 +1,4 @@
1
+ node: 0dedcdfba5bdf88fee5c42918949cb6403738886
2
+ node-date: 2026-06-30T09:23:01-06:00
3
+ describe-name: v1.2.1
4
+ ref-names: grafted, HEAD, tag: v1.2.1, origin/main, origin/HEAD
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-nss-ng
3
- Version: 1.1.0
3
+ Version: 1.2.1
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>
@@ -0,0 +1,77 @@
1
+ <!--
2
+ SPDX-License-Identifier: Apache-2.0
3
+ SPDX-FileCopyrightText: 2026 The Linux Foundation
4
+ -->
5
+
6
+ # Security Policy
7
+
8
+ This document describes the security policy for this repository, including
9
+ which versions receive security updates and how to report vulnerabilities.
10
+
11
+ ## Supported Versions
12
+
13
+ Maintainers develop and merge security fixes on the default branch
14
+ (`main`) and publish those fixes in the latest tagged release. Older
15
+ releases and tags do not receive security updates. Users should track
16
+ the latest tagged release for security patches.
17
+
18
+ | Version | Supported |
19
+ | --------------------- | ------------------ |
20
+ | Latest tagged release | :white_check_mark: |
21
+ | Older releases/tags | :x: |
22
+
23
+ ## Reporting a Vulnerability
24
+
25
+ If you discover a security vulnerability in this project, please report it
26
+ **privately** so that maintainers can investigate and release a fix before
27
+ the issue becomes publicly known.
28
+
29
+ ### Preferred: GitHub Private Vulnerability Reporting
30
+
31
+ Use GitHub's private vulnerability reporting feature:
32
+
33
+ 1. Navigate to the **Security** tab of this repository.
34
+ 2. Click **Report a vulnerability**.
35
+ 3. Provide as much detail as possible (see below).
36
+
37
+ This creates a private advisory visible to maintainers.
38
+
39
+ ### Alternative: Email
40
+
41
+ If you cannot use GitHub's private reporting, send an email to the Linux
42
+ Foundation Release Engineering team at:
43
+
44
+ - **<releng@linuxfoundation.org>**
45
+
46
+ Please do **not** report security vulnerabilities through public GitHub
47
+ issues, discussions, or pull requests.
48
+
49
+ ### What to Include
50
+
51
+ To help maintainers triage and resolve the report, please include:
52
+
53
+ - A clear description of the vulnerability and its potential impact.
54
+ - Steps to reproduce the issue (proof-of-concept code or commands).
55
+ - The affected version(s), commit SHA, or release tag.
56
+ - Any known mitigations or workarounds.
57
+ - Your name and contact details for follow-up (optional).
58
+
59
+ ## Response Process
60
+
61
+ Maintainers will acknowledge receipt of vulnerability reports within
62
+ **5 business days**. We aim to:
63
+
64
+ 1. Confirm the vulnerability and determine its severity.
65
+ 2. Develop and test a fix in a private branch or advisory.
66
+ 3. Coordinate a disclosure timeline with the reporter.
67
+ 4. Release a patched version and publish a security advisory.
68
+
69
+ We follow a responsible disclosure process and credit reporters in the
70
+ published advisory unless they request to remain anonymous.
71
+
72
+ ## Scope
73
+
74
+ This policy covers the source code, configuration, and documentation
75
+ in this repository. Please report vulnerabilities in upstream
76
+ dependencies to their respective maintainers; this project will update
77
+ affected dependencies once fixes become available.
@@ -0,0 +1 @@
1
+ 1.2.1
@@ -319,3 +319,9 @@ before-all = "yum install -y nss-devel nspr-devel pkg-config || apt-get update &
319
319
 
320
320
  [tool.cibuildwheel.macos]
321
321
  before-all = "brew install nss nspr pkg-config"
322
+
323
+ [tool.uv]
324
+ # Supply-chain cooldown: do not resolve anything published in the last
325
+ # 7 days (rolling window; uv records it as a relative span in uv.lock).
326
+ # Requires uv >= 0.9.17 for the relative-duration ("7 days") form.
327
+ exclude-newer = "7 days"
@@ -667,7 +667,7 @@ def setup_certs(args):
667
667
  logging.info('Certificate nickname "%s"\n%s', nickname, format_cert(options, nickname))
668
668
 
669
669
  logging.info("---------- Summary ----------")
670
- logging.info('NSS database name="%s", password="%s"', options.db_name, options.db_passwd)
670
+ logging.info('NSS database name="%s", password="[REDACTED]"', options.db_name)
671
671
  logging.info("system FIPS mode=%s", get_system_fips_enabled())
672
672
  logging.info("DB FIPS mode=%s", get_db_fips_enabled(options.db_name))
673
673
  logging.info('CA nickname="%s", CA subject="%s"', options.ca_nickname, options.ca_subject)
@@ -272,7 +272,7 @@ def get_free_port():
272
272
  happens quickly enough that this is rarely an issue in practice.
273
273
  """
274
274
  with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
275
- s.bind(("", 0))
275
+ s.bind(("127.0.0.1", 0))
276
276
  s.listen(1)
277
277
  port = s.getsockname()[1]
278
278
  return port
@@ -283,8 +283,10 @@ def server(test_port):
283
283
  print("starting server:")
284
284
 
285
285
  # Initialize
286
- # Setup an IP Address to listen on any of our interfaces
287
- net_addr = io.NetworkAddress(io.PR_IpAddrAny, test_port)
286
+ # Setup an IP Address to listen on the loopback interface only.
287
+ # The tests are entirely local (the client connects via localhost),
288
+ # so there is no need to listen on all interfaces.
289
+ net_addr = io.NetworkAddress(io.PR_IpAddrLoopback, test_port)
288
290
 
289
291
  if use_ssl:
290
292
  if info:
@@ -9,6 +9,10 @@ resolution-markers = [
9
9
  "python_full_version < '3.12'",
10
10
  ]
11
11
 
12
+ [options]
13
+ exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values.
14
+ exclude-newer-span = "P7D"
15
+
12
16
  [[package]]
13
17
  name = "ast-serialize"
14
18
  version = "0.3.0"
@@ -1,4 +0,0 @@
1
- node: ceb747232755bf570e5ceacb4e3a82f5d31ca085
2
- node-date: 2026-06-09T07:15:24-06:00
3
- describe-name: v1.1.0
4
- ref-names: grafted, HEAD, tag: v1.1.0, origin/main, origin/HEAD
@@ -1 +0,0 @@
1
- 1.1.0
@@ -1,216 +0,0 @@
1
- # SPDX-License-Identifier: MPL-2.0
2
- # SPDX-FileCopyrightText: 2025 The Linux Foundation
3
-
4
- [build-system]
5
- requires = [
6
- "meson-python>=0.18.0",
7
- "meson>=1.10.0",
8
- "ninja",
9
- ]
10
- build-backend = "mesonpy"
11
-
12
- [project]
13
- name = "python-nss-ng"
14
- version = "1.0.1"
15
- description = "Python bindings for Network Security Services (NSS) and Netscape Portable Runtime (NSPR)"
16
- readme = "README.md"
17
- license = "MPL-2.0 OR GPL-2.0-or-later OR LGPL-2.0-or-later"
18
- license-files = ["LICENSE", "LICENSES/MPL-2.0.txt"]
19
- requires-python = ">=3.10"
20
- authors = [
21
- {name = "John Dennis", email = "jdennis@redhat.com"},
22
- {name = "Matthew Watkins", email = "mwatkins@linuxfoundation.org"},
23
- ]
24
- maintainers = [
25
- {name = "Matthew Watkins", email = "mwatkins@linuxfoundation.org"},
26
- ]
27
- keywords = [
28
- "nss",
29
- "nspr",
30
- "cryptography",
31
- "ssl",
32
- "tls",
33
- "pki",
34
- "x509",
35
- "security",
36
- ]
37
- classifiers = [
38
- "Development Status :: 5 - Production/Stable",
39
- "Intended Audience :: Developers",
40
-
41
- "Operating System :: POSIX",
42
- "Operating System :: POSIX :: Linux",
43
- "Operating System :: MacOS",
44
- "Programming Language :: C",
45
- "Programming Language :: Python :: 3",
46
- "Programming Language :: Python :: 3.10",
47
- "Programming Language :: Python :: 3.11",
48
- "Programming Language :: Python :: 3.12",
49
- "Programming Language :: Python :: 3.13",
50
- "Programming Language :: Python :: 3.14",
51
- "Programming Language :: Python :: Implementation :: CPython",
52
- "Topic :: Security",
53
- "Topic :: Security :: Cryptography",
54
- "Topic :: Software Development :: Libraries :: Python Modules",
55
- ]
56
-
57
- [project.optional-dependencies]
58
- test = [
59
- "pytest>=9.0.2",
60
- "pytest-cov>=7.0.0",
61
- "coverage[toml]>=7.13.1",
62
- "pytest-xdist>=3.8.0",
63
- "mypy>=1.0.0",
64
- "hypothesis>=6.0.0",
65
- "mutmut>=2.4.0",
66
- "meson>=1.10.0",
67
- "meson-python>=0.18.0",
68
- "ninja",
69
- ]
70
- dev = [
71
- "pytest>=9.0.2",
72
- "pytest-cov>=7.0.0",
73
- "coverage[toml]>=7.13.1",
74
- "pytest-xdist>=3.8.0",
75
- "mypy>=1.0.0",
76
- "hypothesis>=6.0.0",
77
- "mutmut>=2.4.0",
78
- "ruff>=0.14.10",
79
- "build>=1.3.0",
80
- "meson>=1.10.0",
81
- "meson-python>=0.18.0",
82
- "ninja",
83
- ]
84
-
85
- [project.urls]
86
- Homepage = "http://www.mozilla.org/projects/security/pki/python-nss-ng"
87
- Documentation = "http://www.mozilla.org/projects/security/pki/python-nss-ng"
88
- Repository = "https://github.com/lfreleng-actions/python-nss-ng"
89
- Issues = "https://github.com/lfreleng-actions/python-nss-ng/issues"
90
-
91
- [tool.meson-python.args]
92
- # Meson build arguments can be specified here if needed
93
- # For example, to enable debug builds:
94
- # setup = ['-Dbuildtype=debug']
95
-
96
- [tool.pytest.ini_options]
97
- testpaths = ["test"]
98
- python_files = ["test_*.py"]
99
- python_classes = ["Test*"]
100
- python_functions = ["test_*"]
101
- # Note: Use -n0 for serial execution for 100% reliability
102
- # Parallel execution (-n=auto) may have intermittent failures in PKCS12 tests
103
- addopts = [
104
- "-v",
105
- "--strict-markers",
106
- "--tb=short",
107
- "--cov=nss",
108
- "--cov-report=xml",
109
- "--cov-report=html",
110
- ]
111
- markers = [
112
- "nss_init: mark test as requiring NSS initialization",
113
- "requires_db: mark test as requiring NSS database",
114
- "slow: mark test as slow running",
115
- "allow_insecure: mark test as allowing insecure/legacy configurations",
116
- ]
117
-
118
- [tool.coverage.run]
119
- source = ["nss"]
120
- branch = true
121
- data_file = ".coverage"
122
- omit = [
123
- "*/test/*",
124
- "*/tests/*",
125
- "*/_version.py",
126
- ]
127
-
128
- [tool.coverage.xml]
129
- output = "coverage.xml"
130
-
131
- [tool.coverage.report]
132
- exclude_lines = [
133
- "pragma: no cover",
134
- "def __repr__",
135
- "raise AssertionError",
136
- "raise NotImplementedError",
137
- "if __name__ == .__main__.:",
138
- "if TYPE_CHECKING:",
139
- ]
140
-
141
- [tool.ruff]
142
- line-length = 100
143
- target-version = "py39"
144
- exclude = [
145
- ".git",
146
- "__pycache__",
147
- "build",
148
- "dist",
149
- ".eggs",
150
- "*.egg-info",
151
- ".pytest_cache",
152
- ]
153
-
154
- [tool.ruff.lint]
155
- select = [
156
- "E", # pycodestyle errors
157
- "W", # pycodestyle warnings
158
- "F", # pyflakes
159
- "I", # isort
160
- "B", # flake8-bugbear
161
- "C4", # flake8-comprehensions
162
- "UP", # pyupgrade
163
- "S", # flake8-bandit (security)
164
- "T20", # flake8-print
165
- "PT", # flake8-pytest-style
166
- "RET", # flake8-return
167
- "SIM", # flake8-simplify
168
- "TCH", # flake8-type-checking
169
- "RUF", # Ruff-specific rules
170
- ]
171
- ignore = [
172
- "E501", # line too long, handled by formatter
173
- "B008", # do not perform function calls in argument defaults
174
- "C901", # too complex
175
- "S101", # assert detected (allow in tests)
176
- "T201", # print found (intentional in examples)
177
- "UP006", # Use `X` instead of `typing.X` for type annotations (Python 3.9 compat)
178
- "UP007", # Use `X | Y` for union types (Python 3.9 compat)
179
- "UP035", # Import from `typing` is deprecated (Python 3.9 compat)
180
- ]
181
-
182
- [tool.ruff.lint.per-file-ignores]
183
- "test_*.py" = ["E402", "S101", "S105", "S106"] # Allow asserts and hardcoded passwords in tests
184
- "doc/examples/*.py" = ["T201", "S105", "S106"] # Allow prints and test passwords in examples
185
- "test/setup_certs.py" = ["S603", "S607"] # Allow subprocess calls in cert setup
186
-
187
- [tool.ruff.lint.isort]
188
- known-first-party = ["nss"]
189
-
190
- [tool.mypy]
191
- python_version = "3.9"
192
- warn_unused_ignores = true
193
- disallow_any_generics = true
194
- disallow_incomplete_defs = true
195
- no_implicit_optional = true
196
- strict_equality = true
197
- warn_redundant_casts = true
198
- warn_return_any = true
199
- check_untyped_defs = true
200
-
201
- [tool.mutmut]
202
- paths_to_mutate = ["src/deprecations.py", "src/secure_logging.py", "src/nss_context.py"]
203
- backup = false
204
- runner = "python -m pytest -x -q"
205
- tests_dir = "test/"
206
- dict_synonyms = ["Struct", "Named"]
207
-
208
- [tool.cibuildwheel]
209
- skip = ["pp*", "*-musllinux*"]
210
- build-verbosity = 1
211
-
212
- [tool.cibuildwheel.linux]
213
- before-all = "yum install -y nss-devel nspr-devel pkg-config || apt-get update && apt-get install -y libnss3-dev libnspr4-dev pkg-config"
214
-
215
- [tool.cibuildwheel.macos]
216
- before-all = "brew install nss nspr pkg-config"