Just so people aren't caught unawares, it is very unlikely that I will have
time to be the final editor on "What's New for 3.5" they way I was for 3.3 and
3.4. I've tried to encourage people to keep What's New up to date, but
*someone* should make a final editing pass. Ideally they'd do at least the
research Serhiy did last year on checking that there's a mention for all of the
versionadded and versionchanged 3.5's in the docs. Even better would be to
review the NEWS and/or commit history...but *that* is a really big job these
days....
--David
Hi everybody,
I'm trying to get sense of PEP-0442 [1]. Most of the looks clear,
however I wasn't able to answer myself one simple question: why it
wasn't possible to implement proposed CI disposal scheme on top of
tp_del? Common sense suggests that tp_del and tp_finalize have different
semantics. For instance, with tp_finalize there is a guarantee that the
object will be in a safe state, as documented at [2]. However, tp_del is
not documented, and I have only vague idea of its guarantees. Are there any?
Thanks for the clarification.
1. https://www.python.org/dev/peps/pep-0442/
2. https://docs.python.org/3/c-api/typeobj.html
--
Best regards,
Valentine Sinitsyn
I've written up a long technical blog post about the compiler and CRT
changes in Python 3.5, which will be of interest to those who build and
distribute native extensions for Windows.
http://stevedower.id.au/blog/building-for-python-3-5/
Hopefully it puts some of the changes we've made into a context where
they don't just look like unnecessary pain. Feedback and discussion
welcome, either on these lists or on the post itself.
Cheers,
Steve
PEP 498 adds a new string prefix which allows simpler string formatting
by embedding expressions inside string literals. The expressions are
evaluated and inserted into the resulting string value:
>>> import datetime
>>> name = 'Fred'
>>> age = 50
>>> anniversary = datetime.date(1991, 10, 12)
>>> f'My name is {name}, my age next year is {age+1}, my anniversary is
{anniversary:%A, %B %d, %Y}.'
'My name is Fred, my age next year is 51, my anniversary is Saturday,
October 12, 1991.'
There's been a lot of discussion about this on python-ideas, much of
which has been incorporated in to the PEP. Now I feel it's ready for
python-dev input.
Note there's a companion PEP 501 which extends this idea by delaying
converting the expression into a string. This allows for more control
over how the expressions are converted in to strings, and allows for
non-string conversions as well.
I have a complete implementation of PEP 498. I'll shortly create an
issue and attach the patch to it.
--
Eric.
Hi Alex,
Thanks for your email, and the suggestion. A couple of things …
First, as webmaster we are simply volunteers who try to accept and process feedback *about the python.org <http://python.org/> web site*. We aren’t (mostly) actively involved in the development of the language, though we are all dedicated users - most of us either don’t have tie to take part in python-dev or feel we have already put our time in. So this isn’t the best channel for the particular inout you’re making.
Second, while it’s practical to put *most* of the stdlib in a zip file it may be impractical to put them *all* in there. I did some experiments (admittedly about eight years ago, so things may have changed) to enable an import mechanism that imported code from a relational database. Naturally there were modules that had to be loaded using the standard mechanisms - the ones I needed to import to enable my database imports! It’s a classical bootstrap problem.
Third, your idea would need considerable expansion before being actionable: consider the fact that there are millions of downloads of Python every month. Obviously there is huge amount of engineering detail to consider before releasing anything new - if an error only occurs one time in 100,000 that will lead to a substantial number of bug reports, so the dev tend to proceed fairly carefully and with much deliberation.
Fourth, I really like it that you are enthusiastic about Python, and would suggest you consider joining the python-dev mailing list. Start as a lurker, just reading what is said, and (since you are obviously thinking a lot as you learn Python) you will be surprised how much you pick up. The people on that list aren’t gods, they are just regular developers who happen to commit a lot of their time to Python’s development, and they rely on a continuous influx of new blood. So as long as you take your time getting to know the personalities involved and how the list works you are likely to find a welcome there. The day will arrive when you realize that rather to your surprise you have something to contribute.
There’s also the python-ideas list and, if you are nervous about just diving straight into python-dev, there’s the python-mentor list that was specifically designed to provide a sympathetic and uncritical response to enthusiasm such as you exhibit.
The caveat in all this is that as an old fart I haven’t actually been active on any of those lists for quite a while, so I am unsure how active they all are.
I hope this response is helpful. I’ve invested a lot of time in trying to make the Python ecosystem one that welcomes enthusiasm and energy, and lot of other people do the same, many of them more effectively than me. It seems to me that you have both enthusiasm and energy, which is why I’ve taken the time to encourage you to put it to use.
Good luck in your progress with Python.
regards
Steve
PS: The mailing lists are all detailed on https://mail.python.org/mailman/listinfo <https://mail.python.org/mailman/listinfo>
> On Aug 31, 2015, at 9:48 PM, Alex Huffstetler <superdoom1(a)outlook.com> wrote:
>
> I have an idea. I had a problem with installing Python because I’m not an admin.
> My idea is you delete the installer and put all the files in a ZIP folder. It can make download time faster.
> Also, I made the Python logo out off underscores and pipes.
> If it dosen’t look right, put it somewhere on the Internet and it’ll look right.
> _____________
> | . |
> _______|_______ |________
> | | |
> | _____________| |
> | | |
> |_______| _______________|
> | . |
> |_____________|
--
Steve Holden steve(a)holdenweb.com / +44 208 289 6308 / @holdenweb
Recently, in an asyncio related issue [1], Guido said that new features
for asyncio have to wait till 3.6, since asyncio is no longer a provisional
package. Later, in an off-list conversation, he suggested that this topic
should be discussed on python-dev, and that it might indeed make sense to
either write a new PEP for cases like this or to augment PEP 411.
My opinion on this topic is that we must maintain full backwards
compatibility for asyncio from 3.5.0, as it is now widely used, and there
is quite a big ecosystem around it. However, asyncio is simply not mature
enough to be completely feature frozen for about 2 years.
For example, there is an issue [2] to add starttls support to asyncio. It
is an essential feature, because some protocols start as clear text and
upgrade to TLS later, for example PostgreSQL PQ3 protocol. It's very hard
to implement starttls on top of asyncio, lots of code will have to be
duplicated -- it's a feature that has to implemented in the asyncio core.
Aside from adding new APIs, we also have to improve debugging
capabilities. One example is using os.fork() from within a running event
loop -- it must be avoided by all means. There are safe ways to fork in
asyncio applications (and I plan to document them soon), but asyncio
should raise an exception in debug mode if this happens (see issue [3]).
These are just two immediate issues that I have in mind. In reality,
asyncio is quite young compared to frameworks like Twisted, which had
years to mature, and accumulate essential features.
My proposal is to amend PEP 411 with two levels of provisional packages:
Level 1: Backwards incompatible changes might be introduced in point
releases.
Level 2: Only backwards compatible changes can be introduced in new point
releases.
With the above amendments, asyncio status should be restated as a
level-2 provisional package.
I'm CC-ing authors of PEP 411 Nick and Eli.
Thank you,
Yury
[1] http://bugs.python.org/issue23630
[2] http://bugs.python.org/issue23749
[3] http://bugs.python.org/issue21998
None of the linux buildbots run with X enabled. Consequently none of
the tkinter (or tkinter user) gui tests are run on Linux. It was thus
pointed out to me, during discussion of using ttk widgets in Idle, that
we do not really know if ttk works on the variety of Linux systems
(beyond the one Serhiy uses) and that I should look into this.
I asked on python-list for help, by linux users running
python3 -m test -ugui test_tk test_ttk_guionly test_idle
Seven people did so with Debian Jessie, Debian Wheezy, Gentoo, Mint,
openSUSE, and Ubuntu (x2). One machine failed once with the ttk test,
and then passed. Another failed the tk test until a mis-configuration
was fixed. So tkinter, and ttk in particular, seems to be working on linux.
Do any of the core devs who run the test suite on Linux do so with -uall
or -ugui? The gui tests above take about 10 seconds (mostly the tk
test) on my machine, with some flashing boxes near the end.
--
Terry Jan Reedy
Now that we're in the "release candidate" phase of Python 3.5.0, the
workflow
has changed a little. We're trying an experiment using Bitbucket and pull
requests. You can read about that workflow, here:
https://mail.python.org/pipermail/python-dev/2015-August/141167.html
But the instructions for that workflow are pretty hazy on what you do after
your pull request is accepted. This message is an addendum to those
instructions, describing exactly what you should do after your pull
request is accepted.
To save wear and tear on my hands (and your eyes), for the rest of these
instructions, I'm going to refer to each place-you-can-check-things-in-to
by version number as follows:
3.4 : hg.python.org/cpython (branch "3.4")
3.5.0 : https://bitbucket.org/larry/cpython350 (branch "3.5")
3.5.1 : hg.python.org/cpython (branch "3.5")
3.6 : hg.python.org/cpython (branch "default")
With that nomenclature established I can now precisely say: when your pull
request is accepted into 3.5.0, you need to merge from 3.5.0 into 3.5.1,
and then from 3.5.1 into 3.6.
Doing this is much like the existing workflow. You use "hg merge" to merge
your changes from previous versions into subsequent versions (what I call
"forward merging").
What complicates matters is the fact that the 3.5.0 release candidates don't
live in the normal repo--they lives in a repo on Bitbucket which is only
writeable by me. In order to keep a tight lid on the changes checked in to
the 3.5.0 release candidates, I won't pull revisions from the normal CPython
repo. (If I did, I'd also pull in changes intended for 3.5.1, and...
it'd be a mess.)
So here come the instructions. They look long, but that's just because I go
into a lot of detail to try and make them as foolproof as possible. They
aren't really much longer or more complicated than the steps you already
follow to perform forward-merges.
Note that these are easy, guaranteed-clean instructions on how to
perform the
merge. Are there shortcuts you could take that might speed things up? Yes.
But I encourage you to skip those shortcuts and stick to my instructions.
Working with multiple branches is complicated enough, and this external repo
makes things even more complicated. It's all too easy to make a mistake.
HOW TO FORWARD-MERGE FROM 3.5.0 TO 3.5.1
----------------------------------------
1: Wait until your pull request has been accepted.
2: Make a *clean* local clone of the CPython tree, updated to the "3.5"
branch. In my instructions I'll call the clone "cpython351-merge":
% hg clone ssh://hg@hg.python.org/cpython -u 3.5 cpython351-merge
% cd cpython351-merge
3: Confirm that you're in the correct branch. You should be in the
"3.5" branch. Run this command:
% hg id
Let's assume that the current head in the "3.5" branch has changeset
ID "7890abcdef". If that were true, the output of "hg id" would look
like this:
7890abcdef (3.5)
It might also say "tip" on the end, like this:
7890abcdef (3.5) tip
If it doesn't say "3.5", switch to the 3.5 branch:
% hg up -r 3.5
and repeat this step.
4: Pull from the 3.5.0 repo into your "cpython351-merge" directory.
% hg pull ssh://hg@bitbucket.org/larry/cpython350
You should now have two "heads" in the 3.5 branch; the existing head
you saw in the previous step, and the new head you just pulled in,
which should be the changeset from your pull request.
5: As an optional step: confirm you have the correct two heads.
This command will print a list of all the heads in the current repo:
% hg heads
Again, you should have exactly two identified as being on the "3.5"
branch; one should have the changeset ID shown by "hg id" in step 3,
the other should be your change from the pull request.
6: Merge the two heads together:
% hg merge
If there are merge conflicts, Mercurial will guide you through the
conflict resolution process as normal.
7: Make sure that all your changes merged properly and you didn't
merge anything else by accident. I run these two commands:
% hg stat
% hg diff
and read all the output.
8: Make sure Misc/NEWS has your update in the right spot. (See below.)
9: Check in. The checkin comment should be something like
Merge from 3.5.0 to 3.5.1.
10: Push your changes back into the main CPython repo.
% hg push
11: Now forward-merge your change to 3.6 as normal, following the
CPython Dev Guide instructions:
https://docs.python.org/devguide/committing.html#merging-between-different-…
FREQUENTLY ASKED QUESTIONS
--------------------------
Q: I screwed something up! What do I do now?
If you haven't pushed your changes out, it's no problem. Just delete your
repo and start over.
If you *have* pushed your changes out, obviously we'll need to fix the
mistake. If you're not sure how to fix the problem, I suggest logging
in to the #python-dev IRC channel and asking for help.
Q: What do I need to do about Misc/NEWS?
I'm glad you asked!
First, you *must* put your Misc/NEWS update into the correct section. If
you're creating a pull request for Python 3.5.0 rc-something, put it in the
3.5.0 rc-something section. If you're checking in to 3.5.1, put it in the
3.5.1 section. If you're just checking into 3.6, put it in the 3.6.0
alpha 1
section.
Second, when you merge forward, make sure the merge tool puts your Misc/NEWS
entry in the right section. The merge tool I seem to use isn't particularly
smart about this, so I've had to manually edit Misc/NEWS many times to fix
it. (When I released 3.5.0rc2, I had to do a lot of cleanup on Misc/NEWS,
and again in the 3.5.1 branch, and again in 3.6.) Every time you merge
forward, make sure your Misc/NEWS entry is in the right spot.
Q: What if a second pull request is accepted before I get around to doing
the merge?
Well, *someone* needs to merge, and they're going to have to merge *both*
changes. I can't come up with a good general policy here. Hopefully this
won't happen often; for now let's just handle it on a case-by-case basis.
Q: What if I have a bugfix for 3.4 that I want to ship with 3.5.0?
You have to check in twice, and merge-forward twice. First, check in to
3.4,
then merge forward into 3.5.1 and 3.6. Then, once your pull request is
accepted into 3.5.0, do a "null merge" (a merge where no files are changed)
from 3.5.0 into 3.5.1 and 3.6.
Q: What if my pull request is turned down?
If your bug fix isn't critical enough to merit shipping with 3.5.0, just
check
it into the normal 3.5 branch on hg.python.org and it'll ship with 3.5.1.
(And, naturally, forward-merge it into 3.6.)
//arry/
Dear,
I have faced a problem as below when I startup the python IDLE
[cid:image001.png@01D0E0CE.454096D0]
Then I try to run a simple program like this:
[cid:image002.png@01D0E0CE.454096D0]
Other issue is pop out
[cid:image003.png@01D0E0CE.454096D0]
May I know how to fix the issue? My laptop is window 7 64bits.
Thanks and having a nice day !
Regards,
Arthur Low Wai Hoe