summaryrefslogtreecommitdiff
path: root/cherrypy/process
Commit message (Collapse)AuthorAgeFilesLines
* 🎨 Adjust line length in code across the repoSviatoslav Sydorenko2023-01-051-1/+1
| | | | This patch makes it shorter to fit the 79 char limit.
* Use context managers to close files properly and fix tests on PyPyMichał Górny2022-02-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use context managers (`with`) to ensure that all open files are closed correctly. This resolves resource leaks and test failures with PyPy3.7. The code prior to this change used four approaches for closing files: 1. Using a context manager (`with` clause). 2. Using a try/finally clause. 3. Closing the file in the same scope (unreliable: file object can leak on exception). 4. Not closing open files at all. The last point is a real problem for PyPy since it does not GC unreachable objects as aggressively as CPython does. While leaving a function scope on CPython causes the file objects private to it to be destroyed (and therefore closed), in PyPy they can stay dangling for some time. When combines with buffered writes, this means that writes can still remain pending after returning from function. Using a context manager is a simple, consistent way to ensure that the file object is closed once it is no longer needed. In turn, this guarantees that all pending writes will be performed upon function return and the code won't be hiting race conditions between writing a file and reading it afterwards.
* Don't use deprecated camelCase functions from threading module.Dominic Davis-Foster2021-06-073-9/+9
|
* Merge pull request #1769 from robinchow/masterSviatoslav Sydorenko2019-03-281-2/+2
|\ | | | | Reduced log level for non-error events in win32.py
| * Reduced log level for non-error events in win32.pyRobin Chow2019-02-141-2/+2
| |
* | Revert "publish should be called when the state is changed"Jason R. Coombs2019-03-271-1/+1
|/ | | | This reverts commit 20bc9dbf617c61b8c2b7e847d3b88caeabfd6528.
* Correct the loglevel to INFO for sucessful case jvisu2019-01-031-2/+2
| | | | This fix is done to correct the loglevel. The loglevel is set to ERROR for successful case also. Updated to INFO level. For more details check url https://github.com/cherrypy/cherrypy/issues/1762
* Use always_iterable in Bus.waitJason R. Coombs2018-12-091-4/+3
|
* publish should be called when the state is changedIan Otto2018-11-211-1/+1
| | | publish should not be called during every wait cycle, only after the wait has found the correct state
* Fix incorrect copying of module names @ autoreloadSviatoslav Sydorenko2018-09-301-1/+4
|
* Copy modules before iteration in autoreloaderSviatoslav Sydorenko2018-09-281-1/+1
| | | | Fixes #1744
* Remove references to threading._* in Python 3.2 and earlier.Jason R. Coombs2018-09-041-2/+2
|
* Remove reliance on sixJason R. Coombs2018-09-022-5/+2
|
* Correct typo in args reconstruction guessing codeSviatoslav Sydorenko2018-07-081-1/+1
| | | | Fixes #1721
* Revert "Fix suggested by Andrew Stromnov to let psyco play nice with ↵Sviatoslav Sydorenko2018-06-161-17/+3
| | | | | | | | | | | | | | | | | CherryPy 3.1." This reverts commit e8e77404c7e753105e225a13a56411eb4e07624a. (It effectively removes dead code) From the Psyco website: > 12 March 2012 > > Psyco is unmaintained and dead. Please look at PyPy for the > state-of-the-art in JIT compilers for Python. http://psyco.sourceforge.net/
* Swap pep257 with pydocstyleSviatoslav Sydorenko2018-06-161-1/+1
|
* Don't attempt to make None absolute. Fixes #1697.Jason R. Coombs2018-05-281-1/+1
|
* Extract module to file mapping as _file_for_module classmethod.Jason R. Coombs2018-05-281-19/+32
| | | | Avoids condition where zip check always produces an AttributeError in the failure stack even when irrelevant.
* Use filter instead of if/continue block.Jason R. Coombs2018-05-281-3/+4
|
* Fix property settersSviatoslav Sydorenko2018-05-262-4/+4
|
* Upgrade @property decorator syntaxSviatoslav Sydorenko2018-05-262-18/+19
|
* Rewrite generation of file list for trackingSviatoslav Sydorenko2017-12-231-11/+14
| | | | Fixes #1675
* Single quotesJason R. Coombs2017-11-101-1/+1
|
* Prefer loops to copy pasteJason R. Coombs2017-11-101-22/+13
|
* Harmonize techniqueJason R. Coombs2017-11-101-6/+4
|
* Consolidate error message renderingJason R. Coombs2017-11-101-8/+8
|
* Merge pull request #1656 from cherrypy/feature/single-subscribeJason R. Coombs2017-11-101-6/+13
|\ | | | | Use single subscribe method for decorator or direct invocation
| * Fix partial so the positional argument is 'callback' and not 'channel'.Jason R. Coombs2017-10-291-1/+1
| |
| * Merge branch 'master' into feature/single-subscribeJason R. Coombs2017-10-291-2/+5
| |\
| * | Alternatively, engine.subscribe now allows calling without a callback, in ↵Jason R. Coombs2017-10-291-6/+13
| | | | | | | | | | | | which case it creates the decorator.
* | | Extract static method for daemonization for testing #1659.Jason R. Coombs2017-11-101-8/+15
| | |
* | | Regarding E305, honor the style guide rather than suppressing errors.Jason R. Coombs2017-10-292-3/+7
| |/ |/|
* | RedocumentJason R. Coombs2017-10-291-1/+1
| |
* | Use __all__ to avoid linter errorsJason R. Coombs2017-10-291-2/+5
|/
* Add cherrypy.engine.subscribe for nicer, linter-friendly syntax when ↵Jason R. Coombs2017-10-291-0/+5
| | | | subscribing a callback.
* Remove exemption for extra long lines. Updated code to conform with standard ↵Jason R. Coombs2017-10-281-2/+3
| | | | 79 character limitation. Fixes #1652.
* Update commentsJason R. Coombs2017-10-281-3/+4
|
* Use short-circuits and reindent to allow the single-line invocation of ↵Jason R. Coombs2017-10-281-9/+10
| | | | portend.occupied, required by older Pythons.
* Feed the hobgoblins (delint).Jason R. Coombs2017-10-271-3/+1
|
* Feed the hobgoblins (delint).Jason R. Coombs2017-10-273-10/+19
|
* Fix PEP 257 docstring errors in process.wspbusSviatoslav Sydorenko2017-08-101-7/+9
|
* Fix super() args in process.wspbus.ChannelFailuresSviatoslav Sydorenko2017-08-101-1/+1
| | | | Reported by lgtm.com service
* Mark docstrings with slash escaping as raw str (PR #1610 by @scop)Ville Skyttä2017-07-102-2/+2
| | | | * https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior (Python 3.6 invalid escape sequence deprecation)
* Spelling fixesVille Skyttä2017-07-101-1/+1
|
* Use six to resolve _thread moduleJason R. Coombs2017-07-091-3/+5
|
* Remove _args_from_interpreter_flags backportJason R. Coombs2017-07-081-3/+2
|
* PEP8fy codebase: eliminated F821 flake8 errorSviatoslav Sydorenko2017-03-121-0/+1
| | | | | | | Also fix usage of undeclared variables inroduces in commits: * 9913ddbc3 * c4b693e11 * d3c9807ba
* PEP8fy codebase: eliminated E303 flake8 errorSviatoslav Sydorenko2017-03-111-2/+0
|
* PEP8fy codebase: eliminated E129 flake8 errorSviatoslav Sydorenko2017-03-111-5/+4
|
* PEP8fy codebase: eliminated E305 flake8 errorSviatoslav Sydorenko2017-03-112-3/+3
|