The idea is to move scrapy's `canonicalize_url()` helper to `w3lib.url` Projects like frontera could be interested: see https://github.com/scrapinghub/frontera/pull/168#issuecomment-234558699