Twisted 16.6.0 Release Announcement

2016-11-26 Thread Amber "Hawkie" Brown
On behalf of Twisted Matrix Laboratories, I am honoured to announce the release 
of Twisted 16.5!

The highlights of this release are:

- The ability to use "python -m twisted" to call the new `twist` runner,
- More reliable tests from a more reliable implementation of some things, like 
IOCP,
- Fixes for async/await & twisted.internet.defer.ensureDeferred, meaning it's 
getting closer to prime time!
- ECDSA support in Conch & ckeygen (which has also been ported to Python 3),
- Python 3 support for Words' IRC support and twisted.protocols.sip among some 
smaller modules,
- Some HTTP/2 server optimisations,
- and a few bugfixes to boot!

For more information, check the NEWS file (link provided below).

You can find the downloads at > (or alternatively 
>). The NEWS file is also 
available at >.

Many thanks to everyone who had a part in this release - the supporters of the 
Twisted Software Foundation, the developers who contributed code as well as 
documentation, and all the people building great things with Twisted!

Twisted Regards,
Amber Brown (HawkOwl)
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: Twisted 16.6.0 Release Announcement

2016-11-26 Thread Amber "Hawkie" Brown
Er, that should be 16.6 in the first line. Shouldn't release software at 6am!

- Amber

> On 26 Nov. 2016, at 07:02, Amber Hawkie Brown  
> wrote:
> 
> On behalf of Twisted Matrix Laboratories, I am honoured to announce the 
> release of Twisted 16.5!
> 
> The highlights of this release are:
> 
> - The ability to use "python -m twisted" to call the new `twist` runner,
> - More reliable tests from a more reliable implementation of some things, 
> like IOCP,
> - Fixes for async/await & twisted.internet.defer.ensureDeferred, meaning it's 
> getting closer to prime time!
> - ECDSA support in Conch & ckeygen (which has also been ported to Python 3),
> - Python 3 support for Words' IRC support and twisted.protocols.sip among 
> some smaller modules,
> - Some HTTP/2 server optimisations,
> - and a few bugfixes to boot!
> 
> For more information, check the NEWS file (link provided below).
> 
> You can find the downloads at  > (or alternatively 
>  >). The NEWS file is also 
> available at  >.
> 
> Many thanks to everyone who had a part in this release - the supporters of 
> the Twisted Software Foundation, the developers who contributed code as well 
> as documentation, and all the people building great things with Twisted!
> 
> Twisted Regards,
> Amber Brown (HawkOwl)

-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


attrs 16.3.0

2016-11-26 Thread Hynek Schlawack
Dear fellow Pythonistas,

I’m very happy to announce attrs 16.3.0, the Python library the makes you love 
writing classes again!  If you need a refresher why you should use attrs, have 
a look at “The One Python Library Everyone Needs” 
 written by no one less 
than Glyph himself.

It’s still 100% free of magic but 100% full of convenience!

This version comes with two major new features I’d like to point out:


1. Attribute Metadata


There is a much nicer way to extend attrs now by using attribute metadata.  If 
you’re thinking Golang’s struct tags, it’s close!

However instead of exposing them to the users, it’s much nicer to *wrap* attrs 
and use metadata to bring the declarative approach to new areas.

For example this code will automatically load its configuration from env 
variables (as per 12Factor App: ):

```
@app_config(prefix="APP", vault_prefix="WHOIS_{env}")
class WhoisConfig:
@app_config
class Prometheus:
address = env_var(default="127.0.0.1")
port = env_var(default="0")
consul_token = env_var_from_vault()

env = env_var()
prometheus = env_var_group(Prometheus)


if __name__ == '__main__':
ac = environ_to_app_config(WhoisConfig)

print(ac)
```

Running it gives you:

```
$ env APP_ENV=dev APP_PROMETHEUS_PORT=7000 
SECRET_WHOIS_DEV_APP_PROMETHEUS_CONSUL_TOKEN=abc python app.py
WhoisConfig(env='dev', prometheus=Prometheus(address='127.0.0.1', port='7000', 
consul_token='abc'))
```

(If you’re interested in the implementation of app_config, env_var, 
env_var_from_vault, env_var_group, and environ_to_app_config, have a look at 
 – it’s 87 LoC 
including empty lines.  I may or may not release a PyPI package one day)


