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

Listing event calendar stopped working #26

Closed
h3 opened this issue Nov 17, 2014 · 7 comments
Closed

Listing event calendar stopped working #26

h3 opened this issue Nov 17, 2014 · 7 comments

Comments

@h3
Copy link

h3 commented Nov 17, 2014

I was using the latest official release (0.5) which is available with pip and everything was working as expected.

Then I needed to list events of delegate calendar. I monkey patched the schema and it worked on first try (hurray !).

So I decided to do things cleanly, make a fork, create a fix and a merge request. But then everything stopped working. After removing my code I realized that it was not my patch which broke pyexchange..

I started trying with every commit between the latest release (@a596a23) and the @Head and it turns out that the commit just after the release commit (@66f0824) is the last time the calendar list_event feature worked..

Every commit after, the feature is broken in one way or the other.. For example with commit @5960c66:

# python fetch.py
Traceback (most recent call last):
  File "fetch.py", line 103, in <module>
    print fetch()
  File "fetch.py", line 75, in fetch
    calendar_list = service.calendar().list_events(
AttributeError: 'Exchange2010CalendarService' object has no attribute 'list_events'

With later commit the Exchange server start returning 500 internal errors and with more recent commits, it always returns an empty list..

I'm trying to figure out what changed, but it seems there was a lot of refactoring in the last commits..

Any clue of what might have broken the list_event feature ?

@h3
Copy link
Author

h3 commented Nov 17, 2014

Well I ended up forking and patching the 0.5 version since above that everything seems broken..

You know, git offers a wonderful feature called branches to commit broken code without breaking the master.

And FYI, the Python indentation standard is 4 spaces .. not 2.

@catermelon
Copy link
Contributor

Dude, that was rude and uncalled for. I'm sorry it's broken for you, but you don't need to be abusive about it.

I'll look into it.

@h3
Copy link
Author

h3 commented Nov 17, 2014

Sarcasm may be unpleasant, but in no way it was meant to be rude ;)

Thank you for looking into it !

@h3
Copy link
Author

h3 commented Nov 17, 2014

By the way, here's the branch where I added support for delegates if you are interested..

h3/pyexchange@linkedin:master...delegate_calendar_support

@got-root
Copy link
Contributor

Taking a quick look at it, seems like it is only broken when you specify details=True in the call. In which, it will return an empty list. This is off the current master.

By the way, I think we all know that PEP8 says 4 spaces for indentation. But projects usually have their own amendments. You may have missed the style guide for this project: https://github.com/linkedin/pyexchange/blob/master/CONTRIBUTING.rst#style-guide

And yes, we do use that thing they call branches, and that is the reason why you are getting that exception above... Multiple people working on different parts of code. You were trying to call the list_events method on a commit that had branched off before that code was introduced.

This bug just seems to have gotten passed the automated testing.

catermelon pushed a commit that referenced this issue Nov 18, 2014
@catermelon
Copy link
Contributor

Thanks so much, Alejandro, you're the best. New bugfix release should go out shortly!

@catermelon
Copy link
Contributor

OK, 0.5.1. is up on PyPI! I'm going to close this ticket, but feel free to reopen if there are problems.

Sorry about breaking it - I'm glad people care enough to use it. :)

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

No branches or pull requests

3 participants