Skip to content

Avoid reloading dgl and numpy modules; remove deprecated python C-API function#2638

Merged
DavIvek merged 5 commits intomasterfrom
fix-dgl-issues
Jan 29, 2025
Merged

Avoid reloading dgl and numpy modules; remove deprecated python C-API function#2638
DavIvek merged 5 commits intomasterfrom
fix-dgl-issues

Conversation

@DavIvek
Copy link
Contributor

@DavIvek DavIvek commented Jan 27, 2025

Some Python modules should not be loaded more than once. This PR adds numpy and dgl to that list to avoid potential issues. This is mandatory to use latest versions of mentioned packages.
Additionally, a deprecated call to PyEval_InitThreads has been removed, as it no longer has any effect starting from Python 3.9.

@DavIvek DavIvek added bug bug Docs - changelog only Docs - changelog only CI -build=release -test=e2e Run release build and e2e tests on push CI -build=release -test=query_modules Run release build and query modules tests on push labels Jan 27, 2025
@DavIvek DavIvek added this to the mg-v3.1.0 milestone Jan 27, 2025
@DavIvek DavIvek self-assigned this Jan 27, 2025
@DavIvek
Copy link
Contributor Author

DavIvek commented Jan 27, 2025

Tracking

  • [Link to Epic/Issue]

Standard development

CI Testing Labels

  • Select the appropriate CI test labels (CI -build=build-name -test=test-suite)

Documentation checklist

  • Add the documentation label
  • Add the bug / feature label
  • Add the milestone for which this feature is intended
    • If not known, set for a later milestone
  • Write a release note, including added/changed clauses
    • Resolved issues with reloading numpy and dgl modules, which could cause unexpected behavior when loaded multiple times. This fix ensures compatibility with the latest versions of these packages. #2638
  • [ Documentation PR link memgraph/documentation#XXXX ]
    • Is back linked to this development PR
  • [ Tag someone from docs team ]

@DavIvek DavIvek changed the title Avoid reloading of dgl and numpy python modules Avoid reloading of dgl and numpy python modules and remove deprecated python C-API functions Jan 27, 2025
@DavIvek DavIvek changed the title Avoid reloading of dgl and numpy python modules and remove deprecated python C-API functions Avoid Reloading DGL and NumPy Modules; Remove Deprecated Python C-API Function Jan 27, 2025
@DavIvek DavIvek requested review from as51340 and imilinovic January 28, 2025 10:46
@DavIvek DavIvek marked this pull request as ready for review January 28, 2025 10:46
@DavIvek DavIvek requested a review from as51340 January 28, 2025 12:49
@DavIvek
Copy link
Contributor Author

DavIvek commented Jan 28, 2025

This PR must be merged before memgraph/mage#535 to ensure all modules work as expected.

@DavIvek DavIvek changed the title Avoid Reloading DGL and NumPy Modules; Remove Deprecated Python C-API Function Avoid reloading dgl and numpy modules; remove deprecated python C-API function Jan 29, 2025
@DavIvek DavIvek added this pull request to the merge queue Jan 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 29, 2025
@DavIvek DavIvek added this pull request to the merge queue Jan 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 29, 2025
@DavIvek DavIvek added the CI -build=debug -test=core Run debug build and core tests on push label Jan 29, 2025
@sonarqubecloud
Copy link

@DavIvek DavIvek enabled auto-merge January 29, 2025 13:23
@DavIvek DavIvek added this pull request to the merge queue Jan 29, 2025
Merged via the queue into master with commit 0962268 Jan 29, 2025
15 checks passed
@DavIvek DavIvek deleted the fix-dgl-issues branch January 29, 2025 14:54
@gitbuda gitbuda mentioned this pull request Mar 11, 2025
49 tasks
as51340 pushed a commit that referenced this pull request Oct 24, 2025
… function (#2638)

Some Python modules should not be loaded more than once. This PR adds
`numpy` and `dgl` to that list to avoid potential issues. This is
mandatory to use latest versions of mentioned packages.
Additionally, a deprecated call to `PyEval_InitThreads` has been
removed, as it no longer has any effect starting from [Python
3.9](https://docs.python.org/3/whatsnew/3.9.html).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug bug CI -build=debug -test=core Run debug build and core tests on push CI -build=release -test=e2e Run release build and e2e tests on push CI -build=release -test=query_modules Run release build and query modules tests on push Docs - changelog only Docs - changelog only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants