{
    "body": "There are cases when we compare two specs, one of which has a namespace and another one does not (i.e. the corresponding property is set to `None`). As a result, we get a variation of the following error when running Spack with Python 3:\r\n```console\r\nTypeError: '<' not supported between instances of 'NoneType' and 'str'\r\n```\r\nNote that Python 2 does not have a problem comparing None to a string.\r\n\r\nI am not sure whether this is the right way to fix the problem. However, it can be reproduced by running\r\n```console\r\n$ spack spec cdo\r\n```\r\nwith the following `packages.yaml`:\r\n```yaml\r\npackages:\r\n  all:\r\n    providers:\r\n      szip: [libaec]\r\n  eccodes:\r\n    variants: +aec\r\n  hdf5:\r\n    variants: +szip\r\n```",
    "user": "skosukhin",
    "url": "https://api.github.com/repos/spack/spack/issues/18844",
    "updated_at": "2021-02-15 17:26:23",
    "created_at": "2020-09-21 16:04:08",
    "closed_at": "2021-02-15 17:26:22",
    "state": "closed",
    "title": "Compatibility with Python 3 when sorting specs",
    "number": 18844,
    "milestone": null,
    "labels": [
        "specs",
        "python3"
    ],
    "id": 705730630,
    "html_url": "https://github.com/spack/spack/pull/18844",
    "assignees": [
        "alalazo"
    ],
    "comments": 1
}