Bug#881287: python-daiquiri: Add python2 support

2017-11-20 Thread Corey Bryant
On Mon, Nov 20, 2017 at 2:49 AM, Chris Lamb  wrote:

> Chris Lamb wrote:
>
> > Alas your patch doesn't seem to work properly here:
>
> [..]
>
> Gentle ping on this? :)
>
>
>
Sorry, I don't know how I missed your previous message. If you don't mind I
don't think we should add the py2 support. I'm fine with that.

Thanks,
Corey


Bug#881287: python-daiquiri: Add python2 support

2017-11-19 Thread Chris Lamb
Chris Lamb wrote:

> Alas your patch doesn't seem to work properly here:

[..]

Gentle ping on this? :)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#881287: python-daiquiri: Add python2 support

2017-11-09 Thread Chris Lamb
Hi Corey,

> Good point. I think we just need to get moving on our end. We currently
> only ship py2 for core openstack packages because upstream hasn't
> completely moved to py3

Happy to apply in that case; I was just checking it wasn't because "there
is no Python 2 package so we must make one..." :)

Alas your patch doesn't seem to work properly here:

  W: python-daiquiri: empty-binary-package
  W: python3-daiquiri: empty-binary-package

Seems to be installing to debian/tmp and never installing to
debian/python{,2}-daiquiri:

  https://gist.github.com/lamby/d006640ef9bd9e2fda6ae6af3a25d32a/raw

(Also note duplicate-short-description :p)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#881287: python-daiquiri: Add python2 support

2017-11-09 Thread Corey Bryant
On Thu, Nov 9, 2017 at 3:24 PM, Chris Lamb  wrote:

> Hi Corey,
>
>
Hi Chris,


> > In Ubuntu, the attached patch was applied to achieve the following:
>
> Thanks for the patch. However, is Python 2 support explicitly required by
> a user or reverse-dependency?
>
>
Good point. I think we just need to get moving on our end. We currently
only ship py2 for core openstack packages because upstream hasn't
completely moved to py3. Anyway I think we can start moving some of them
over to py3 only and gnocchi is one of them (it needs daiquiri). So feel
free to nack this bug and I'll fix up our gnocchi package to be py3 only.

Thanks,
Corey

