Mercurial > hg
view contrib/automation/hgautomation/pypi.py @ 46513:c3c7a86e9c24
tests: fix differing output between py2 and py3
db9e33beb0fb broke the tests because of the difference in bytestring repr
between py2 and py3. Rather than backout that change for so little, I figured
I'd fix it myself.
Hopefully Python 2 supports gets dropped very soon.
Differential Revision: https://phab.mercurial-scm.org/D9987
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Fri, 12 Feb 2021 12:51:28 +0100 |
parents | 2372284d9457 |
children |
line wrap: on
line source
# pypi.py - Automation around PyPI # # Copyright 2019 Gregory Szorc <gregory.szorc@gmail.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # no-check-code because Python 3 native. from twine.commands.upload import upload as twine_upload from twine.settings import Settings def upload(paths): """Upload files to PyPI. `paths` is an iterable of `pathlib.Path`. """ settings = Settings() twine_upload(settings, [str(p) for p in paths])