pywinpty 3.0.2__cp313-cp313-win_amd64.whl → 3.0.3rc0__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pywinpty
3
- Version: 3.0.2
3
+ Version: 3.0.3rc0
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Programming Language :: Python
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -18,6 +18,8 @@ Author-email: andfoy@gmail.com
18
18
  Maintainer-email: Edgar Margffoy <andfoy@gmail.com>
19
19
  Requires-Python: >=3.9
20
20
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
21
+ Project-URL: Changelog, https://github.com/andfoy/pywinpty/blob/main/CHANGELOG.md
22
+ Project-URL: Repository, https://github.com/andfoy/pywinpty
21
23
 
22
24
  # PyWinpty: Pseudoterminals for Windows in Python
23
25
 
@@ -0,0 +1,16 @@
1
+ pywinpty-3.0.3rc0.dist-info\METADATA,sha256=YfZuBz_mHTiQ77Jef7J8h6tSdjFNas0qYTrODQi8TYs,5893
2
+ pywinpty-3.0.3rc0.dist-info\WHEEL,sha256=n_BmF69IyGtioVWE9c3M_zsEfe6-xMZy1v5HCL_6qE0,97
3
+ pywinpty-3.0.3rc0.dist-info\licenses\LICENSE.txt,sha256=-HjUdn-a0uQ9MIPvoAIBsADOk32e6GJuALpccqrJUeI,1088
4
+ winpty\OpenConsole.exe,sha256=aykVqakcBzg0amxqez7it04mWCsMkrGxYGbnJXDd3Wg,1149472
5
+ winpty\__init__.py,sha256=laTi9sLjCLycyaQYO3wMvhZNIK2vh_pOvGTJT2Od4Qs,402
6
+ winpty\conpty.dll,sha256=H1_9Uv8Rjbl17rJbrABR9M7_PgUTE_oDpa__qede5QI,109600
7
+ winpty\enums.py,sha256=KAm7XJFPk7nMWwUJxvYHlql92cr6y-Y24IHK3fc0JDU,1860
8
+ winpty\ptyprocess.py,sha256=hucCVfBridHRc4IPiEFrEkdFhU-UKSQbyZUa97EceDc,12209
9
+ winpty\tests\__init__.py,sha256=fzb9cDnPt2R3b_rWh6sqDgIbiQOZtBlfsV1aq-ULT2Q,53
10
+ winpty\tests\test_pty.py,sha256=AXujQybXhKr0t0UKpNBSqeAfsm4fHoU_ognbiocBF5I,3947
11
+ winpty\tests\test_ptyprocess.py,sha256=MeGp_P-zkseEp0iXciWh9Fa548hYGdvlcaHy_WNEwXo,6112
12
+ winpty\winpty-agent.exe,sha256=REZ6g9hrYSe8e4duiy-zP6df3gnZuf8nx_jvhLqWmyk,2627338
13
+ winpty\winpty.cp313-win_amd64.pyd,sha256=xclJK7z8LmhyQEZnVpMReCX2zhqAEnjPj7KliQNG1Uw,553472
14
+ winpty\winpty.dll,sha256=UXfzIarC-oVDbdbsa_xtQUWdJfW1M6oDNJ71E0YbTHk,2509089
15
+ winpty\winpty.pyi,sha256=-VenowCvy8tjIZUCvvb5VZw5R1c6ATXEUfsiEyIZwjE,1176
16
+ pywinpty-3.0.3rc0.dist-info\RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.9.4)
2
+ Generator: maturin (1.11.5)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp313-cp313-win_amd64
winpty/OpenConsole.exe CHANGED
Binary file
winpty/conpty.dll CHANGED
Binary file
winpty/ptyprocess.py CHANGED
@@ -1,7 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  # Standard library imports
4
- import codecs
5
4
  import os
6
5
  import shlex
7
6
  import signal
