def _reconstitute(self):
        """
        Reconstitute this L{URLPath} from all its given attributes.
        """
        urltext = urlquote(
            urlparse.urlunsplit((self._scheme, self._netloc,
                                 self._path, self._query, self._fragment)),
            safe=_allascii
        )
        self._url = _URL.fromText(urltext.encode("ascii").decode("ascii"))

        Reconstitute this L{URLPath} from all its given attributes.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/urlpath.py