Thomas Kluyver
ee4b9ce598
Allow None for post_save_hook
...
See gh-1868
10 years ago
Ryan Morshead
15a37c9ba7
fix for default value changes in ipython/traitlets/pull/332
10 years ago
Matthias Bussonnier
64d996f820
Merge pull request #1855 from minrk/rate-limit
...
iopub rate limit refinements
10 years ago
Min RK
3be8697b48
iopub rate limit refinements
...
- reset counter on status: idle (avoids Run All running into limits)
- fix rate measurements to exclude messages not sent due to rate limiting
- fix formatting of rate-exceeded messages, tweak text a bit
- after pausing output, don't resume sending until rate has dropped 20% below limit, to avoid rapid back & forth across the limit
10 years ago
Thomas Kluyver
1de0423448
Improve performance of directory listing
...
- stat() the file once and reuse the result to save on syscalls. Not as
good as using scandir(), but should still help.
- Don't re-check if parent directories are hidden for each file in the
directory.
Could do with testing on Windows.
10 years ago
Min RK
92d3f4235d
Merge pull request #1359 from blink1073/generic-session
...
Update the session api in preparation for file and console sessions
10 years ago
Min RK
f96feb5e8b
fix os.path.samefile backport on py2 + Windows
...
os.path.samefile is available everywhere but Windows + py2.
Backporting the py3 implementation doesn't work because
`os.stat` on Windows py2 returns 0 for st_ino and st_dev,
which will always be equal.
In this case, use case-insensitive path comparison, plus full-stat comparison (times included).
10 years ago
Min RK
02a81adf3e
test opening an invalid notebook
...
ensure we get a validation failed message
10 years ago
Min RK
6768b89407
fix notebook validation
...
validate was imported from traitlets in #1527 , clobbering validate from nbformat
10 years ago
Pierre
2ae49c84f9
[Post save hook] Raise web.HTTPError on fail
10 years ago
Scott Sanderson
129f990122
TEST: Use addCleanup in test_sessions_api.
...
This ensures that directories are correctly cleaned up even if tests
fail during setUp.
10 years ago
Scott Sanderson
53ebb068c9
TEST: Use addCleanup in test_sessionmanager.
10 years ago
Scott Sanderson
9ba5c8dd90
TEST: Use addCleanup in test_contents_api.
...
This guarantess that resources are deleted correctly event if setUp fails.
10 years ago
Safia Abdalla
3ea9c96bbc
Merge pull request #1526 from minrk/nbconfig-priority
...
reverse nbconfig load order
10 years ago
Sylvain Corlay
a91af4d642
Update traitlets API
10 years ago
Min RK
710dcd6299
reverse nbconfig load order
...
list is in descending priority, so load should iterate back to front, to ensure user config wins
10 years ago
Min RK
300fef8e96
Merge pull request #1471 from minrk/reconnect
...
Fixes for reconnecting on a flaky network
10 years ago
Min RK
8c9e0c3ca3
finish-up os.replace PR
...
addresses last bit of review in #1370
- remove error-catching around os.replace
- move windows-specific handling to remove_file
10 years ago
Min RK
b6e8a3732e
Allow replacing stale websocket connections
...
instead of refusing duplecate connections,
since reconnect on flaky network is more likely.
10 years ago
Min RK
4fe10b8142
Prevent session_id collisions
...
Keep a registry of open sessions, and refuse to open duplicates.
10 years ago
Steven Silvester
cbdb8f1ceb
Fix method name
10 years ago
Steven Silvester
fb8943b676
Check for a directory in get_kernel_path
10 years ago
Steven Silvester
8f8730788d
Clean up the api and update tests
10 years ago
Sri Konduru
e07cb5a03c
use os.replace instead of os.rename if available
10 years ago
Steven Silvester
06087c2a12
Update sessionmanager tests
10 years ago
Steven Silvester
a4c02561f1
Only give back the notebook path if notebook type
10 years ago
Steven Silvester
3eaa5e426c
Clean up logic
10 years ago
Steven Silvester
197c673585
Clean up logic
10 years ago
Steven Silvester
8c6257bea5
Allow the deprecated session API to work
10 years ago
Steven Silvester
6486b2430f
Update the session model and the tests
10 years ago
Steven Silvester
76d08aca99
Update the session api in preparation for file and console sessions
10 years ago
Matthias Bussonnier
6b220c949b
Merge pull request #1253 from ryanlovett/master
...
Restore atomic intermediate if notebook is invalid.
10 years ago
Min RK
65ba875d5b
allow using sqlite from pysqlite2
...
in case Python was built with an incomplete standard library (missing sqlite3)
we do the same thing in IPython history, etc.
10 years ago
Min RK
41d6da235c
Merge pull request #879 from ellisonbg/nbext-pain
...
New nbextensions installation API
10 years ago
ryanlovett
4d4dde7f08
Resolve notes from #1253 .
10 years ago
ryanlovett
3d467d6dc2
Restore atomic intermediate if notebook is invalid.
10 years ago
Min RK
1c7bc21ca7
Merge pull request #1237 from blink1073/session-with-kernel-id
...
Allow a session to connect to an existing kernel
10 years ago
Steven Silvester
5b1e0a7d3c
Fall back on new kernel if kernel does note exist
10 years ago
Steven Silvester
59d90f3f72
Remove kernel_id handling temporarily
10 years ago
Steven Silvester
665e7b6c00
Fix handling of kernel_name and kernel_id
10 years ago
Steven Silvester
e449c08e1b
Allow a session to connect to an existing kernel
10 years ago
Steven Silvester
56c653927f
Allow kernel id to take precedence over name
...
Allow kernel id to take precidence over name
Fix spelling
10 years ago
Min RK
23b1beaabc
treat null values as unspecified in session PATCH
10 years ago
Min RK
e9957ddb35
Handle coroutine possibility in test_sessionmanager
10 years ago
Min RK
02d1554f8f
Allow modifying kernel associated with a session via PATCH
...
- PATCH to kernel.id attaches to other kernel
- PATCH to kernel.name starts new kernel with given name
Previous kernel is shutdown after the change
10 years ago
Jonathan Frederic
fa399450c4
Fix poor logic in manager.py
10 years ago
Jonathan Frederic
29279e21e7
Fix typo
10 years ago
Brian E. Granger
7705bfd5ab
New approach working, old approach gone.
10 years ago
Min RK
9e1ce0e3dc
Merge pull request #1142 from captainsafia/fix-rename-with-capitalization
...
Fix rename_file to be case insensitive
10 years ago
Safia Abdalla
7a8aa92b73
Add same_file check in rename_file
10 years ago
Min RK
1c47a3dbb5
channel.closed is a method
...
since we weren't calling it, the restart channel was never closed,
causing process teardown to hang *sometimes*, depending on garbage collection.
10 years ago
Matthias Bussonnier
6ab2cd0dd6
Show warnings during tests
10 years ago
Carol Willing
40d0833869
Fixed reference that was erroring in validator
10 years ago
Diego Mesa
482ed8a5a3
updating log.warn to log.warning
10 years ago
Min RK
8ed64b374e
Merge pull request #1066 from Carreau/rmw
...
Remove usage of encode/decodestring, Deprecated, replace by bytes equiv.
10 years ago
Min RK
eef1ba8620
Merge pull request #931 from jdfreder/ratelimit
...
Add simple iopub message rate limiter
10 years ago
Matthias Bussonnier
0ad67c8b7f
Remove usage of encode/decodestring, Deprecated, replace by bytes equiv.
10 years ago
Jason Grout
fc8d0dcb06
Merge pull request #979 from minrk/swagger-doc
...
update swagger API doc from jupyter-js-services
10 years ago
Min RK
732fc9cc18
Checkpoint restored typo
10 years ago
Min RK
ba65ca5030
fix swagger validation errors
10 years ago
Min RK
1a7d23479b
update swagger doc from jupyter-js-services
10 years ago
Jason Grout
4671134fdf
Initial work-in-progress for contents api swagger docs
10 years ago
Min RK
c280b773fb
use session.deserialize to unpack message for rate limiting
...
rather than hardcoding json.loads
Messages should **never** be deserialized by any means other than the Session API.
10 years ago
Jonathan Frederic
9e2c95dc07
limit_window -> rate_limit_window
10 years ago
Jonathan Frederic
eb30002a82
Use a set for filter exceptions
10 years ago
Jonathan Frederic
7aaccbd545
Don't filter status, comm_info, kernel_info, and execute_request messages
10 years ago
Jonathan Frederic
c47f3d021b
Fix a bug in the code that parses the parent message from the msg_list
10 years ago
Jonathan Frederic
7232a6a99a
Clarification & cleanup
10 years ago
Jonathan Frederic
69faf0fb9b
Change the logic so the intervals are checked all of the time,
...
also changed no-limit default to "0"
10 years ago
Jonathan Frederic
f83485fcee
Remove log msg
10 years ago
Jonathan Frederic
4c99c5f7f8
Limit on websocket, not zmq
10 years ago
Jonathan Frederic
3b3c4d0315
Add simple iopub message rate limiter
10 years ago
Matthias Bussonnier
e4ec5ba3f3
Be more explicit about deprecation.
...
Cf #916 . Despite the fact that the function is private and meant
to replace an old behavior that will be removed, people explicitly
import it and register it as a post-save-hook.
Hope that explicit versing removal will convey the "Don't use" in a more
obvious manner.
10 years ago
Pierre Gerold
6ba2104c4b
finish the merge ... yeh I missed a <<<<<<<HEAD ...
11 years ago
Pierre Gerold
c218ff25f7
Merge branch 'master' into toto
11 years ago
Pierre Gerold
7d6c1c4774
Merge branch 'master' of https://github.com/jupyter/notebook
11 years ago
Pierre Gerold
fbcf2c403e
remove flush after save (no atomic writing)
11 years ago
Pierre Gerold
28d6fbde84
Modify test + correct docstrings
11 years ago
Thomas Kluyver
d732e28cb2
Merge pull request #711 from minrk/allow-async-kernel-manager
...
allow some KernelManager methods to be async
11 years ago
Safia Abdalla
4e8344831c
Updated tests on rename in ContentsManager
11 years ago
Min RK
ba344843eb
add SessionManager.close
...
allows explicit closing, rather than relying on implicit del,
which can run in the wrong thread.
11 years ago
Min RK
cfa64552b2
initialize Application in background thread
...
rather than initializing in main and starting in background, which seemed to cause occasional issues.
Also fix checking for dead notebook, which is no longer a subprocess.
11 years ago
Min RK
9043ae145c
handle async in sessions
...
needed because sessions call kernel methods
11 years ago
Min RK
6024f04698
allow some KernelManager methods to be async
...
Allows custom KernelManagers to do slower async operations as part of kernel startup/shutdown.
11 years ago
Safia Abdalla
8e0a8d1ea6
Added tests for directory renaming
11 years ago
Pierre Gerold
7cfd9b407a
Add test for non atomic writing
11 years ago
Pierre Gerold
48dcf2d319
One carac error + debug logging
11 years ago
Pierre Gerold
f849e310c8
Save without atomic writing and configuration ( fix #739 )
11 years ago
Pierre Gerold
459fd24c03
Save without atomic writing and configuration ( fix #739 )
11 years ago
Min RK
c36158270a
Don't set location header on restart
...
the URL doesn't change, it makes no sense.
11 years ago
Min RK
0c5a3b6d04
wait for kernel to restart
...
in API request to restart kernels
by waiting for the kernel to respond to a kernel_info request.
11 years ago
Min RK
c93c6924f6
allow hyphen and dot in kernelspec names
11 years ago
Min RK
9f501ab5cd
get kernelspec info from kernelspecs
...
instead of adding display_name to the sessions model
11 years ago
Min RK
66242b9a70
Merge pull request #503 from julienr/kernel_name
...
Adds kernel name to running notebooks list
11 years ago
Julien Rebetez
91d42c9600
Adds display_name to MappingKernelManager's kernel_model
11 years ago
Jonathan Frederic
1c4daeb137
Merge pull request #491 from minrk/copystat-can-fail
...
allow copystat to fail in atomic_writing
11 years ago
Jonathan Frederic
831b2a523b
Merge pull request #472 from minrk/base-url-always-encoded
...
avoid double-encoding base_url
11 years ago
Min RK
033247b039
protect against copystat failure in copy2
...
we already had this in `self._copy`, but copy2 was still used in atomic_writing.
11 years ago
Min RK
92502b5186
Merge pull request #495 from minrk/not-actually-api-handler
...
Don't re-use APIHandler name for serving yaml spec
11 years ago
Min RK
66d15ce304
Don't re-use APIHandler name for serving yaml spec
11 years ago
Steven Silvester
65eb248209
Add the method to the correct base class
11 years ago
Steven Silvester
1f6a3700a2
Fix signature
11 years ago
Steven Silvester
88c067ff27
Clean up allowed methods
11 years ago
Steven Silvester
f2b42ae72c
Allow cross-origin patches for config
11 years ago
Min RK
8de725a8de
server-side fixes for double-escaped base_url
11 years ago
Edd Barrett
1deb96999f
Don't crash if a filename contains invalid unicode.
11 years ago
Min RK
cc32f165e8
Merge edit-redirect fix
11 years ago
Min RK
f64aa490e3
set model mimetype, even when content=False
11 years ago
Min RK
798fc8acef
move swagger API handler off of existing `/api`
...
that spot was already taken
also set the content-type correctly
11 years ago
Matthias Bussonnier
67dd3b4450
Finish writing the command palette
11 years ago
Thomas Kluyver
3bd961b492
Fix abstract checkpoint methods to match interface used
...
Forward port of ipython/ipython#8524
Closes gh-144
11 years ago
Scott Sanderson
9e13c3b0cd
DOC: Initial work on Contents API docs.
11 years ago
Min RK
b0cae1f51b
Merge pull request #214 from jasongrout/trait-instances
...
Use instances of traits instead of trait classes
11 years ago
Min RK
c42869c3b8
remove 'name' arg from file_exists docstring
...
Only path is used, not separate name, path.
11 years ago
Jason Grout
cf69ab7428
Use instances of traits instead of trait classes
11 years ago
Thomas Kluyver
3c42206759
Store frontend config in nbconfig/ subdirectory
...
Closes gh-211
11 years ago
Min RK
71c2387e34
Merge pull request #173 from jasongrout/swagger
...
Rough draft of documentation for the notebook REST API for kernels, kernel specs, and sessions
11 years ago
Min RK
83367684e1
Merge pull request #164 from techtonik/patch-1
...
Write notebooks with Unix newlines on Windows
11 years ago
Jason Grout
a690e6c059
Serve API from the handlers directory
11 years ago
Jason Grout
ad25d33808
Add an api discovery url
11 years ago
Jason Grout
19c6905769
Move API yaml docs to the static/ directory so they are served with the notebook
...
We do this because there are plenty of machine-driven tools to read this and generate nice docs, etc.
11 years ago
Jason Grout
11ae4d7ff5
Rough draft of documentation for the notebook REST API for kernels, kernel specs, and sessions
11 years ago
Min RK
5403d2479d
make content_security_policy a property
...
and *add* `default-src: 'none'` to API handlers
custom CSP applies to all handlers
11 years ago
Min RK
709ed0d04b
Add APIHandler base class
...
- ensures all API responses are json
- sets CSP to prevent js execution on all API replies
11 years ago
anatoly techtonik
535a04da42
Fix tests and allow atomic_writing with CRLF if needed
...
Per review comments in https://github.com/jupyter/notebook/pull/164
11 years ago
anatoly techtonik
5842156d82
Write notebooks with Unix newlines on Windows
...
This avoids unnecessary notebook linefeed conversions
when working with version control from different systems.
11 years ago
Jason Grout
a016e42cf7
Add links to the REST API documentation (what there is on the wiki)
11 years ago
Min RK
1a91f8ce74
remove clusters tab from notebook
...
moving to an nbextension in ipyparallel
11 years ago
Min RK
d71a59cc9f
s/jupyter_notebook/notebook
11 years ago