microsoftgraph / msgraph-sdk-python-core

Microsoft Graph client library for Python
MIT License
261 stars 38 forks source link

Breaking changes between pypi-published v0.2.2 and release v1.0.0 and samples failing #447

Open RossK1 opened 8 months ago

RossK1 commented 8 months ago

The version published on pypi is v0.2.2 from July 2021. That version works with the samples in this repo. The most recent release on github is v1.0.0, presumably coinciding with the v1.0.0 release of msgraph-sdk-python. This version does not work with the samples in this repo. There are numerous breaking points: the import "msgraph.core" is no longer valid, there no longer appears to be a GraphClient, etc.

Could these samples please be updated or removed?

It looks like this library is no longer intended to be used standalone, with the main documentation now directing users to the main sdk repo and the instructions reflecting it's usage. Is this correct?

heavy-metal-blues-code commented 7 months ago

I'm facing same issue, I have raised a question on QA section about it. I have tried to look for information on changelog.md but as with all Microsoft documenting I ended up in circles.

songdavid98 commented 7 months ago

I'm facing the same issue here.

RossK1 commented 7 months ago

This is particularly problematic because v1.0.0 was pushed to pypi on 22 Jan 2024 so unless your requirements.txt or other code specify msgraph-core==0.2.2, things break without any deprecation or other warning :(

heavy-metal-blues-code commented 7 months ago

@RossK1, I've addressed the issue by implementing your suggestion to hard-code msgraph-core==0.2.2, which I did by configuring a setup.py file for the Python project I'm currently engaged in. Besides, I managed to carve out some time to design a CI pipeline and arrange an Azure Artifacts feed for hosting the package, which is now being generated successfully and used in production.

linickx commented 6 months ago

+1 ... no working samples is a major headache.

samples/graph_client_samples.py was hugely flexible, it's not clear (to me at least) how to implement the same in v1.0.0

JoAllg commented 4 months ago

I just found the upgrading section in the msgraph-sdk documentation. Hope it helps.

Just the "Fluent Request Builder Pattern" might require a major rewrite as requests are not done using URLs anymore.

Ndiritu commented 2 months ago

Apologies for the gaps in the docs to use the graph-core v1.0 package on its own. This will be considered for future sprints.

You may consider transitioning to using msgraph-sdk via the upgrade guide & see similar code samples here

D3SL commented 2 weeks ago

This will be considered for future sprints.

learn.microsoft.com, devblogs.microsoft.com, pypi, this github, and the msgraph-sdk github all say wildly different things. As near as I can tell there is no authoritative up to date and accurate documentation anywhere.

Also for anyone else who eventually finds there way here: As of 2024-09-04 the msgraph-sdk package doesn't exist in conda-forge (yet).