@@ -351,7 +350,7 @@ def _read_in_thread(address, pty: PTY, blocking: bool):
351
350
 
352
351
  while 1:
353
352
  try:
354
- data = pty.read(blocking=blocking) or b'0011Ignore'
353
+ data = pty.read(blocking=blocking) or '0011Ignore'
355
354
  try:
356
355
  client.send(bytes(data, 'utf-8'))
357
356
  except socket.error:
@@ -363,8 +362,7 @@ def _read_in_thread(address, pty: PTY, blocking: bool):
363
362
  client.send(b'')
364
363
  except socket.error:
365
364
  pass
366
- finally:
367
- break
365
+ break
368
366
 
369
367
  call += 1
370
368
  except Exception as e:
winpty/tests/test_pty.py CHANGED
@@ -51,14 +51,17 @@ def pty_fixture(request):
51
51
 
52
52
  backend = getattr(Backend, backend)
53
53
  def _pty_factory():
54
- pty = PTY(80, 25, backend=backend)
54
+ try:
55
+ pty = PTY(80, 25, backend=backend)
56
+ except WinptyError:
57
+ pytest.skip()
58
+ return None
55
59
  assert pty.spawn(CMD)
56
60
  time.sleep(0.3)
57
61
  return pty
58
62
  return _pty_factory
59
63
 
60
64
 
61
-
62
65
  # @pytest.fixture(scope='function', params=[
63
66
  # pytest.lazy_fixture('conpty_provider'),
64
67
  # pytest.lazy_fixture('winpty_provider')])
@@ -14,6 +14,7 @@ import pytest
14
14
  from flaky import flaky
15
15
 
16
16
  # Local imports
17
+ from winpty import WinptyError
17
18
  from winpty.enums import Backend
18
19
  from winpty.ptyprocess import PtyProcess, which
19
20
 
@@ -33,7 +34,11 @@ def pty_fixture(request):
33
34
  backend = getattr(Backend, backend)
34
35
  def _pty_factory(cmd=None, env=None):
35
36
  cmd = cmd or 'cmd'
36
- pty = PtyProcess.spawn(cmd, env=env, backend=backend)
37
+ try:
38
+ pty = PtyProcess.spawn(cmd, env=env, backend=backend)
39
+ except WinptyError:
40
+ pytest.skip()
41
+ return None
37
42
  return pty
38
43
  # time.sleep(10)
39
44
  _pty_factory.backend = request.param
Binary file
winpty/winpty.pyi CHANGED
@@ -6,53 +6,37 @@
6
6
  from typing import Optional
7
7
 
8
8
  # Local imports
9
- from .enums import Backend, Encoding, MouseMode, AgentConfig
9
+ from .enums import MouseMode, AgentConfig
10
10
 
11
11
  __version__: str
12
12
 
13
- class WinptyError(Exception):
14
- ...
13
+ class WinptyError(Exception): ...
15
14
 
16
15
  class PTY:
17
- def __init__(self, cols: int, rows: int,
18
- backend: Optional[int] = None,
19
- encoding: Optional[str] = Encoding.UTF8,
20
- mouse_mode: int = MouseMode.WINPTY_MOUSE_MODE_NONE,
21
- timeout: int = 30000,
22
- agent_config: int = AgentConfig.WINPTY_FLAG_COLOR_ESCAPES):
23
- ...
24
-
25
- def spawn(self,
26
- appname: str,
27
- cmdline: Optional[str] = None,
28
- cwd: Optional[str] = None,
29
- env: Optional[str] = None) -> bool:
30
- ...
31
-
16
+ def __init__(
17
+ self,
18
+ cols: int,
19
+ rows: int,
20
+ backend: Optional[int] = None,
21
+ mouse_mode: int = MouseMode.WINPTY_MOUSE_MODE_NONE,
22
+ timeout: int = 30000,
23
+ agent_config: int = AgentConfig.WINPTY_FLAG_COLOR_ESCAPES,
24
+ ): ...
25
+ def spawn(
26
+ self,
27
+ appname: str,
28
+ cmdline: Optional[str] = None,
29
+ cwd: Optional[str] = None,
30
+ env: Optional[str] = None,
31
+ ) -> bool: ...
32
32
  def set_size(self, cols: int, rows: int): ...
