Skip to content

Redundant namespaces publishes by pyFF #318

@majagw

Description

@majagw

The publish command produces output which contains redundant (unused) namespaces.
It was tested using the current release version 2.1.5
Recently eduGAIN OT team was warned that it could cause a problem while a Shibboleth IdP server is configured to limit attributes count.
(see https://shibboleth.net/pipermail/users/2026-May/057030.html thread)

As I tested it is easy to cleanup namespaces before writing an output by using etree.cleanup_namespaces():

--- pyFF/src/pyff/builtins.py	2026-05-18 13:36:58
+++ pyFF-ns/src/pyff/builtins.py	2026-05-18 13:40:58
@@ -551,6 +551,10 @@
         resource_name = m.group(2)
     out = output_file
     data = req.t
+
+    # clean unused namespaces
+    etree.cleanup_namespaces(data)
+
     if not req.args.get('raw'):
         data = dumptree(req.t, pretty_print=req.args.get('pretty_print'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions