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

theskumar / python-dotenv / 391
88%

Build:
DEFAULT BRANCH: master
Ran 05 Dec 2018 06:56AM UTC
Jobs 5
Files 6
Run time 4187min
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
391

push

travis-ci

theskumar
<a href="https://github.com/theskumar/python-dotenv/commit/d33366cf3">Add support for newlines, backslashes, trailing comments and unquoted UTF-8 (#148)

* Fix deprecation warning for POSIX variable regex

This was also caught by Flake8 as:

    ./dotenv/main.py:19:2: W605 invalid escape sequence &#39;\$&#39;
    ./dotenv/main.py:19:4: W605 invalid escape sequence &#39;\{&#39;
    ./dotenv/main.py:19:8: W605 invalid escape sequence &#39;\}&#39;
    ./dotenv/main.py:19:12: W605 invalid escape sequence &#39;\}&#39;

* Turn get_stream into a context manager

This avoids the use of the `is_file` class variable by abstracting away
the difference between `StringIO` and a file stream.

* Deduplicate parsing code and abstract away lines

Parsing .env files is a critical part of this package.  To make it
easier to change it and test it, it is important that it is done in only
one place.

Also, code that uses the parser now doesn&#39;t depend on the fact that each
key-value binding spans exactly one line.  This will make it easier to
handle multiline bindings in the future.

* Parse newline, UTF-8, trailing comment, backslash

This adds support for:

* multiline values (i.e. containing newlines or escaped \n), fixes #89
* backslashes in values, fixes #112
* trailing comments, fixes #141
* UTF-8 in unquoted values, fixes #147

Parsing is no longer line-based.  That&#39;s why `parse_line` was replaced
by `parse_binding`.  Thanks to the previous commit, users of
`parse_stream` don&#39;t have to deal with this change.

This supersedes a previous pull-request, #142, which would add support for
multiline values in `Dotenv.parse` but not in the CLI (`dotenv get` and `dotenv
set`).

The key-value binding regular expression was inspired by
https://github.com/bkeepers/dotenv/blob/</a><a class="double-link" href="https://github.com/theskumar/python-dotenv/commit/d749366b6009126b115fb7b63e050956636585... (continued)

259 of 287 relevant lines covered (90.24%)

4.5 hits per line

Jobs
ID Job ID Ran Files Coverage
1 391.1 05 Dec 2018 06:57AM UTC 0
89.55
Travis Job 391.1
2 391.2 05 Dec 2018 06:57AM UTC 0
90.24
Travis Job 391.2
3 391.3 05 Dec 2018 06:57AM UTC 0
90.24
Travis Job 391.3
4 391.4 05 Dec 2018 06:56AM UTC 0
90.24
Travis Job 391.4
5 391.5 05 Dec 2018 06:57AM UTC 0
89.55
Travis Job 391.5
Source Files on build 391
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #391
  • d33366cf on github
  • Prev Build on master (#384)
  • Next Build on master (#393)
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

© 2025 Coveralls, Inc