Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix errors arising from disregarding the
ipython-kernel-config.py
Description
Providing a kernel configuration makes the re-manager fail to load the environment with an ipython kernel.
See #314 for details.
Motivation and Context
When using an ipython kernel, users will expect the provided configuration for the kernel in the profile directory to be obeyed.
The bug resulted from explicitly defining a kernel-client with connection information produced in scope, rather than providing the IPKernelApp with the respective overwrites and creating the client from the KernelApp.
Summary of Changes for Release Notes
Fixed
No direct fixes as the expected behavior can be achieved by arranging the code.
Added
find_kernel_ip
function is made a little more robust in case the socket calls are failingChanged
IPKernelApp
and theBlockingKernelClient
are created are reversed.BlockingKernelClient
is obtained via the provided method from IPKernelAppself._ip_kernel_client = self._ip_kernel_app.blocking_client()
Removed
self._ip_connect_file
removed because is was never used.self._ip_connect_info
was removed because there is no real reason to keep this state, the info can be obtained from by callingself._ip_kernel_app.get_connection_info()
generate_random_port(kernel_ip)
have been removed, as the IPKernelApp will used random ports be default, or read the ports from the config or an existing connection file.How Has This Been Tested?
The configurations for two different profile setups are provided in issue #314.
Both cases work as expected.
Additionally, invoking
start-re-manager --use-ipython-kernel=ON
with a profile that doesn't bear a configuration, will behave identically to the existing implementation.