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

Polling fix #149

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Polling fix #149

merged 5 commits into from
Mar 5, 2024

Conversation

sswatson
Copy link
Contributor

@sswatson sswatson commented Mar 5, 2024

There was a mistake in a polling function having to do with the way Python evaluates default values for arguments (at definition time).

This PR moves the time.time() call to the body of the function.

@@ -12,5 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version_info__ = (0, 7, 0)
__version_info__ = (0, 7, 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

why the double bump?

@@ -324,11 +324,13 @@ def _parse_arrow_results(files: List[TransactionAsyncFile]):
def poll_with_specified_overhead(
f,
overhead_rate: float,
start_time: int = time.time(),
start_time: float = None,
Copy link
Contributor

@joshuafcole joshuafcole Mar 5, 2024

Choose a reason for hiding this comment

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

I dunno if the type checker is configured differently in the SDK but in pyrel's repo + my editor it's a type error not to explicitly union with None when assigning a default of None.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes, this is a type error. But it's all over the codebase and I figure it makes sense to be consistent and address that concern in a separate PR.

Copy link
Contributor

@joshuafcole joshuafcole left a comment

Choose a reason for hiding this comment

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

added minor style notes but I think its good to ship when you're satisfied (heading to vote so will be spotty)

@@ -12,5 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version_info__ = (0, 7, 0)
__version_info__ = (0, 7, 3)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joshuafcole Regarding the version bump: I actually neglected to bump; it shows as a double-bump because of a Git error on my part that apparently got handled by GitHub in kind of a weird way. (Namely, I forgot to go back to main before creating my new branch and instead used my previous branch.)

Anyway, it should be OK now, GitHub's interface weirdness notwithstanding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, the diff shows correctly now that I merged main 🤷

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good, did you want to cut a release or should I?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shoot; good catch. I thought I did this but apparently not.

Done now.

@sswatson sswatson merged commit d7edf5d into main Mar 5, 2024
9 checks passed
@NHDaly NHDaly deleted the polling-fix branch March 8, 2024 17:05
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