• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

theskumar / python-dotenv / 463
89%
master: 88%

Build:
Build:
LAST BUILD BRANCH: patch-1
DEFAULT BRANCH: master
Ran 06 May 2019 05:20PM UTC
Jobs 9
Files 6
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
463

Pull #177

travis-ci

web-flow
Fix unicode/str inconsistency in Python 2

This encodes environment keys and values for `os.environ` in Python 2
and fixes the following issues:

* Values loaded from `.env` being `unicode` whereas regular values being
  `str` (i.e. `bytes`) in Python 2.
* Error when loading `.env` with UTF-8 characters in Python 2.
* `# type: ignore` hiding the issue from the type checker.

`sys.getfilesystemencoding()` is used because it seems to match the
encoding used for environment variables with Python 2.  Since it can
apparently return `None`, we fall back to a default encoding (UTF-8
here) if that's the case.

I tested this on Windows where `"mbcs"` is the file system encoding.
Hopefully, this will also work on other systems.
Pull Request #177: Fix unicode/str inconsistency in Python 2

6 of 6 new or added lines in 1 file covered. (100.0%)

260 of 293 relevant lines covered (88.74%)

6.16 hits per line

Jobs
ID Job ID Ran Files Coverage
1 463.1 (TOXENV=lint) 06 May 2019 05:20PM UTC 0
Travis Job 463.1
2 463.2 (TOXENV=manifest) 06 May 2019 05:20PM UTC 0
Travis Job 463.2
3 463.3 (TOXENV=py27) 06 May 2019 05:20PM UTC 0
88.05
Travis Job 463.3
4 463.4 (TOXENV=py34) 06 May 2019 05:21PM UTC 0
88.05
Travis Job 463.4
5 463.5 (TOXENV=py35) 06 May 2019 05:21PM UTC 0
88.05
Travis Job 463.5
6 463.6 (TOXENV=py36) 06 May 2019 05:22PM UTC 0
88.05
Travis Job 463.6
7 463.7 (TOXENV=py37) 06 May 2019 05:22PM UTC 0
88.05
Travis Job 463.7
8 463.8 (TOXENV=pypy) 06 May 2019 05:22PM UTC 0
88.05
Travis Job 463.8
9 463.9 (TOXENV=pypy3) 06 May 2019 05:23PM UTC 0
88.05
Travis Job 463.9
Source Files on build 463
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #463
  • Pull Request #177
  • PR Base - master (#462)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc