Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add $elemMatch return fields operator #143

Merged
merged 1 commit into from Sep 2, 2015

Conversation

magaman384
Copy link
Contributor

No description provided.

@vmalloc
Copy link
Collaborator

vmalloc commented Jun 22, 2015

It seems the build is failing on Python 2.6.

def _extract_projection_operators(self, fields):
"""Removes and returns fields with projection operators."""
result = {}
allowed_projection_operators = {'$elemMatch'}
Copy link
Member

Choose a reason for hiding this comment

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

I don't know who still uses Python 2.6, but the set syntax with curly braces is not supported there. You'll have to write set(['$elemMatch']).

@vmalloc
Copy link
Collaborator

vmalloc commented Jul 7, 2015

The Travis build is failing (I'm guessing on 2.6)...

@mdomke
Copy link
Member

mdomke commented Jul 7, 2015

Yeah. As I pointed out this is because set literals are not available in Python 2.6. If Python 2.6 is still a version that needs to be supported, than you have to use the set constructor explicitly.

@mdomke
Copy link
Member

mdomke commented Aug 30, 2015

@vmalloc In my opinion it would be ok to just drop support for Python 2.6. All reasonably up to date distributions ship with at least Python 2.7.x
@magaman384 Would you mind to rebase your pull request in order to resolve the merge conflicts?

@vmalloc
Copy link
Collaborator

vmalloc commented Aug 30, 2015

@mdomke I tend to agree. I see no reason for keeping 2.6 support at this point.

@magaman384
Copy link
Contributor Author

@mdomke No problem, done.

mdomke added a commit that referenced this pull request Sep 2, 2015
@mdomke mdomke merged commit 90b0ffc into mongomock:master Sep 2, 2015
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.

None yet

3 participants