This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients eli.bendersky, lukasz.langa, scoder, steve.dower
Date 2019-05-07.13:19:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557235199.92.0.526138899784.issue36831@roundup.psfhosted.org>
In-reply-to
Content
I suspect this is related to the fix for issue30485, but haven't fully debugged it.

In PC/layout/support/appxmanifest.py, I have code that looks up an existing element and adds it if missing:

def find_or_add(xml, element, attr=None, always_add=False):
    if always_add:
        e = None
    else:
        q = element
        if attr:
            q += "[@{}='{}']".format(*attr)
        e = xml.find(q, APPXMANIFEST_NS)
    if e is None:
        ...
    return e

For my 3.8.0a4 build, this started failing to match elements with attributes included. As a result, I ended up with N elements in a space where the schema only allows 1, and part of the 3.8.0a4 release is now blocked (okay, it's unblocked because I manually fixed a file and built the rest by hand, but it still held things up by a day).

I found that by removing the empty string entry in my namespaces dictionary the issue is fixed:

APPXMANIFEST_NS = {
    #"": "http://schemas.microsoft.com/appx/manifest/foundation/windows10",
    "m": "http://schemas.microsoft.com/appx/manifest/foundation/windows10",
    ...
}

So I'm not exactly sure what's going on, but as code that worked fine in 3.8.0a3 and earlier now no longer works, I think we should see whether it was a deliberate break or accidental. If there's no reason to regress users, I'd prefer to avoid it.
History
Date User Action Args
2019-05-07 13:19:59steve.dowersetrecipients: + steve.dower, scoder, eli.bendersky, lukasz.langa
2019-05-07 13:19:59steve.dowersetmessageid: <1557235199.92.0.526138899784.issue36831@roundup.psfhosted.org>
2019-05-07 13:19:59steve.dowerlinkissue36831 messages
2019-05-07 13:19:59steve.dowercreate