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

MongoEngine / mongoengine / 2872
94%

Build:
DEFAULT BRANCH: master
Ran 30 Jun 2019 07:25AM UTC
Jobs 2
Files 26
Run time 11s
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
2872

push

travis-ci

web-flow
<a href="https://github.com/MongoEngine/mongoengine/commit/<a class=hub.com/MongoEngine/mongoengine/commit/<a class="double-link" href="https://git"><a class=hub.com/MongoEngine/mongoengine/commit/9170eea784e7d7ac344779f818672a572a7258aa">9170eea78<a href="https://github.com/MongoEngine/mongoengine/commit/9170eea784e7d7ac344779f818672a572a7258aa">&lt;a href=&quot;https://github.com/MongoEngine/mongoengine/commit/9170eea784e7d7ac344779f818672a572a7258aa&quot;&gt;&amp;quot;&amp;gt;Rename MongoEngineConnectionError to ConnectionFailure (#2111)

I originally changed the exception name from `ConnectionError` to
`MongoEngineConnectionError` in
https://github.com/MongoEngine/mongoengine/pull/1428/commits/&lt;/a&gt;&lt;a class=&quot;double-link&quot; href=&quot;https://github.com/MongoEngine/mongoengine/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://github.com/MongoEngine/mongoengine/commit/b02904ee750a30f8e2246a326376b40358543101&quot;&gt;b02904ee7&lt;/a&gt;&quot;&gt;b02904ee7&lt;/a&gt;&lt;a href=&quot;https://github.com/MongoEngine/mongoengine/commit/9170eea784e7d7ac344779f818672a572a7258aa&quot;&gt;,
inspired by landscape.io&amp;#39;s package health report, which argued that
`ConnectionError` is already a built-in exception in Python 3 (which it is:
https://docs.python.org/3/library/exceptions.html#ConnectionError).

I do agree that we shouldn&amp;#39;t override built-in exceptions. [0] That said, it’s
silly to add a &amp;quot;MongoEngine&amp;quot; prefix to any class within the `mongoengine`
module (and *especially* to *just one* exception class out of many). I&#39;ve
decided to do what PyMongo does (
https://github.com/mongodb/mongo-python-driver/blob/</a><a class="double-link" href="https://github.com/MongoEngine/mongoengine/commit/<a class="double-link" href="https://github.com/MongoEngine/mongoengine/commit/8855a510a80a30268ffd4b90be65fb26929648e2">8855a510a</a>">8855a510a</a><a href="https://github.com/MongoEngine/mongoengine/commit/9170eea784e7d7ac344779f818672a572a7258aa">/pymongo/errors.py#L59)
and call this exception `ConnectionFailure`.

Note that this is a breaking change and people will need to rename
`MongoEngineConnectionError`s in their code to `ConnectionFailure`. Moreover,
if they use PyMongo&#39;s `ConnectionFailure` for anything, they&#39;ll need to take
    extra care to avoid conflicts, e.g. by using:
```
from mongoengine import ConnectionFailure as MongoEngineConnectionFailure
```

[0] Note that some popular packages still overwrite `ConnectionError`, e.g.
https://github.com/kennethreitz/requests/blob/ 2872.1 (MONGODB=${MONGODB_3_4} PYMONGO=3.x)


30 Jun 2019 07:25AM UTC


0

93.13
Travis Job 2872.1 5 2872.5 (MONGODB=${MONGODB_3_4} PYMONGO=3.4.x) 30 Jun 2019 07:25AM UTC 0
93.11
Travis Job 2872.5
Source Files on build 2872
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2872
  • 9170eea7 on github
  • Prev Build on master (#2868)
  • Next Build on master (#2875)
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