Skip to content

Commit

Permalink
Merge branch 'main' into quickstop
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Sep 2, 2023
2 parents b0d05c8 + 44c1759 commit edcafb7
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.2
rev: 0.23.3
hooks:
- id: check-github-workflows

Expand All @@ -31,12 +31,12 @@ repos:
- id: mdformat

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.278
rev: v0.0.281
hooks:
- id: ruff
args: ["--fix"]
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

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

## 6.25.1

([Full Changelog](https://github.com/ipython/ipykernel/compare/v6.25.0...18e54f31725d6645dd71a8749c9e1eb28281f804))

### Bugs fixed

- Modifying debugger to return the same breakpoints in 'debugInfo' response as 'setBreakpoints' [#1140](https://github.com/ipython/ipykernel/pull/1140) ([@vaishnavi17](https://github.com/vaishnavi17))

### Maintenance and upkeep improvements

### Contributors to this release

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

[@pre-commit-ci](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Apre-commit-ci+updated%3A2023-07-25..2023-08-07&type=Issues) | [@vaishnavi17](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Avaishnavi17+updated%3A2023-07-25..2023-08-07&type=Issues)

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

## 6.25.0

([Full Changelog](https://github.com/ipython/ipykernel/compare/v6.24.0...09c3c359addf60e26078207990ad2ca932cf2613))
Expand All @@ -24,8 +42,6 @@

[@blink1073](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Ablink1073+updated%3A2023-07-03..2023-07-25&type=Issues) | [@fecet](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Afecet+updated%3A2023-07-03..2023-07-25&type=Issues) | [@jasongrout](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Ajasongrout+updated%3A2023-07-03..2023-07-25&type=Issues) | [@maartenbreddels](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Amaartenbreddels+updated%3A2023-07-03..2023-07-25&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Aipython%2Fipykernel+involves%3Apre-commit-ci+updated%3A2023-07-03..2023-07-25&type=Issues)

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

## 6.24.0

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

# Version string must appear intact for hatch versioning
__version__ = "6.25.0"
__version__ = "6.25.1"

# Build up version_info tuple for backwards compatibility
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
Expand Down
12 changes: 10 additions & 2 deletions ipykernel/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,15 @@ async def setBreakpoints(self, message):
"""Handle a set breakpoints message."""
source = message["arguments"]["source"]["path"]
self.breakpoint_list[source] = message["arguments"]["breakpoints"]
return await self._forward_message(message)
message_response = await self._forward_message(message)
# debugpy can set breakpoints on different lines than the ones requested,
# so we want to record the breakpoints that were actually added
if "success" in message_response and message_response["success"]:
self.breakpoint_list[source] = [
{"line": breakpoint["line"]}
for breakpoint in message_response["body"]["breakpoints"]
]
return message_response

async def source(self, message):
"""Handle a source message."""
Expand Down Expand Up @@ -657,7 +665,7 @@ async def richInspectVariables(self, message):
}
)
if reply["success"]:
repr_data, repr_metadata = eval(reply["body"]["result"], {}, {}) # noqa[S307]
repr_data, repr_metadata = eval(reply["body"]["result"], {}, {}) # noqa: S307

body = {
"data": repr_data,
Expand Down
5 changes: 1 addition & 4 deletions ipykernel/eventloops.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,13 +535,10 @@ def make_qt_app_for_kernel(gui, kernel):
set_qt_api_env_from_gui(gui)

# This import is guaranteed to work now:
from IPython.external.qt_for_kernel import QtCore, QtGui
from IPython.external.qt_for_kernel import QtCore
from IPython.lib.guisupport import get_app_qt4

kernel.app = get_app_qt4([" "])
if isinstance(kernel.app, QtGui.QApplication):
kernel.app.setQuitOnLastWindowClosed(False)

kernel.app.qt_event_loop = QtCore.QEventLoop(kernel.app)


Expand Down
6 changes: 3 additions & 3 deletions ipykernel/pickleutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def get_object(self, g=None):
if g is None:
g = {}

return eval(self.name, g) # noqa[S307]
return eval(self.name, g) # noqa: S307


class CannedCell(CannedObject):
Expand Down Expand Up @@ -278,9 +278,9 @@ def __init__(self, obj):
self.shape = obj.shape
self.dtype = obj.dtype.descr if obj.dtype.fields else obj.dtype.str
self.pickled = False
if sum(obj.shape) == 0: # noqa
if sum(obj.shape) == 0:
self.pickled = True
elif obj.dtype == "O": # noqa
elif obj.dtype == "O":
# can't handle object dtype with buffer approach
self.pickled = True
elif obj.dtype.fields and any(dt == "O" for dt, sz in obj.dtype.fields.values()):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ dependencies = ["mypy>=0.990"]
test = "mypy --install-types --non-interactive {args:.}"

[tool.hatch.envs.lint]
dependencies = ["black==23.3.0", "mdformat>0.7", "ruff==0.0.278"]
dependencies = ["black==23.3.0", "mdformat>0.7", "ruff==0.0.281"]
detached = true
[tool.hatch.envs.lint.scripts]
style = [
Expand Down

0 comments on commit edcafb7

Please sign in to comment.