33
-
34
- def read(self,
35
- length: Optional[int] = 1000,
36
- blocking: bool = False) -> str:
37
- ...
38
-
39
- def read_stderr(self,
40
- length: Optional[int] = 1000,
41
- blocking: bool = False) -> str:
42
- ...
43
-
33
+ def read(self, blocking: bool = False) -> str: ...
44
34
  def write(self, to_write: str) -> int: ...
45
-
46
35
  def isalive(self) -> bool: ...
47
-
48
36
  def get_exitstatus(self) -> Optional[int]: ...
49
-
50
37
  def iseof(self) -> bool: ...
51
-
52
- def cancel_io() -> bool: ...
53
-
38
+ def cancel_io(self) -> bool: ...
54
39
  @property
55
40
  def pid(self) -> Optional[int]: ...
56
-
57
41
  @property
58
42
  def fd(self) -> Optional[int]: ...
@@ -1,16 +0,0 @@
1
- pywinpty-3.0.2.dist-info/METADATA,sha256=GQGUvmS8yAOhFB4MNC9jjE_yBR8cGw1fVKUVRSKR-OU,5748
2
- pywinpty-3.0.2.dist-info/WHEEL,sha256=K7foeVF-x_RZTycPKa1uE1HH2bAWe3AiJbihrXn5Hhc,96
3
- pywinpty-3.0.2.dist-info/licenses/LICENSE.txt,sha256=-HjUdn-a0uQ9MIPvoAIBsADOk32e6GJuALpccqrJUeI,1088
4
- winpty/OpenConsole.exe,sha256=6Dg0D2Gj8O-6rBrxtvgb31jYQDGM0fB2GQIlWrtWqmE,1148472
5
- winpty/__init__.py,sha256=laTi9sLjCLycyaQYO3wMvhZNIK2vh_pOvGTJT2Od4Qs,402
6
- winpty/conpty.dll,sha256=kliUMMhwG7vUzGvzCV_o8GdlaIh13W7EK6VKWwdHHoU,109624
7
- winpty/enums.py,sha256=KAm7XJFPk7nMWwUJxvYHlql92cr6y-Y24IHK3fc0JDU,1860
8
- winpty/ptyprocess.py,sha256=lub-1tL-LVUEY0e8s8J0VEbfWLsRdsx8gHyhagxdb28,12255
9
- winpty/tests/__init__.py,sha256=fzb9cDnPt2R3b_rWh6sqDgIbiQOZtBlfsV1aq-ULT2Q,53
10
- winpty/tests/test_pty.py,sha256=f6UKatWALTFM7jvcrqYWsRFCxosT-Aj0ChhvkN97ov4,3850
11
- winpty/tests/test_ptyprocess.py,sha256=QP0I-gufNV7OaZZFpRIC9J1XD4nq86NrR3oqi9s4OEI,5981
12
- winpty/winpty-agent.exe,sha256=REZ6g9hrYSe8e4duiy-zP6df3gnZuf8nx_jvhLqWmyk,2627338
13
- winpty/winpty.cp313-win_amd64.pyd,sha256=2wZhG8mIO9LeEmOXdP-ncfC1Q-bBI2X_jnRNZN38APg,581120
14
- winpty/winpty.dll,sha256=UXfzIarC-oVDbdbsa_xtQUWdJfW1M6oDNJ71E0YbTHk,2509089
15
- winpty/winpty.pyi,sha256=N8sy5oYzQGwtekPUSZ8Ai6Z9l3TcpNv-VOMjhRHByhs,1500
16
- pywinpty-3.0.2.dist-info/RECORD,,