2. Post Initialization Hooks


This is an often requested feature (just look at all those enthusiastic 
bikeshed painters:  ) and allows you 
to define code that runs after the generated __init__ method.

This should make life easier when subclassing third party classes or if you 
want to derive attributes from others.


Full Changelog
===

-   Attributes now can have user-defined metadata which greatly improves 
attrs's extensibility. #96
-   Allow for a __attrs_post_init__ method that -- if defined -- will get 
called at the end of the attrs-generated __init__ method. #111
-   Add @attr.s(str=True) that will optionally create a __str__ method that is 
identical to __repr__. This is mainly useful with Exceptions and other classes 
that rely on a useful __str__ implementation but overwrite the default one 
through a poor own one. Default Python class behavior is to use __repr__ as 
__str__ anyways.

If you tried using attrs with Exceptions and were puzzled by the 
tracebacks: this option is for you.
-   Don't overwrite __name__ with __qualname__ for attr.s(slots=True) classes. 
#99


Links


PyPI: 
Documentation: 
GitHub: 

Cheers,
Hynek
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


ANN: JavaScrypthon 0.5, now with embedded evaluation of transpiled code

2016-11-26 Thread Alberto Berti
Hi all,

i'm pleased to announce that JavaScripthon 0.5 has been released to
PyPI. JavaScrypthon can translate a subset of Python 3.5 code to  ES6
JavaScript producing beautiful and lean  code, while supporting some of
the latest Python features.

Changelog
(https://github.com/azazel75/metapensiero.pj/blob/master/CHANGES.rst):

- translate ``tmpl("A string with js ${interpolation}")`` to ES6 template
  literals;
- preliminary support to translate names like ``d_foo`` and ``dd_bar`` to
  ``$foo`` and ``$$bar``;
- addded translation of the ``assert`` statement;
- fixed a bug in ``try...except...finally`` statement when there's no
  ``except`` section;
- added translation for ``foo is not bar`` that seems to have dedicated ast
  node;
- if the function is defined in a method but starts with ``fn_`` do not convert
  it to an arrow function. Useful to *not* maintain ``this``;
- added translation for ``callable`` and ``hasattr/getattr/setattr``;
- updated for loops to support more than one target, so now its possible to
  write loops like ``for k, v in iterable(a_map):``;
- updated documentation;
- added a new cli option ``-s`` to translate source from the command line or
  the standard input;
- fixed a pair of bugs on sourcemaps;
- added a new cli option ``--eval`` to also evaluate the produced JavaScript
  using the embedded interpreter;
- added a new cli option ``--dump-ast`` to print out the ast tree of the
  passed in string;
- added sorting to the rendered snippets/decorators/assignments so that their
  order does not change at every ricompilation;
- do not re-declare variables declare in outer scopes;

- updated BabelJS to version 6.18.1;
- allow to import modules with dashes inside by using dunder-inside-words
  notation (``foo__bar`` becomes ``foo-bar``);
- reuse JavaScript interpreter context to speedup translation;
- update ``in`` operator to support ES6 collections;
- added support for method and class decorators;
- added support for class properties and descriptors;
- add ``for`` loop over JS iterables;
- allow to loop over inherited properties;
- fix a bug on ``type()`` translation;
- support for ``range()`` steps;
- add support for generator functions and ``yield`` and ``yield from``
  expressions;
- optionally load babel-polyfill before evaluating code;
- fix a bug on sourcemaps having wrong references when there are documentation
  elements;
- translate ``__get__()`` and ``__set__()`` to to JS equivalents;
- implement ``dict(foo).update(bar)`` and ``dict(foo).copy``;
- documentation improvements;
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Sphinx-1.4.9 has been released

2016-11-26 Thread Komiya Takeshi
Hi all,

I'm delighted to announce the release of Sphinx 1.4.9, now available on
the Python package index at .

It includes about 11 bug fixes for the 1.4.8 release series.

For the full changelog, go to
.
Thanks to all collaborators and contributers!

What is it?
===

Sphinx is a tool that makes it easy to create intelligent and beautiful
documentation for Python projects (or other documents consisting of
multiple reStructuredText source files).

Website: http://sphinx-doc.org/
IRC: #sphinx-doc on irc.freenode.net

Enjoy!
--
Takeshi KOMIYA
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/