Skip to content

Conversation

@mamcx
Copy link
Contributor

@mamcx mamcx commented Oct 9, 2025

Description of Changes

Python is funny, if a file token.py is created and another script run on the same dir, it will cause python to block:

python3-3.13.7/lib/python3.13/tokenize.py", line 35, in <module>
    from token import *
  File "/Users/mamcx/token.py", line 3, in <module>
    text = sys.stdin.read()

By coincidence the docs on pg wire use this name. Changed to one that don't cause the trouble.

Expected complexity level and risk

1

Testing

  • Created another script and run it, see it blocks because this...

@mamcx mamcx requested a review from jdetter October 9, 2025 16:11
@mamcx mamcx self-assigned this Oct 9, 2025
@mamcx mamcx added documentation Improvements or additions to documentation release-any To be landed in any release window bugfix Fixes something that was expected to work differently labels Oct 9, 2025
Copy link
Collaborator

@jdetter jdetter left a comment

Choose a reason for hiding this comment

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

Just a few things here, let me know if you have questions 🙂

@mamcx mamcx force-pushed the mamcx/pg-document-wire-format-fix-python-example branch from 39c8014 to c73678d Compare October 10, 2025 18:05
Copy link
Collaborator

@jdetter jdetter left a comment

Choose a reason for hiding this comment

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

Excellent, this is much much better. Thank you @mamcx !

@mamcx mamcx force-pushed the mamcx/pg-document-wire-format-fix-python-example branch from c73678d to 6f5cd3a Compare October 10, 2025 18:22
@mamcx mamcx enabled auto-merge October 10, 2025 18:22
@mamcx mamcx added this pull request to the merge queue Oct 10, 2025
auto-merge was automatically disabled October 10, 2025 19:12

Pull Request is not mergeable

Merged via the queue into master with commit 5f3f17c Oct 10, 2025
26 checks passed
joshua-spacetime pushed a commit that referenced this pull request Oct 16, 2025
# Description of Changes

Python is funny, if a file `token.py` is created and another script run
on the same dir, it will cause python to block:

```python
python3-3.13.7/lib/python3.13/tokenize.py", line 35, in <module>
    from token import *
  File "/Users/mamcx/token.py", line 3, in <module>
    text = sys.stdin.read()
```

By coincidence the docs on `pg wire` use this name. Changed to one that
don't cause the trouble.

# Expected complexity level and risk
1

# Testing

- [x] Created another script and run it, see it blocks because this...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes something that was expected to work differently documentation Improvements or additions to documentation release-any To be landed in any release window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants