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

MongoEngine / mongoengine / 2855
94%

Build:
DEFAULT BRANCH: master
Ran 26 Jun 2019 09:33AM UTC
Jobs 2
Files 26
Run time 1min
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
2855

push

travis-ci

web-flow
Drop support for positional arguments when instantiating a document (#2103)

For example, if you had the following class:
```
class Person(Document):
    name = StringField()
    age = IntField()
```

You could instantiate an object of such class by doing one of the following:
1. `new_person = Person('Tom', 30)`
2. `new_person = Person('Tom', age=30)`
3. `new_person = Person(name='Tom', age=30)`

From now on, only option (3) is allowed.

Supporting positional arguments may sound like a reasonable idea in this
heavily simplified example, but in real life it's almost never what you want
(especially if you use inheritance in your document definitions) and it may
lead to ugly bugs. We should not rely on the *order* of fields to match a given
value to a given name.

This also helps us simplify the code e.g. by dropping the confusing (and
undocumented) `BaseDocument._auto_id_field` attribute.

4914 of 5280 relevant lines covered (93.07%)

1.86 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2855.1 (MONGODB=${MONGODB_3_4} PYMONGO=3.x) 26 Jun 2019 09:34AM UTC 0
93.13
Travis Job 2855.1
5 2855.5 (MONGODB=${MONGODB_3_4} PYMONGO=3.4.x) 26 Jun 2019 09:33AM UTC 0
93.07
Travis Job 2855.5
Source Files on build 2855
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2855
  • ffedd331 on github
  • Prev Build on master (#2852)
  • Next Build on master (#2864)
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