Commit Graph

11251 Commits

Author SHA1 Message Date
Kevin Bates
0e63ebb1db Update session_exists() to account for invalid sessions due to culling
When kernels are culled, the kernel is terminated in the background,
unbeknownst to the session management.  As a result, invalid sessions
can be produced that appear to exist, yet cannot produce a model from
the persisted row due to the associated kernel no longer being active.
Prior to this change, these sessions, when encountered via a subsequent
call to `get_session()`, would be deleted and a KeyError would be raised.

This change updates the existence check to tolerate those kinds of sessions.
It removes such sessions (as would happen previously), but rather than
raise a KeyError when attempting to convert the row to a dictionary,
it logs a warning and returns None, which then allows `session_exists()`
to return False since the session was removed (as was ultimately the
case previously).

Calls to `get_session()` remain just as before and have the potential
to raise `KeyError` in such cases.  The difference now being that the
`KeyError` is accompanied by a message indicating the cause.

Fixes #4209
2018-11-16 08:44:07 -08:00
Thomas Kluyver
d60445e926
Merge pull request #4212 from vuamitom/patch-1
Add missing i18n parameter
2018-11-14 16:04:24 +00:00
Vu Minh Tam
c2b292f3e6
Add missing i18n parameter
fix missing parameter
2018-11-14 10:48:00 +07:00
Thomas Kluyver
4b2e7dc3e3
Merge pull request #4193 from askerry/selenium_buffering
Migrate buffering test to selenium
2018-11-13 17:38:29 +00:00
Amy Skerry
8b704d6628 Address review feedback
- consolidate into single .append call
- change function name to be clear we are waiting
2018-11-13 09:01:05 -08:00
Thomas Kluyver
6d7b6af514
Merge pull request #4182 from AndresSan6/merge_selected_cells
Add test for JS function "merge_selected_cells" in test_merge_cells.py
2018-11-13 15:11:16 +00:00
Thomas Kluyver
2345350c7f
Merge pull request #4185 from askerry/fix_race
Add wait_for_tag to avoid race condition in display isolation test
2018-11-13 14:23:18 +00:00
Thomas Kluyver
b61cd92294
Merge pull request #4194 from hansnow/patch-1
Fix typo in nbjs.po
2018-11-13 11:34:11 +00:00
Amy Skerry
f995db42ee Address review feedback
- fix indentation
- remove unneccesary try/except
- fix visibility logic
2018-11-12 10:30:35 -08:00
Xiaohan Li
363926290e
Fix type in nbjs.po
`出` is a typo of `处` in Chinese with same pronunciation. It's a common mistake with some Chinese input methods.
2018-11-12 12:08:32 +08:00
Matthias Bussonnier
39b3afc2e6
Merge pull request #4085 from vgalisson/patch-1
Fixed some French translations and typo
2018-11-11 19:58:38 -08:00
Amy Skerry
3faafc4122 Migrate buffering test to selenium
As per issue #3335, we want all js tests migrated to selenium. This change migrates the test of buffered execution requests.

