Skip to content

Python 3 support#21

Merged
solarkennedy merged 2 commits into
asher:masterfrom
navidurrahman:python3_support
Mar 7, 2016
Merged

Python 3 support#21
solarkennedy merged 2 commits into
asher:masterfrom
navidurrahman:python3_support

Conversation

@navidurrahman
Copy link
Copy Markdown
Contributor

Support for python 3 and removed chronos legacy version

Change default chronos version

  • Mesosphere removed chronos version 2.3.4 for ubuntu 12.04.
  • Tested with chronos 2.4.0 and ubuntu 12.04

Python 3 support

  • Added the python version 3.5 in Travis configuration.

@Rob-Johnson
Copy link
Copy Markdown
Collaborator

hi @navidurrahman.

Ubuntu Image Upgrade to 14.04

The integration tests run inside of a Docker Container running 14.04 (see the Dockerfile) , so I'm not sure this will have the consequence you expect - it'll change the host machine Travis provides to run 14.04 rather than 12.04, but the OS in which Chronos is installed and tested will remain the same.

Mesosphere removed chronos version 2.3.4 and 2.4.0 for ubuntu 12.04.

I don't think so?

root@02d4b83dc5e4:/# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"
root@02d4b83dc5e4:/# echo "deb http://repos.mesosphere.com/ubuntu precise main" | tee /etc/apt/sources.list.d/mesosphere.list
deb http://repos.mesosphere.com/ubuntu precise main
root@02d4b83dc5e4:/# apt-get -y update
Hit http://archive.ubuntu.com precise Release.gpg
Get:1 http://archive.ubuntu.com precise-updates Release.gpg [198 B]
Get:2 http://archive.ubuntu.com precise-security Release.gpg [198 B]
Hit http://archive.ubuntu.com precise Release
Get:3 http://archive.ubuntu.com precise-updates Release [55.4 kB]
Get:4 http://archive.ubuntu.com precise-security Release [55.5 kB]
Get:5 http://archive.ubuntu.com precise/main Sources [1175 kB]
Get:6 http://repos.mesosphere.com precise Release.gpg [836 B]
Get:7 http://repos.mesosphere.com precise Release [2256 B]
Get:8 http://archive.ubuntu.com precise/restricted Sources [5306 B]
Get:9 http://archive.ubuntu.com precise/universe Sources [6239 kB]
Get:10 http://repos.mesosphere.com precise/main amd64 Packages [7329 B]
Get:11 http://repos.mesosphere.com precise/main i386 Packages [756 B]
Get:12 http://archive.ubuntu.com precise/main amd64 Packages [1640 kB]
Get:13 http://archive.ubuntu.com precise/restricted amd64 Packages [9098 B]
Get:14 http://archive.ubuntu.com precise/universe amd64 Packages [6167 kB]
Get:15 http://archive.ubuntu.com precise/main i386 Packages [1641 kB]
Get:16 http://archive.ubuntu.com precise/restricted i386 Packages [9108 B]
Get:17 http://archive.ubuntu.com precise/universe i386 Packages [6180 kB]
Get:18 http://archive.ubuntu.com precise-updates/main Sources [607 kB]
Get:19 http://archive.ubuntu.com precise-updates/restricted Sources [8938 B]
Get:20 http://archive.ubuntu.com precise-updates/universe Sources [152 kB]
Get:21 http://archive.ubuntu.com precise-updates/main amd64 Packages [1260 kB]
Get:22 http://archive.ubuntu.com precise-updates/restricted amd64 Packages [24.0 kB]
Get:23 http://archive.ubuntu.com precise-updates/universe amd64 Packages [350 kB]
Get:24 http://archive.ubuntu.com precise-updates/main i386 Packages [1335 kB]
Get:25 http://archive.ubuntu.com precise-updates/restricted i386 Packages [24.0 kB]
Get:26 http://archive.ubuntu.com precise-updates/universe i386 Packages [361 kB]
Get:27 http://archive.ubuntu.com precise-security/main Sources [176 kB]
Get:28 http://archive.ubuntu.com precise-security/restricted Sources [4320 B]
Get:29 http://archive.ubuntu.com precise-security/universe Sources [52.5 kB]
Get:30 http://archive.ubuntu.com precise-security/main amd64 Packages [758 kB]
Get:31 http://archive.ubuntu.com precise-security/restricted amd64 Packages [18.3 kB]
Get:32 http://archive.ubuntu.com precise-security/universe amd64 Packages [165 kB]
Get:33 http://archive.ubuntu.com precise-security/main i386 Packages [831 kB]
Get:34 http://archive.ubuntu.com precise-security/restricted i386 Packages [18.3 kB]
Get:35 http://archive.ubuntu.com precise-security/universe i386 Packages [174 kB]
Fetched 29.5 MB in 6s (4606 kB/s)
Reading package lists... Done
root@02d4b83dc5e4:/# apt-cache policy chronos
chronos:
  Installed: (none)
  Candidate: 2.4.0-0.1.20151007110204.ubuntu1204
  Version table:
     2.4.0-0.1.20151007110204.ubuntu1204 0
        500 http://repos.mesosphere.com/ubuntu/ precise/main amd64 Packages
     2.4.0-0.1.20150828104228.ubuntu1204 0
        500 http://repos.mesosphere.com/ubuntu/ precise/main amd64 Packages
     2.3.4-0.1.20150813102925.ubuntu1204 0
        500 http://repos.mesosphere.com/ubuntu/ precise/main amd64 Packages
     2.3.3-1.0.1.ubuntu1204 0
        500 http://repos.mesosphere.com/ubuntu/ precise/main amd64 Packages
     2.3.2-0.1.20150207000917.ubuntu1204 0
        500 http://repos.mesosphere.com/ubuntu/ precise/main amd64 Packages
     2.3.1-0.1.20150122202347 0
        500 http://repos.mesosphere.com/ubuntu/ precise/main amd64 Packages

Python 3 support

This is great, thanks!

I'm happy to take this patch as is though, I guess it's no harm to use Trusty in Travis? @solarkennedy @asher any comments before I merge?

@solarkennedy
Copy link
Copy Markdown
Collaborator

The itest run in docker if you are running them locally, but on travis they run on "bare metal", whatever travis has.

@navidurrahman
Copy link
Copy Markdown
Contributor Author

Here is the stack trace of Travis with ubuntu 12:

https://travis-ci.org/asher/chronos-python/jobs/110816592

By default, it was selecting ubuntu 12, and couldn't find the Chronos repo.

@solarkennedy
Copy link
Copy Markdown
Collaborator

Yea, I mean the repo is there, just 2.3.4 is not.

Can you adjust
https://github.com/asher/chronos-python/blob/master/.travis.yml
and adjust the default in
https://github.com/asher/chronos-python/blob/master/itests/install-chronos.sh
?

@navidurrahman
Copy link
Copy Markdown
Contributor Author

@solarkennedy Updated the default version of chronos. Looks fine now.

Comment thread chronos/__init__.py Outdated
payload = content
except (TypeError, ValueError):
try:
payload = json.loads(content.decode('utf-8'))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any harm in trying to decode in utf-8 all the time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Catch 👍

solarkennedy added a commit that referenced this pull request Mar 7, 2016
@solarkennedy solarkennedy merged commit 627e53b into asher:master Mar 7, 2016
@solarkennedy
Copy link
Copy Markdown
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants