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

test_telemetry fails for Python Version 3.11.0rc1 #2431

Merged
merged 2 commits into from Jan 24, 2024

Conversation

Yummy-Yums
Copy link
Contributor

@Yummy-Yums Yummy-Yums commented Jan 22, 2024

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

New Feature Submission:

  • Does your submission pass the tests?
  • Have you linted your code locally prior to submission?

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

After these steps, you're ready to open a pull request.

a. Give a descriptive title to your PR.

b. Describe your changes.

c. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).

@Yummy-Yums
Copy link
Contributor Author

Yummy-Yums commented Jan 22, 2024

Throws the below

_v = '3.11.0rc1'

def versiontuple(v):
return tuple(map(int, (v.split("."))))
E ValueError: invalid literal for int() with base 10: '0rc1'_

test_telemetry.py:6: ValueError

Simple Fix of taking the first 2 values in list, Test passes

image

@Alek99
Copy link
Contributor

Alek99 commented Jan 22, 2024

Would this only take the major version then?

Comment on lines 5 to 6
whatTosplit = (v.split("."))[:-1]
return tuple(map(int, whatTosplit))
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we use packaging.version instead? seems more robust

import packaging.version

packaging.version.parse("3.11.0rc1") >= packaging.version.parse("3.7")

@masenf masenf merged commit 82aca76 into reflex-dev:main Jan 24, 2024
42 of 43 checks passed
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