Test Plan:
py.test -v notebook/tests/selenium/test_buffering.py
2018-11-11 10:47:18 -08:00
Amy Skerry
6f73d79376 Add custom expectation to wait for n elements 2018-11-11 09:33:44 -08:00
Amy Skerry
dea186d177 Add wait_for_tag to avoid race condition in display isolation test
Attempts to fix flakiness in `test_display_isolation`. We now ensure the iframe has been added to the dom before calling the selector. To make this work, we clean up the iframe cells (and all other cells) at the end of each test. I'm not 100% positive this fixes, since I haven't been able to reproduce the failure. But the hope is that this fixes the intermittent failing seen in https://github.com/jupyter/notebook/pull/4182.
2018-11-08 10:54:48 -08:00
Andres Sanchez
f27e87541d Changed function name in utils.py and in test_merge_cells.py 2018-11-08 08:00:51 -06:00
Thomas Kluyver
c9378c71fe
Merge pull request #4146 from askerry/selenium_display_isolation
Migrate display isolation test to selenium
2018-11-08 11:42:11 +00:00
Thomas Kluyver
099383e012
Merge pull request #4141 from askerry/selenium_display_image
Migrate image display test to selenium
2018-11-08 11:40:26 +00:00
Amy Skerry
a5a6e4ad08 Address review feedback
- remove sleep hack cruft
- consolidate/remove unncessary intermediate variables
2018-11-07 20:35:26 -08:00
Amy Skerry
3ccc4ed207 Address review feedback
- use %r instead of %s to handle quoting more succintly
- add a finally block to ensure browser state is transitioned from iframe back to default content
2018-11-07 20:30:06 -08:00
Andres Sanchez
fd6ea8e556 Removed unnecessary property attibute created in utils.py and added comments to test_merge_cells.py 2018-11-07 22:20:35 -06:00
Andres Sanchez
1c87821dc1 Modifications to test JS funcion in test_merge_cells.py 2018-11-07 21:00:21 -06:00
Thomas Kluyver
2af744075f
Merge pull request #4103 from einon/einonm
Fix copy/paste-ability of default URL presented on startup
2018-11-07 15:13:57 +00:00
Thomas Kluyver
a036ba2cd8
Merge pull request #4142 from askerry/selenium_merge_cells
Migrate test for merge cells api to selenium
2018-11-07 12:37:43 +00:00
Thomas Kluyver
a7033b8067
Merge pull request #4139 from daf/fix-allow-remote-access-with-all-ips
Fix default value method for `allow_remote_access` when ip is '*'
2018-11-07 11:50:50 +00:00
Amy Skerry
aa658d3d79 Migrate display isolation test to selenium
As per issue #3335, we want all js tests migrated to selenium. This change migrates and extends the svg isolation test (extended to include slightly more thorough validation of expected isolation behavior).

Test Plan:
py.test -v notebook/tests/selenium/test_display_isolation.py
2018-10-26 10:19:40 -07:00
Amy Skerry
34cd3528d5 Migrate test for merge cells api to selenium
Migrates the test for merging cells to use selenium as suggested in issue #3335.

Test Plan:
py.test -v notebook/tests/selenium/test_merge_cells.py
2018-10-25 22:23:19 -07:00
Amy Skerry
03478bee87 Migrate image display test to selenium
Migrates a single js test (testing image display functionality) to selenium as per issue #3335.

Test Plan:
py.test -v notebook/tests/selenium/test_display_image.py
2018-10-25 21:42:51 -07:00
Dave Foster
1c40db2440 Fix default value method for allow_remote_access when ip is '*' 2018-10-25 09:36:01 -04:00
Mark Einon
f140ba95c4 Present both possible URL options as separate copy/pastable options
Currently the default URL message given on the console on startup is:

---
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
     http://(myip.com or 127.0.0.1):8888/?token=8fdc8 ...
---

This will always need editing to use. Replace with one host IP (e.g. 'myip.com')
option and one local ip (127.0.0.1) option to make it copy/pastable again.
2018-10-22 00:34:45 +01:00
Mark Einon
643b992690 Fix copy/paste-ability of default URL presented on startup
Currently the default URL message given on the console on startup is:

---
Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://(myip.com or 127.0.0.1):8888/?token=8fdc8 ...
---

