Skip to content

Conversation

@mmisol
Copy link
Collaborator

@mmisol mmisol commented Aug 14, 2020

Purpose

This fixes build issues that appeared after merging 'print' function
changes for CPython3. Those changes moved the print function to the
globalScope which caused the 'DynamoPrintLogsToConsole' test to fail.
The reason for this is that Python unit tests, which don't use a model,
still initialize the globalScope but do not provide a logger, making
later logging tests fail.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Reviewers

@mjkkirschner

FYIs

@DynamoDS/dynamo

This fixes build issues that appeared after merging 'print' function
changes for CPython3. Those changes moved the print function to the
globalScope which caused the 'DynamoPrintLogsToConsole' test to fail.
The reason for this is that Python unit tests, which don't use a model,
still initialize the globalScope but do not provide a logger, making
later logging tests fail.
@mmisol mmisol requested a review from mjkkirschner August 14, 2020 23:25
Copy link
Member

@mjkkirschner mjkkirschner left a comment

Choose a reason for hiding this comment

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

thanks for fixing this at the root.

@mmisol
Copy link
Collaborator Author

mmisol commented Aug 15, 2020

@mmisol mmisol merged commit 6dd785e into DynamoDS:master Aug 15, 2020
mmisol added a commit to mmisol/Dynamo that referenced this pull request Aug 17, 2020
This fixes build issues that appeared after merging 'print' function
changes for CPython3. Those changes moved the print function to the
globalScope which caused the 'DynamoPrintLogsToConsole' test to fail.
The reason for this is that Python unit tests, which don't use a model,
still initialize the globalScope but do not provide a logger, making
later logging tests fail.
@mmisol mmisol mentioned this pull request Aug 17, 2020
8 tasks
mmisol added a commit that referenced this pull request Aug 17, 2020
* Redirect python print to Dynamo console (#11000)

* redirect print to DynamoConsol + update unit test

* comment updates

* Update CPythonEvaluator.cs

* Move Python print function to local scope (#11007)

This fixes build issues that appeared after merging 'print' function
changes for CPython3. Those changes moved the print function to the
globalScope which caused the 'DynamoPrintLogsToConsole' test to fail.
The reason for this is that Python unit tests, which don't use a model,
still initialize the globalScope but do not provide a logger, making
later logging tests fail.

Co-authored-by: Sylvester Knudsen <sylvesterknudsen@gmail.com>
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.

2 participants