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: ipython/ipykernel
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.20.1
Choose a base ref
...
head repository: ipython/ipykernel
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.20.2
Choose a head ref
  • 2 commits
  • 4 files changed
  • 3 contributors

Commits on Jan 13, 2023

  1. Fix Exception in OutStream.close() (#1076)

    This bug fixes an Exception which was thrown
    in OutStream.close() whenever the OutStream was
    constructed with watchfd=False.
    
    A regression test was also added to test_io.py.
    
    Co-authored-by: Ilya Sherstyuk <isherstyuk@nvidia.com>
    ilyasher and ilyasher authored Jan 13, 2023
    Copy the full SHA
    203ee2b View commit details

Commits on Jan 16, 2023

  1. Publish 6.20.2

    SHA256 hashes:
    
    ipykernel-6.20.2-py3-none-any.whl: 5d0675d5f48bf6a95fd517d7b70bcb3b2c5631b2069949b5c2d6e1d7477fb5a0
    
    ipykernel-6.20.2.tar.gz: 1893c5b847033cd7a58f6843b04a9349ffb1031bc6588401cadc9adb58da428e
    blink1073 committed Jan 16, 2023
    Copy the full SHA
    601c0fe View commit details
Showing with 22 additions and 4 deletions.
  1. +16 −2 CHANGELOG.md
  2. +1 −1 ipykernel/_version.py
  3. +2 −1 ipykernel/iostream.py
  4. +3 −0 ipykernel/tests/test_io.py
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,22 @@

<!-- <START NEW CHANGELOG ENTRY> -->

## 6.20.2

([Full Changelog](https://github.com/ipython/ipykernel/compare/v6.20.1...203ee2bce0b506257bd561d082e983330d1ebd14))

### Bugs fixed

- Fix Exception in OutStream.close() [#1076](https://github.com/ipython/ipykernel/pull/1076) ([@ilyasher](https://github.com/ilyasher))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/ipython/ipykernel/graphs/contributors?from=2023-01-09&to=2023-01-16&type=c))

[@ilyasher](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Ailyasher+updated%3A2023-01-09..2023-01-16&type=Issues)

<!-- <END NEW CHANGELOG ENTRY> -->

## 6.20.1

([Full Changelog](https://github.com/ipython/ipykernel/compare/v6.20.0...5f07abc22a1c75672f7bee129505f19c954a7c36))
@@ -25,8 +41,6 @@

[@blink1073](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Ablink1073+updated%3A2022-12-26..2023-01-09&type=Issues) | [@ccordoba12](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Accordoba12+updated%3A2022-12-26..2023-01-09&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Apre-commit-ci+updated%3A2022-12-26..2023-01-09&type=Issues)

<!-- <END NEW CHANGELOG ENTRY> -->

## 6.20.0

([Full Changelog](https://github.com/ipython/ipykernel/compare/v6.19.4...fbea757e117c1d3b0da29a40b4abcf3133a310f4))
2 changes: 1 addition & 1 deletion ipykernel/_version.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
from typing import List

# Version string must appear intact for hatch versioning
__version__ = "6.20.1"
__version__ = "6.20.2"

# Build up version_info tuple for backwards compatibility
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
3 changes: 2 additions & 1 deletion ipykernel/iostream.py
Original file line number Diff line number Diff line change
@@ -401,6 +401,7 @@ def __init__(
self._buffer = StringIO()
self.echo = None
self._isatty = bool(isatty)
self._should_watch = False

if (
watchfd
@@ -449,7 +450,7 @@ def set_parent(self, parent):

def close(self):
"""Close the stream."""
if sys.platform.startswith("linux") or sys.platform.startswith("darwin"):
if self._should_watch:
self._should_watch = False
self.watch_fd_thread.join()
if self._exc:
3 changes: 3 additions & 0 deletions ipykernel/tests/test_io.py
Original file line number Diff line number Diff line change
@@ -98,6 +98,9 @@ def test_outstream():
stream = OutStream(session, pub, "stdout")
stream = OutStream(session, thread, "stdout", pipe=object())

stream = OutStream(session, thread, "stdout", watchfd=False)
stream.close()

stream = OutStream(session, thread, "stdout", isatty=True, echo=io.StringIO())
with pytest.raises(io.UnsupportedOperation):
stream.fileno()