Hi everyone!
I'm happy to announce the first prerelease for Twisted 15.1! This is not a big release, but does have some nice-to-haves:
- You can now install Twisted's optional dependencies (when it's released to PyPI) easier -- for example, `pip install twisted[tls]` installs Twisted with TLS support.
- twisted.web.static.File allows defining a custom resource for rendering forbidden pages.
- Twisted's MSN support is now deprecated.
- More documentation on how Trial finds tests.
As usual, …
[View More]tarballs can be found at http://twistedmatrix.com/Releases/pre/15.1.0pre1/ , and the full NEWS file can be found at http://twistedmatrix.com/Releases/pre/15.1.0pre1/NEWS.txt .
Please test them out! :)
Twisted regards,
Hawkie Owl
[View Less]
I find the "semantic newlines" standard which we have been attempting to enforce for documentation a constant source of annoyance.
Ostensibly, the purpose of using semantic newlines is to reduce the size of diffs. However, given that we have oceans of documentation _not_ using this style, we are unlikely to reap that benefit any time soon. Also, unlike code, documentation rarely needs small spot fixes; a fix to a document should result in changes elsewhere within the sentence or paragraph.
…
[View More]In pursuit of this questionable benefit, we have to accept the following annoyances:
It's inconsistent with pretty much every other Sphinx project out there. Python lays out an 80-column maximum for Sphinx documents, the same as code: https://docs.python.org/devguide/documenting.html#use-of-whitespace <https://docs.python.org/devguide/documenting.html#use-of-whitespace> and an inspection of pretty much every other Sphinx project out there shows this style is consistently followed.
It's inconsistent with the coding standard and requires special explanation in the docs. I was prompted to write this message by attempting to review <https://twistedmatrix.com/trac/ticket/7786 <https://twistedmatrix.com/trac/ticket/7786>>.
It requires special editor configuration. ReST mode in emacs, vim, and sublime text expect to wrap paragraphs at 80 characters and keeping the semantic newlines where they're supposed to be has no tool support and involves avoiding other bits of tool support around re-flowing. It also looks bad in an editor, with a ragged right edge.
It looks bad in online code browsers; long sentences horizontally scroll or wrap.
I think this style might have made sense ago 10 years ago in HTML, but with present-day RST it seems to go strongly against the grain.
Would anyone else like to make our documentation style-guide more harmonious with existing standards? Anyone opposed?
Thanks,
-glyph
[View Less]
Platform:
CPU: Intel (2x with 8 core each then hyper-threading gets us to 32 virtual)
Ubuntu 14.04
Python 3.4 (yes, I know)
Twisted 13.2.0
I use the vanilla twisted.internet.reactor.run() with the
factory twisted.web.server.Site(root). It all runs just fine (seemingly)
but,when I was snooping around on my machine, I had a ton of threads lying
about. After cleaning up, I restarted my twisted application and found that
I have 151 python3 threads lying about. I doubled checked and I have just
…
[View More]twisted application running.
I browsed the documentation and the twisted thread pool claims to default
between 5 and 10. However, I do abuse the deferToThread() cannot find any
simple documentation on how that might feed back to the 151 threads. I
thought maybe I need to exit the deferred returned from deferToThread() in
some special way to clean it all up. However, I can find no documentation
for it.
I have been googling about with many random search terms trying to puzzle
the 151 threads from the documentation that tells me I should expect 5 to
10.
Can anyone please help understand why I have 151 threads and where they are
coming from? Luckily they are all idle so the machine runs just fine.
The best story I can come up with is that there is one master thread on
core-0 and then I get 10 threads in the pool for each of the other physical
cores. However, the story is just numerology.
[View Less]
My dear friends, would u please give your hand kindly?
the twisted version is 12.3.0.
the detail error is as below:
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 652, in run
runApp(config)
File "/usr/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 23, in runApp
_SomeApplicationRunner(config).run()
File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 386, in run
…
[View More]self.application = self.createOrGetApplication()
File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 451, in createOrGetApplication
application = getApplication(self.config, passphrase)
--- <exception caught here> ---
File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 462, in getApplication
application = service.loadApplication(filename, style, passphrase)
File "/usr/lib/python2.7/site-packages/twisted/application/service.py", line 405, in loadApplication
application = sob.loadValueFromFile(filename, 'application', passphrase)
File "/usr/lib/python2.7/site-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile
exec fileObj in d, d
File "src/try.tac", line 32, in <module>
from twisted.internet import epollreactor
File "/usr/lib/python2.7/site-packages/twisted/internet/epollreactor.py", line 31, in <module>
from twisted.python import _epoll
exceptions.ImportError: cannot import name _epoll
Failed to load application: cannot import name _epoll
Thanks a lot,
Mark
[View Less]