Live data from Hacker News

Python 3.4 Beta 1 Released

python.org

21–29 of 29 posts

Re: Python 3.4 Beta 1 Released

#21

Wow, I haven't heard of pathlib [1] before now, but it looks awesome! In particular, using the slash operator to join paths is brilliant. >>> p = PurePath('/etc') >>> p / 'init.d' / 'apache2' PurePosixPath('/etc/init.d/apache2') [1]: http://docs.python.org/3.4/library/pathlib.html

I thought operator overloading like that was considered bad practise. It seems to me that the + operator should have been overloaded, not the / operator.

Re: Python 3.4 Beta 1 Released

#22

> a new C API for implementing custom memory allocators Wow. This'll lead to some interesting hacks, I think.

Finally all the hacks done internaly by some big Python company is released in the wild and not by them. Check out the presentation by the creator (in french) https://github.com/haypo/conf/blob/master/2013-PyconFR-Stras...

Re: Python 3.4 Beta 1 Released

#23

Been using python for 7+ years now. Does everyone really think people are willing to adopt 3.x anything...? The reality of it is every place I have worked (and currently working at). Is bound by 3rd party tools and what ever interpreter they built against. Mostly that 2.6,2.7 right now. And it does not look like anyone will be switching anytime soon. Features look great, cant wait to "play" with them. But that;s abou…

Mostly interested by Python3 because of asyncio (formely tulip). Trying to beat nodejs at its own game. I'm waiting for PyPy Python3 compatible to be released to do some comparisons. Anyway PyPy seems to already beat nodejs, Python 3 will just make working with async code easier.

Re: Python 3.4 Beta 1 Released

#25
post #24

isn't 2.7 the best python still because twisted?

The most exciting feature in 3.4 (at least in my opinion) is the addition of asyncio to the standard library, which aims to provide a standard event loop which libraries like Twisted can then use to make themselves interoperable with other async Python solutions:

http://www.python.org/dev/peps/pep-3156/

"The event loop is the place where most interoperability occurs. It should be easy for (Python 3.3 ports of) frameworks like Twisted, Tornado, or even gevents to either adapt the default event loop implementation to their needs using a lightweight adapter or proxy, or to replace the default event loop implementation with an adaptation of their own event loop implementation. (Some frameworks, like Twisted, have multiple event loop implementations. This should not be a problem since these all have the same interface.)"

Re: Python 3.4 Beta 1 Released

#26

Been using python for 7+ years now. Does everyone really think people are willing to adopt 3.x anything...? The reality of it is every place I have worked (and currently working at). Is bound by 3rd party tools and what ever interpreter they built against. Mostly that 2.6,2.7 right now. And it does not look like anyone will be switching anytime soon. Features look great, cant wait to "play" with them. But that;s abou…

I'm feeling optimistic about Python 3. For personal and work projects I've been writing 3-compatible code, and am hoping to have a production system using it by the end of the month.

I think everyone is expecting a really long tail to the transition, but we'll get there eventually.

Re: Python 3.4 Beta 1 Released

#27
post #20

Been using python for 7+ years now. Does everyone really think people are willing to adopt 3.x anything...? The reality of it is every place I have worked (and currently working at). Is bound by 3rd party tools and what ever interpreter they built against. Mostly that 2.6,2.7 right now. And it does not look like anyone will be switching anytime soon. Features look great, cant wait to "play" with them. But that;s abou…

Well, some people are bound to already installed interpreters. And those come with Linux distros. Many of which will be using Python 3 as the default for their 2014 releases (Fedora, Ubuntu, Arch). Plus these distributions are helping/pushing 3rd party Python developers to port to Python 3. So 2014 really looks like Python 3 mass adoption.

In corporate environments basically nobody uses Fedora, really nobody uses Arch, and some people use Ubuntu. RHEL7 will be new in 2014, and it will have Python 2.7. We can expect RHEL8 to come with Python 3, in 2017, and the migration to that should be almost complete by 2021. I wish I were exaggerating.

Re: Python 3.4 Beta 1 Released

#28

> a new C API for implementing custom memory allocators Wow. This'll lead to some interesting hacks, I think.

Finally all the hacks done internaly by some big Python company is released in the wild and not by them. Check out the presentation by the creator (in french) https://github.com/haypo/conf/blob/master/2013-PyconFR-Stras...

I started the development of tracemalloc at Wyplay, but I rewrote all the code for the version included in Python 3.4: complelty different API, you get different data, new implementation, etc. The old code: https://github.com/wyplay/pytracemalloc/

The PEP 445 (malloc API) also allows to plug hooks on memory allocators at runtime, instead of having to recompile Python for that.

Re: Python 3.4 Beta 1 Released

#29

> a new C API for implementing custom memory allocators Wow. This'll lead to some interesting hacks, I think.

tracemalloc is the first user of the PEP 445 (malloc API), but I wrote another toy: https://bitbucket.org/haypo/pyfailmalloc

"Debug tool for Python injecting memory allocation faults to simulate a low memory system to test how your application handles MemoryError exceptions."

Post reply on HN