I would like to avoid introducing further Python 2 packages into the
> world - just another we will have to remove later...
>
>
> Best wishes,
>
> --
>   ,''`.
>  : :'  : Chris Lamb
>  `. `'`  la...@debian.org / chris-lamb.co.uk
>`-
>


Bug#881287: python-daiquiri: Add python2 support

2017-11-09 Thread Chris Lamb
Hi Corey,

> In Ubuntu, the attached patch was applied to achieve the following:

Thanks for the patch. However, is Python 2 support explicitly required by
a user or reverse-dependency?

I would like to avoid introducing further Python 2 packages into the
world - just another we will have to remove later...


Best wishes,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#881287: python-daiquiri: Add python2 support

2017-11-09 Thread Corey Bryant
Package: python-daiquiri
Version: 1.3.0-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu bionic ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/control, d/rules, d/tests/*: Add python 2 support.


Thanks for considering the patch.


-- System Information:
Debian Release: buster/sid
  APT prefers bionic
  APT policy: (500, 'bionic')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-16-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru python-daiquiri-1.3.0/debian/control 
python-daiquiri-1.3.0/debian/control
--- python-daiquiri-1.3.0/debian/control2017-09-20 03:29:15.0 
-0400
+++ python-daiquiri-1.3.0/debian/control2017-11-09 10:17:33.0 
-0500
@@ -5,6 +5,10 @@
 Build-Depends:
  debhelper (>= 10),
  dh-python,
+ python-all,
+ python-pbr,
+ python-testtools,
+ python-setuptools,
  python3-all,
  python3-pbr,
  python3-testtools,
@@ -15,6 +19,32 @@
 Vcs-Browser: https://github.com/lamby/pkg-python-daiquiri
 Homepage: https://github.com/jd/daiquiri
 
+Package: python-daiquiri
+Architecture: all
+Depends:
+ ${misc:Depends},
+ ${python:Depends},
+Description: Python library to easily setup basic logging functionality
+ The daiquiri library provides an easy way to configure logging. It also
+ provides some custom formatters and handlers.
+ .
+ Its promise is to setup a complete standard Python logging system with just
+ one function call. Nothing more, nothing less. The interesting features are:
+ .
+  * Logs to stderr by default.
+  * Use colors if logging to a terminal.
+  * Support file logging.
+  * Use program name as the name of the logging file so providing just a
+directory for logging will work.
+  * Support syslog.
+  * Support journald.
+  * JSON output support.
+  * Support of arbitrary key/value context information providing.
+  * Capture the warnings emitted by the warnings module.
+  * Native logging of any exception.
+ .
+ This is the Python 2 version of the package.
+
 Package: python3-daiquiri
 Architecture: all
 Depends:
diff -Nru python-daiquiri-1.3.0/debian/rules python-daiquiri-1.3.0/debian/rules
--- python-daiquiri-1.3.0/debian/rules  2017-09-20 03:29:15.0 -0400
+++ python-daiquiri-1.3.0/debian/rules  2017-11-09 10:17:33.0 -0500
@@ -5,7 +5,7 @@
 export PBR_VERSION = $(DEB_VERSION_UPSTREAM)
 
 %:
-   dh $@ --with python3 --buildsystem=pybuild
+   dh $@ --with python2,python3 --buildsystem=pybuild
 
 override_dh_auto_test:
# Tests require python-json-logger, which is not yet packaged for
diff -Nru python-daiquiri-1.3.0/debian/tests/0001-smoketest 
python-daiquiri-1.3.0/debian/tests/0001-smoketest
--- python-daiquiri-1.3.0/debian/tests/0001-smoketest   2017-09-20 
03:29:15.0 -0400
+++ python-daiquiri-1.3.0/debian/tests/0001-smoketest   1969-12-31 
19:00:00.0 -0500
@@ -1,11 +0,0 @@
-#!/usr/bin/env python3
-
-import daiquiri
-
-daiquiri.setup()
-
-logger = daiquiri.getLogger(__name__)
-
-logger.info("Info")
-logger.warning("Warning")
-logger.error("Error")
diff -Nru python-daiquiri-1.3.0/debian/tests/0001-smoketest-python2 
python-daiquiri-1.3.0/debian/tests/0001-smoketest-python2
--- python-daiquiri-1.3.0/debian/tests/0001-smoketest-python2   1969-12-31 
19:00:00.0 -0500
+++ python-daiquiri-1.3.0/debian/tests/0001-smoketest-python2   2017-11-09 
10:17:33.0 -0500
@@ -0,0 +1,11 @@
+#!/usr/bin/env python2
+
+import daiquiri
+
+daiquiri.setup()
+
+logger = daiquiri.getLogger(__name__)
+
+logger.info("Info")
+logger.warning("Warning")
+logger.error("Error")
diff -Nru python-daiquiri-1.3.0/debian/tests/0001-smoketest-python3 
python-daiquiri-1.3.0/debian/tests/0001-smoketest-python3
--- python-daiquiri-1.3.0/debian/tests/0001-smoketest-python3   1969-12-31 
19:00:00.0 -0500
+++ python-daiquiri-1.3.0/debian/tests/0001-smoketest-python3   2017-11-09 
10:17:33.0 -0500
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+
+import daiquiri
+
+daiquiri.setup()
+
+logger = daiquiri.getLogger(__name__)
+
+logger.info("Info")
+logger.warning("Warning")
+logger.error("Error")
diff -Nru python-daiquiri-1.3.0/debian/tests/control 
python-daiquiri-1.3.0/debian/tests/control
--- python-daiquiri-1.3.0/debian/tests/control  2017-09-20 03:29:15.0 
-0400
+++ python-daiquiri-1.3.0/debian/tests/control  2017-11-09 10:17:33.0 
-0500
@@ -1,2 +1,2 @@
-Tests: 0001-smoketest
+Tests: 0001-smoketest-python2 0001-smoketest-python3
 Restrictions: allow-stderr