libPyshell 0.5.0__tar.gz → 0.6.0__tar.gz

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 +1,2 @@
1
1
  exclude src/shell.py
2
+ include src/py.typed
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: libPyshell
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: Support for writing shell scripts in Python
5
5
  Home-page: https://github.com/skogsbaer/libPyshell
6
6
  Author: Stefan Wehr
@@ -13,6 +13,7 @@ Dynamic: author-email
13
13
  Dynamic: description
14
14
  Dynamic: description-content-type
15
15
  Dynamic: home-page
16
+ Dynamic: license-file
16
17
  Dynamic: requires-python
17
18
  Dynamic: summary
18
19
 
@@ -44,6 +45,10 @@ magicFiles = run(['grep', 'magic'] + files, captureStdout=splitLines, onError='i
44
45
 
45
46
  ## Changelog
46
47
 
48
+ * 0.6.6 (2026-07-01)
49
+ * switch to static typing
50
+ * make the package PEP 561-typed
51
+
47
52
  * 0.5.0 (2025-03-11)
48
53
  * support of timeouts for run
49
54
 
@@ -26,6 +26,10 @@ magicFiles = run(['grep', 'magic'] + files, captureStdout=splitLines, onError='i
26
26
 
27
27
  ## Changelog
28
28
 
29
+ * 0.6.6 (2026-07-01)
30
+ * switch to static typing
31
+ * make the package PEP 561-typed
32
+
29
33
  * 0.5.0 (2025-03-11)
30
34
  * support of timeouts for run
31
35
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: libPyshell
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: Support for writing shell scripts in Python
5
5
  Home-page: https://github.com/skogsbaer/libPyshell
6
6
  Author: Stefan Wehr
@@ -13,6 +13,7 @@ Dynamic: author-email
13
13
  Dynamic: description
14
14
  Dynamic: description-content-type
15
15
  Dynamic: home-page
16
+ Dynamic: license-file
16
17
  Dynamic: requires-python
17
18
  Dynamic: summary
18
19
 
@@ -44,6 +45,10 @@ magicFiles = run(['grep', 'magic'] + files, captureStdout=splitLines, onError='i
44
45
 
45
46
  ## Changelog
46
47
 
48
+ * 0.6.6 (2026-07-01)
49
+ * switch to static typing
50
+ * make the package PEP 561-typed
51
+
47
52
  * 0.5.0 (2025-03-11)
48
53
  * support of timeouts for run
49
54
 
@@ -5,5 +5,7 @@ setup.py
5
5
  libPyshell.egg-info/PKG-INFO
6
6
  libPyshell.egg-info/SOURCES.txt
7
7
  libPyshell.egg-info/dependency_links.txt
8
+ libPyshell.egg-info/not-zip-safe
8
9
  libPyshell.egg-info/top_level.txt
9
- src/__init__.py
10
+ src/__init__.py
11
+ src/py.typed
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- from distutils.core import setup
3
+ from setuptools import setup
4
4
 
5
- VERSION = '0.5.0'
5
+ VERSION = '0.6.0'
6
6
 
7
7
  with open("README.md", "r", encoding="utf-8") as fh:
8
8
  long_description = fh.read()
@@ -17,5 +17,9 @@ setup(name='libPyshell',
17
17
  url='https://github.com/skogsbaer/libPyshell',
18
18
  package_dir={'shell': 'src'},
19
19
  packages=['shell'],
20
+ # PEP 561: ship the py.typed marker so type checkers treat the
21
+ # package as typed for downstream consumers.
22
+ package_data={'shell': ['py.typed']},
23
+ zip_safe=False,
20
24
  python_requires='>=3.9'
21
25
  )
@@ -323,12 +323,10 @@ def run(cmd: Union[list[str], str],
323
323
  out = res.stdout
324
324
  err = res.stderr
325
325
  exitcode = res.returncode
326
- hadTimeout = False
327
326
  except subprocess.TimeoutExpired as e:
328
327
  out = e.stdout
329
328
  err = e.stderr
330
329
  exitcode = 124
331
- hadTimeout = True
332
330
  stdoutData = _massageOutput(out, encoding, decodeErrorsStdout or decodeErrors, captureStdout)
333
331
  stderrData = _massageOutput(err, encoding, decodeErrorsStderr or decodeErrors, captureStderr)
334
332
  if onError == 'raise' and exitcode != 0:
@@ -617,7 +615,9 @@ def mkTempFile(suffix: str='', prefix: str='',
617
615
  """
618
616
 
619
617
 
620
- f = tempfile.mktemp(suffix, prefix, dir)
618
+ # mktemp is deprecated because it only reserves a name without creating the file,
619
+ # which is exactly the contract of mkTempFile (the caller creates the file later).
620
+ f = tempfile.mktemp(suffix, prefix, dir) # pyright: ignore[reportDeprecated]
621
621
  if deleteAtExit:
622
622
  def action():
623
623
  if isFile(f):
@@ -722,8 +722,7 @@ def _openForTee(x: Any) -> _FILE:
722
722
  if type(x) == str:
723
723
  return open(x, 'wb')
724
724
  elif type(x) == tuple:
725
- name: Any = x[0]
726
- mode: Any = x[1]
725
+ name, mode = cast('tuple[str, str]', x)
727
726
  if mode == 'w':
728
727
  return open(name, 'wb')
729
728
  elif mode == 'a':
File without changes
File without changes
File without changes