93 Commits

Author SHA1 Message Date
Benjamin Drung
b1bc7e1cdc Address pylint complaints
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 23:10:31 +01:00
Benjamin Drung
4e27045f49 style: Sort Python imports with isort
```
isort -l 99 --profile=black .
```

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 21:28:47 +01:00
Benjamin Drung
3354b526b5 style: Format Python code with black
```
PYTHON_SCRIPTS=$(grep -l -r '^#! */usr/bin/python3$' .)
black -C -l 99 . $PYTHON_SCRIPTS
```

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 19:45:36 +01:00
Dan Streetman
90e8fe81e1 replace ubuntutools.logger with standard python logging 2019-11-25 10:10:06 -05:00
Dan Streetman
b96885f05e ubuntutools/archive: convert external rmadison call to native implementation
instead of a function that calls the system program rmadison, use
a fully-functional class to interface with the madison api, as well
as the debian snapshot api
2019-11-25 09:57:54 -05:00
Mattia Rizzolo
434ca8952e
Merge branch 'python3' of git+ssh://git.launchpad.net/ubuntu-dev-tools
MR: https://code.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/+git/ubuntu-dev-tools/+merge/372305
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
2019-09-10 14:19:07 +02:00
Dan Streetman
a7d166b52f pull-pkg: use ubuntutools/version/Version
instead of debian.debian_support.Version, use ubuntutools version,
which extends it and adds the strip_epoch() function which is
needed to convert full version string to version used in filenames
2019-09-09 12:25:21 -04:00
Stefano Rivera
06642ef9f7 Remove some more u'' strings 2019-09-05 16:10:26 -03:00
Stefano Rivera
301569e809 Pull out Python 2 support hacks 2019-09-04 19:24:44 -03:00
Stefano Rivera
2d3765522e Use the Popen() encoding flag to decode to unicode
This should make behavior identical on Python 2 & 3.
2019-09-04 19:24:44 -03:00
Mattia Rizzolo
edb49c652c
Fix test failures with newer flake8 and pylint.
Closes: #891721
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
2018-03-08 12:56:36 +01:00
Iain Lane
0a3738cfbc Fix some 2/3 differences and run pylint with confidence=HIGH
Too many false positives otherwise.
2017-05-30 11:22:49 +01:00
Benjamin Drung
cc7170eccb Fix all flake8 issues 2017-05-01 00:20:03 +02:00
Adam Conrad
f0d22226a9 Allow requestsync/syncpackage to work with either codename or alias 2015-06-14 13:50:28 -06:00
Dimitri John Ledkov
3f512ee337 rs/mail 2014-12-18 20:48:28 +00:00
Dimitri John Ledkov
1d2f7f6d0d rs/lp 2014-12-18 20:45:58 +00:00
Benjamin Drung
c2aa97dba2 Move devscripts.logger to ubuntutools.logger. 2013-03-19 00:18:02 +01:00
Stefano Rivera
1c698ff626 While we're there, Updates is derived from Proposed 2012-10-22 22:09:31 +02:00
Stefano Rivera
24e1161d3c syncpackage, requestsync: Check the Release pocket if we can't find an
Ubuntu package in the requested pocket. (LP: #1069867)
2012-10-22 21:42:58 +02:00
Stefano Rivera
343ac49b39 pbuilder-dist, pull-debian-source, pull-lp-source, requestsync,
reverse-depends, submittodebian, syncpackage:
Handle outdated distro-info data. Fall back to sane defaults where
possible.
2012-05-06 10:15:54 +02:00
Stefano Rivera
e68d3a699d Bump logging level of 'connecting' message 2011-12-03 22:07:18 +02:00
Stefano Rivera
9442e2ea30 Catch response exceptions in the DATA phase 2011-12-03 22:06:49 +02:00
Stefano Rivera
899d1b5361 Use tempfile 2011-12-03 21:57:11 +02:00
Andreas Moog
8a6502aaa4 Use regex to filter unwanted characters in filename 2011-12-03 18:09:49 +01:00
Andreas Moog
32a85dc172 Add a exception for disconnected server 2011-12-03 18:01:55 +01:00
Andreas Moog
d18a35c449 Also allow retry if recipient got rejected 2011-12-03 11:57:18 +01:00
Andreas Moog
12030d99e9 Use bugtitle as temporary filename 2011-12-03 11:12:11 +01:00
Andreas Moog
9199747fc3 Space after comma 2011-12-02 20:06:57 +01:00
Andreas Moog
0e3a831df9 Use Logger.normal 2011-11-29 20:20:25 +01:00
Andreas Moog
10e9b18ca7 Save a temporary file in case sending fails 2011-11-28 20:50:28 +01:00
Andreas Moog
d9c00752c0 Wrap long line 2011-11-28 19:53:23 +01:00
Andreas Moog
677e1b8e4e requestsync: Give user option to retry in case of temporary error (LP: #850360) 2011-11-27 22:14:05 +01:00
Stefano Rivera
70a035f13d Use httplib2 everywhere that we do https. The python stdlib doesn't do
certificate verification.
2011-11-22 15:57:02 +02:00
Stefano Rivera
09e468211a Add changelog retrieval to lpapicache, and use this in syncpackage and
requestsync. The changelogs should be available in Launchpad sooner than
Debian PTS.
2011-11-13 22:50:34 +02:00
Stefano Rivera
d4fbed617f Use EditBugReport instead of requestsync's edit_report. Drop that. 2011-11-13 20:15:19 +02:00
Stefano Rivera
2b51da9af7 Print the URL that failed in get_changelog(). Thanks Barry! 2011-10-24 22:39:01 +02:00
Stefano Rivera
46f3f929bc Native syncs won't have changes files 2011-09-10 16:06:56 +02:00
Benjamin Drung
1c814c8ec6 ubuntutools/requestsync: Follow PEP 8 naming conventions. 2011-09-10 15:42:40 +02:00
Benjamin Drung
1aabfec757 Wrap long line. 2011-09-10 15:21:40 +02:00
Stefano Rivera
cd236932de * requestsync: Extract current Ubuntu delta from changelog entries and provide for editing (LP: #547925)
* Bump python-debian B-D and Depends to 0.1.20 for unicode Changelog reading.
2011-09-10 10:28:41 +02:00
Benjamin Drung
f82cd1f2cc Use full sentences. 2011-09-10 00:50:48 +02:00
Stefano Rivera
178456394e requestsync: Add nice error messages to gpg-signing code, rather than
simple assertions (LP: #537288)
2011-09-09 20:03:47 +02:00
Julian Taylor
7c40574cf4 requestsync: add more non terminal status to dup check 2011-09-06 01:42:28 +02:00
Julian Taylor
36bc8ee0f7 requestsync: omit dups when checking for duplicate requests (LP: #842217) 2011-09-06 01:15:41 +02:00
Stefano Rivera
165279fae9 TODO note on getDebianChangelog 2011-08-24 23:48:48 +02:00
Colin Watson
a6b95b7d53 style 2011-08-18 15:11:36 +01:00
Colin Watson
5eb960dd3f make better use of ubuntutools.archive, allowing us to detect when fakesyncs are required in LP mode 2011-08-17 03:03:01 +01:00
Benjamin Drung
a03fa654f3 Move debian-distro-info, distro-info, and ubuntu-distro-info from
ubuntu-dev-tools into distro-info.
2011-06-25 17:53:44 +02:00
Evan Broder
d82e65e0e2 * ubuntutools.subprocess:
- New drop-in replacement wrapper module around subprocess that
    backports the restore_signals kwarg and defaults close_fds=True
  - Switch everything previously using subprocess to use
    ubuntutools.subprocess instead (LP: #785854)
2011-05-24 20:22:37 +02:00
Stefano Rivera
989aecd253 Canonicalise suites (use code-names) before passing them to rmadison. 2011-03-06 00:48:24 +02:00