Commit ea7dace
Skip the external-DTD tests where nothing may load one (#356)
The sdist job fails on `test_sign_and_verify_with_an_id_an_external_dtd_
declares`, added with the external-subset fix in 3a50b04 and never yet
through CI. Ubuntu 22.04 ships libxmlsec1 1.2.33 with the XXE patch
backported, and that xmlsec installs its no-XXE external entity loader
globally at xmlSecInit — so importing xmlsec refuses lxml its own
`load_dtd=True` parse, well before any shadow exists. libxml2 is matched
in that job (lxml is built with --no-binary), so the raw path is what
runs: no declaration is made, `#ext` resolves to nothing and the sign
fails. The test's premise, not its subject, is what the environment
removes.
Both tests that need a loaded subset now go through
`parse_with_external_dtd`, which skips when `docinfo.externalDTD` comes
back None — the same signal `PyXmlSec_LxmlDocumentSubsets` reads to
decide whether the copy should load one. Verified by hiding
tests/data/id_attr.dtd: 4 skips, no failures.
318 passed / 6 skipped on the mismatch build; 330 / 6 on the matched
static wheel, plain and with PYXMLSEC_FORCE_SHADOW=1.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 48e8d0d commit ea7dace
1 file changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
| |||
288 | 287 | | |
289 | 288 | | |
290 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
291 | 304 | | |
292 | 305 | | |
293 | | - | |
| 306 | + | |
294 | 307 | | |
295 | 308 | | |
296 | 309 | | |
| |||
0 commit comments