python-trio / python-trio/unasync

Imports from _async module doesn't get converted to imports from _sync

Open
#79 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
108
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Imports from the _async module seem to be unaffected:

from library._async.module import AsyncFoo

gets converted to

from library._async.module import SyncFoo

Expected result:

from library._sync.module import SyncFoo

Currently working around it by exporting both the classes from a common place, but it'd be nice to have this work.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the two import examples in the report, then trace the import-conversion entry point that handles _async names. Add regression coverage for converting library._async.module to library._sync.module while changing AsyncFoo to SyncFoo, and verify the expected import is produced.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.