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

fix import asyncio on Windows in RStudio #1479

Merged
merged 3 commits into from Sep 13, 2023
Merged

fix import asyncio on Windows in RStudio #1479

merged 3 commits into from Sep 13, 2023

Conversation

t-kalinowski
Copy link
Member

@t-kalinowski t-kalinowski commented Sep 13, 2023

asyncio.windows_utils subclasses/aliases subprocess.Popen like this:

class Popen(subprocess.Popen)
  def __init__(...):
    ...
    try:
      super().__init__(...)
    ...

Calling partial() on Popen directly works when
using it like a function, but breaks when
subclassing Popen (like asyncio does).

This means that any modules that attempt to import asyncio on windows will
fail as well, like tensorflow.

Closes rstudio/keras#1375 Closes #1478

@t-kalinowski t-kalinowski marked this pull request as ready for review September 13, 2023 20:15
asyncio.windows_utils subclasses/aliases Popen like this:

```python
class Popen(subprocess.Popen)
  def __init__(...):
    ...
    try:
      super().__init__(...)
    ...

```

Calling `partial()` on Popen directly works when
using it like a function, but breaks when
subclassing Popen (like asyncio does).

Closes rstudio/keras#1375
Closes #1478
@t-kalinowski t-kalinowski changed the title patch Popen.__init__, not Popen fix import asyncio on Windows in RStudio Sep 13, 2023
@t-kalinowski t-kalinowski merged commit 5b5136b into main Sep 13, 2023
12 checks passed
t-kalinowski added a commit that referenced this pull request Sep 18, 2023
t-kalinowski added a commit that referenced this pull request Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant