Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gq-guo/playwright-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: gq-guo/playwright-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: release-0.170
Choose a head ref
  • 4 commits
  • 3 files changed
  • 3 contributors

Commits on Dec 16, 2020

  1. Copy the full SHA
    1a86fef View commit details

Commits on Dec 23, 2020

  1. Copy the full SHA
    683952d View commit details
  2. Copy the full SHA
    63db2cf View commit details

Commits on Dec 26, 2020

  1. Copy the full SHA
    3b87bca View commit details
Showing with 19 additions and 5 deletions.
  1. +1 −1 .github/workflows/publish.yml
  2. +16 −2 playwright/_transport.py
  3. +2 −2 setup.py
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -64,4 +64,4 @@ jobs:
./scripts/tag_image_and_push.sh playwright-python:localbuild playwright.azurecr.io/public/playwright-python:${TAG_NAME}
./scripts/tag_image_and_push.sh playwright-python:localbuild playwright.azurecr.io/public/playwright-python:focal
./scripts/tag_image_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright-python:${TAG_NAME}-focal
./scripts/tag_image_and_push.sh playwright-python:localbuild playwright.azurecr.io/public/playwright-python:${TAG_NAME}-focal
18 changes: 16 additions & 2 deletions playwright/_transport.py
Original file line number Diff line number Diff line change
@@ -13,11 +13,25 @@
# limitations under the License.

import asyncio
import io
import json
import os
import sys
from pathlib import Path
from typing import Dict
from typing import Dict, Optional


# Sourced from: https://github.com/pytest-dev/pytest/blob/da01ee0a4bb0af780167ecd228ab3ad249511302/src/_pytest/faulthandler.py#L69-L77
def _get_stderr_fileno() -> Optional[int]:
try:
return sys.stderr.fileno()
except (AttributeError, io.UnsupportedOperation):
# pytest-xdist monkeypatches sys.stderr with an object that is not an actual file.
# https://docs.python.org/3/library/faulthandler.html#issue-with-file-descriptors
# This is potentially dangerous, but the best we can do.
if not hasattr(sys, "__stderr__"):
return None
return sys.__stderr__.fileno()


class Transport:
@@ -41,7 +55,7 @@ async def run(self) -> None:
"run-driver",
stdin=asyncio.subprocess.PIPE,
stdout=asyncio.subprocess.PIPE,
stderr=sys.stderr,
stderr=_get_stderr_fileno(),
limit=32768,
)
assert proc.stdout
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@
import setuptools
from wheel.bdist_wheel import bdist_wheel as BDistWheelCommand

driver_version = "0.170.0-next.1608058598043"
driver_version = "0.171.0"


with open("README.md", "r", encoding="utf-8") as fh:
@@ -44,7 +44,7 @@ def run(self) -> None:
for platform in ["mac", "linux", "win32", "win32_x64"]:
zip_file = f"playwright-cli-{driver_version}-{platform}.zip"
if not os.path.exists("driver/" + zip_file):
url = "https://playwright.azureedge.net/builds/cli/next/" + zip_file
url = "https://playwright.azureedge.net/builds/cli/" + zip_file
print("Fetching ", url)
subprocess.check_call(
["curl", "--http1.1", url, "-o", "driver/" + zip_file]