This will always need editing to use. Replace with host IP (e.g. 'myip.com')
to make it copy/pastable again.
2018-10-22 00:34:45 +01:00
Matthias Bussonnier
04a686dbaf
Merge pull request #4074 from agatheliguori/master
Fixed french translation mistakes and normalized capitalization
2018-10-21 12:10:01 -07:00
Min RK
bbfa1cbe5a
Merge pull request #4122 from thomasaarholt/thomasaarholt-patch-1
Corrected alt-text of "replace in all cells"
2018-10-19 14:43:48 +02:00
Thomas Aarholt
9182f84cf0
Corrected alt-text of "replace in all cells" 2018-10-19 11:28:24 +02:00
Min RK
4f9a6cbdd8
Merge pull request #3664 from vit-tucek/unicode_home_dirs
properly handle unicode characters in home dirs
2018-10-18 13:45:35 +02:00
Min RK
9928105052
Merge pull request #4099 from michalc/contents_manager_exists_can_return_futures
Allow more contents manager functions to return futures
2018-10-18 10:25:24 +02:00
Michal Charemza
815ed3ce56
Allow more contents manager functions to return futures
This allows slower contents managers to not block the event loop by allowing
more of their API to return futures.

Other usages of contents manager functions are already wrapped in maybe_future,
including a use of `file_exists` in contents/handlers.py
2018-10-17 22:25:28 +01:00
Min RK
b663bf1b14
Merge pull request #4034 from Carreau/adaptation-log
When adapting also log the version jupyter_client is expecting.
2018-10-10 15:18:32 +02:00
Min RK
dab6046ba6
Merge pull request #4046 from Surya-06/master
update marked to 0.5
2018-10-10 15:16:22 +02:00
Min RK
d2916c9a81
Merge pull request #4073 from 1kastner/patch-1
Add info about messaging specs
2018-10-10 11:23:27 +02:00
GALISSON Victor
c588951c90
Update to nbjs.po
Suppressed some capital letters because doesn't look right in French
Changed "De Confiance" to "Fiable" because the formulation is odd, "De Confiance" sounds a bit like "Is Trusted" , when "Fiable" can directly be translated to "Trusted" (and therefore the change from "Sans confiance" to "Non Fiable")
Changed from "de" to "du" when it was uncorrectly used
2018-10-10 11:23:04 +02:00
Min RK
4135e3ffe7
Merge pull request #4063 from kevin-bates/log-status-type
Include status types when logging activity
2018-10-10 11:19:27 +02:00
Matthias Bussonnier
b71c05dc17
Merge pull request #4061 from kara71/fix-fr-translations
Fixed French translations in nbjs.po
2018-10-09 08:17:08 -07:00
agatheliguori
9c1309210c Fixed french translation mistakes and normalized capitalization 2018-10-07 19:13:10 +02:00
Mathis Hammel
6126f78381 Fixed two remaining wrong translations 2018-10-07 18:21:33 +02:00
1kastner
9b7312d330
Add info about messaging specs
I found it very useful to read https://jupyter-client.readthedocs.io/en/stable/messaging.html in order to understand what is happening here. What do you think?
2018-10-07 17:57:57 +02:00
Kevin Bates
23e74dcdfa Include status types when logging activity
Recently I needed to troubleshoot kernel responses and found it helpful
to distinguish status types (busy vs. idle) - thought others might find
it useful as well.

Entries that previously appeared as...
```
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: status
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: status
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: status
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: status
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: execute_input
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: display_data
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: execute_result
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: status
```
will now appear as...
```
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: status (idle)
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: status (busy)
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: status (idle)
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: status (busy)
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: execute_input
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: display_data
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: execute_result
 activity on 33383dcc-c054-4dc0-b842-16063ea160fe: status (idle)
```
2018-10-04 08:35:48 -07:00
Mathis Hammel
74f08b897c Fixed some translations 2018-10-04 01:17:11 +02:00
Steven Silvester
c2a2bcc4a7
Merge pull request #4041 from arradha/fix/mathjax-codeblocks
Disable math jax inside fenced code blocks (closes #4037)
2018-10-02 04:52:58 -04:00
Steven Silvester
dfcea5b3f7
Merge pull request #4036 from Hyaxia/metrics_terminal
Added metrics for currently running terminals and labeled by type kernels
2018-10-02 04:51:13 -04:00
Steven Silvester
fa7b40be27
Merge pull request #4039 from Carreau/try-fix-attr
try to fix tests
2018-10-02 04:49:38 -04:00