[Python-Dev] bpo-33257: seeking advice & approval on the course of action

2018-05-02 Thread Ivan Pozdeev via Python-Dev
The bottom line is: Tkinter is currently broken -- as in, it's not thread-safe (in both Py2 and Py3) despite being designed and advertizing itself as such. All the fix options require some redesign of either `_tkinter', or some of the core as well. So, I'd like to get some kind of core team's

[Python-Dev] Drop/deprecate Tkinter?

2018-05-02 Thread Ivan Pozdeev via Python-Dev
As https://bugs.python.org/issue33257 and https://bugs.python.org/issue33316 showed, Tkinter is broken, for both Py2 and Py3, with both threaded and non-threaded Tcl, since 2002 at least, and no-one gives a damn. This seems to be a testament that very few people are actually interested in or

Re: [Python-Dev] Drop/deprecate Tkinter?

2018-05-02 Thread Ivan Pozdeev via Python-Dev
On 03.05.2018 1:01, Antoine Pitrou wrote: On Wed, 2 May 2018 22:54:04 +0100 Paul Moore wrote: On 2 May 2018 at 22:37, Antoine Pitrou wrote: To elaborate a bit: the OP, while angry, produced both a detailed analysis *and* a PR. It's normal to be angry when an advertised feature doesn't work a

Re: [Python-Dev] Drop/deprecate Tkinter?

2018-05-03 Thread Ivan Pozdeev via Python-Dev
On 03.05.2018 20:11, Ryan Gonzalez wrote: On May 3, 2018 11:56:24 AM MRAB wrote: On 2018-05-03 13:24, Steve Holden wrote: On Thu, May 3, 2018 at 12:12 AM, Ivan Pozdeev via Python-Dev mailto:python-dev@python.org>> wrote:     On 03.05.2018 1:01, Antoine Pitrou wrote:     On Wed,

Re: [Python-Dev] Dealing with tone in an email

2018-05-03 Thread Ivan Pozdeev via Python-Dev
On 03.05.2018 21:31, Brett Cannon wrote: On Thu, 3 May 2018 at 01:27 Paul Moore > wrote: On 3 May 2018 at 03:26, Steven D'Aprano mailto:st...@pearwood.info>> wrote: >> Will all due respect, it's sometimes unpredictable what kind of wording >> Anglo

Re: [Python-Dev] Dealing with tone in an email

2018-05-05 Thread Ivan Pozdeev via Python-Dev
On 04.05.2018 19:04, Guido van Rossum wrote: Thank you Steven! I assume that Brian hadn't seen my response (such crossed messages due to delivery delays are very common in this mailing list). I'd like to use your email (nearly) verbatim to start off the discussion about civility we're going t

Re: [Python-Dev] Windows 10 build agent failures

2018-05-06 Thread Ivan Pozdeev via Python-Dev
For me, Tcl/Tk failed to build with SDK 10.0.16299.0 , I had to expicitly fall back to 10.0.15063.0 ( https://stackoverflow.com/questions/48559337/error-when-building-tcltk-in-visual-studio-2017 ). May be related if VS was (auto)updated on the builders.|| On 06.05.2018 11:05, Paul Goins wrote:

Re: [Python-Dev] bpo-33257: seeking advice & approval on the course of action

2018-05-14 Thread Ivan Pozdeev via Python-Dev
On 14.05.2018 21:58, Terry Reedy wrote: On 5/14/2018 12:20 PM, Chris Barker via Python-Dev wrote: On Wed, May 2, 2018 at 8:21 PM, Terry Reedy <mailto:tjre...@udel.edu>> wrote:     On 5/2/2018 4:38 PM, Ivan Pozdeev via Python-Dev wrote:     The bottom line is: Tkinter is current

Re: [Python-Dev] bpo-33257: seeking advice & approval on the course of action

2018-05-14 Thread Ivan Pozdeev via Python-Dev
On 14.05.2018 22:05, Ivan Pozdeev wrote: On 14.05.2018 21:58, Terry Reedy wrote: On 5/14/2018 12:20 PM, Chris Barker via Python-Dev wrote: On Wed, May 2, 2018 at 8:21 PM, Terry Reedy <mailto:tjre...@udel.edu>> wrote:     On 5/2/2018 4:38 PM, Ivan Pozdeev via Python-Dev wrote:   

[Python-Dev] Making Tcl/Tk more suitable for embedding (was: [issue33479] Document tkinter and threads)

2018-05-15 Thread Ivan Pozdeev via Python-Dev
Subj is off topic for the ticket, so I guess this discussion is better continued here. On 15.05.2018 18:20, Mark Roseman wrote: Mark Roseman added the comment: Hi Ivan, thanks for your detailed response. The approach you're suggesting ("Since the sole offender is their threading model, the w

Re: [Python-Dev] [python-committers] FINAL WEEK FOR 3.7.0 CHANGES!

2018-05-18 Thread Ivan Pozdeev via Python-Dev
On 18.05.2018 10:55, Serhiy Storchaka wrote: 17.05.18 21:39, Brett Cannon пише: Maybe we should start thinking about flagging PRs or issues as needing a What's New entry to help track when they need one, or always expect it in a PR and ignore that requirement when a 'skip whats new' label is a

Re: [Python-Dev] Normalisation of unicode and keywords

2018-05-18 Thread Ivan Pozdeev via Python-Dev
On 18.05.2018 14:46, Steven D'Aprano wrote: Stephan Houben noticed that Python apparently allows identifiers to be keywords, if you use Unicode "mathematical bold" letters. His explanation is that the identifier is normalised, but not until after keywords are checked for. So this works: class Sp

Re: [Python-Dev] My fork lacks a 3.7 branch - can I create it somehow?

2018-05-22 Thread Ivan Pozdeev via Python-Dev
On 22.05.2018 3:07, Skip Montanaro wrote: My GitHub fork of the cpython repo was made awhile ago, before a 3.7 branch was created. I have no remotes/origin/3.7. Is there some way to create it from remotes/upstream/3.7? I asked on GitHub's help forums. The only recommendation was to to delete my f

Re: [Python-Dev] PEP 574 (pickle 5) implementation and backport available

2018-05-25 Thread Ivan Pozdeev via Python-Dev
On 25.05.2018 20:36, Raymond Hettinger wrote: On May 24, 2018, at 10:57 AM, Antoine Pitrou wrote: While PEP 574 (pickle protocol 5 with out-of-band data) is still in draft status, I've made available an implementation in branch "pickle5" in my GitHub fork of CPython: https://github.com/pitrou

Re: [Python-Dev] How to watch buildbots?

2018-05-30 Thread Ivan Pozdeev via Python-Dev
On 30.05.2018 13:01, Victor Stinner wrote: Hi, I would like to delegate the maintenance task "watch buildbots", since I'm already very busy with many other maintenance tasks. I'm looking for volunteers to handle incoming emails on buildbot-status. I already started to explain to Pablo Galindo Sa

Re: [Python-Dev] What is the command to upgrade python 3.6.5 to 3.7.5?

2018-05-31 Thread Ivan Pozdeev via Python-Dev
https://stackoverflow.com/questions/15102943/how-to-update-python/50616351#50616351 On 01.06.2018 5:22, Jonathan Tsang via Python-Dev wrote: Hi Dev. Support,  Is there a command that can help me to upgrade python 3.6.5 to 3.7.5 without uninstall and reinstall please? Thanks, Jonathan _

Re: [Python-Dev] How to watch buildbots?

2018-05-31 Thread Ivan Pozdeev via Python-Dev
On 30.05.2018 16:36, Nick Coghlan wrote: On 30 May 2018 at 22:30, Ivan Pozdeev via Python-Dev mailto:python-dev@python.org>> wrote: What's the big idea of separate buildbots anyway? I thought the purpose of CI is to test everything _before_ it breaks the main codebase

Re: [Python-Dev] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-04 Thread Ivan Pozdeev via Python-Dev
No, replying only to you wasn't intended. https://docs.travis-ci.com/user/running-build-in-debug-mode/ is the official doc on how to debug a Travis CI build via ssh. On 04.06.2018 22:31, Victor Stinner wrote: FYI you only replied to me in private. Is it on purpose? I'm interested if I can l

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 billion

2018-06-04 Thread Ivan Pozdeev via Python-Dev
On 04.06.2018 21:46, Ethan Furman wrote: On 06/04/2018 10:49 AM, Mariatta Wijaya wrote: I think we shouldn't be speculating or making guesses. We should have contingency plans and be prepared.  More than one bought-out competitor has simply disappeared, or been hamstrung in its effectivene

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Ivan Pozdeev via Python-Dev
On 04.06.2018 20:11, Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:57 AM, Yury Selivanov wrote: On Mon, Jun 4, 2018 at 12:50 PM Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:11 AM, Victor Stinner wrote: [..] For me, it's fine to catch any exception using "except:" if the block contains "

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Ivan Pozdeev via Python-Dev
On 04.06.2018 23:52, Ivan Pozdeev wrote: On 04.06.2018 20:11, Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:57 AM, Yury Selivanov wrote: On Mon, Jun 4, 2018 at 12:50 PM Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:11 AM, Victor Stinner wrote: [..] For me, it's fine to catch any excepti

Re: [Python-Dev] Why not using "except: (...) raise" to cleanup on error?

2018-06-04 Thread Ivan Pozdeev via Python-Dev
On 05.06.2018 0:54, Ivan Pozdeev wrote: On 04.06.2018 23:52, Ivan Pozdeev wrote: On 04.06.2018 20:11, Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:57 AM, Yury Selivanov wrote: On Mon, Jun 4, 2018 at 12:50 PM Chris Angelico wrote: On Tue, Jun 5, 2018 at 2:11 AM, Victor Stinner wrote: [..

Re: [Python-Dev] Docstrings on builtins

2018-06-04 Thread Ivan Pozdeev via Python-Dev
On 05.06.2018 3:09, Matthias Bussonnier wrote: This may even be a bug/feature of IPython, I see that inspect.signature(timedelta) fails, so if timedelta? says Init signature: timedelta(self, /, *args, **kwargs) Then this may be some IPython internal logic. The timedelta class seem to use __new_

Re: [Python-Dev] Docstrings on builtins

2018-06-05 Thread Ivan Pozdeev via Python-Dev
y do the same. -CHB On Mon, Jun 4, 2018 at 6:21 PM, Matthias Bussonnier mailto:bussonniermatth...@gmail.com>> wrote: On Mon, 4 Jun 2018 at 17:29, Ivan Pozdeev via Python-Dev mailto:python-dev@python.org>> wrote: On 05.06.2018 3:09, Matthias Bussonnier

Re: [Python-Dev] Microsoft to acquire GitHub for $7.5 b

2018-06-05 Thread Ivan Pozdeev via Python-Dev
On 05.06.2018 17:28, Martin Gainty wrote: who owns the Data hosted on Github? Github Author? Microsoft? Martin https://help.github.com/articles/github-terms-of-service/#d-user-generated-content : "/You own content you create, but you allow us certain rights to it, so that we can display a

Re: [Python-Dev] Keeping an eye on Travis CI, AppVeyor and buildbots: revert on regression

2018-06-06 Thread Ivan Pozdeev via Python-Dev
On 06.06.2018 18:10, Victor Stinner wrote: 2018-06-04 21:37 GMT+02:00 Ivan Pozdeev : https://docs.travis-ci.com/user/running-build-in-debug-mode/ is the official doc on how to debug a Travis CI build via ssh. Did you already try it? The doc mentions a "[Debug]" button, but I cannot see it where

Re: [Python-Dev] About [].append == [].append

2018-06-21 Thread Ivan Pozdeev via Python-Dev
First, tell us what problem you're solving. Strictly speaking, bound methods don't have an unambiguous notion of equality: are they equal if they do the same thing, or of they do they same thing _on the same object_? The result that you're seeing is a consequence of that same dichotomy in

Re: [Python-Dev] About [].append == [].append

2018-06-21 Thread Ivan Pozdeev via Python-Dev
On 21.06.2018 16:39, Steven D'Aprano wrote: On Thu, Jun 21, 2018 at 02:33:27PM +0300, Ivan Pozdeev via Python-Dev wrote: First, tell us what problem you're solving. You might not be aware of the context of Jereon's question. He is the author of PEP 579 and 580, so I expect he

Re: [Python-Dev] About [].append == [].append

2018-06-21 Thread Ivan Pozdeev via Python-Dev
On 21.06.2018 23:40, Guido van Rossum wrote: I'm with Serhiy here, for mutable values I don't think the methods should compare equal, even when the values do. For immutables I don't care either way, it's an implementation detail. In this light, methods rather shouldn't have a rich comparison l

Re: [Python-Dev] About [].append == [].append

2018-06-22 Thread Ivan Pozdeev via Python-Dev
On 22.06.2018 19:41, Steven D'Aprano wrote: On Fri, Jun 22, 2018 at 08:13:44AM -0700, Guido van Rossum wrote: Honestly it looks to me like the status quo is perfect. Does this example work for you? py> (17.1).hex == (17.1).hex True But: py> a = 17.1 py> b = 17.1 py> a.hex == b.hex False I

Re: [Python-Dev] PySequence_Check but no __len__

2018-06-22 Thread Ivan Pozdeev via Python-Dev
On 22.06.2018 22:07, Terry Reedy wrote: On 6/22/2018 7:17 AM, Christian Tismer wrote: My problem is to find out how to deal with a class which has __getitem__ but no __len__. The documentation suggests that the length of a sequence can always be obtained by len(). https://docs.python.org/3/re

Re: [Python-Dev] PySequence_Check but no __len__

2018-06-22 Thread Ivan Pozdeev via Python-Dev
On 22.06.2018 22:17, Ivan Pozdeev wrote: On 22.06.2018 22:07, Terry Reedy wrote: On 6/22/2018 7:17 AM, Christian Tismer wrote: My problem is to find out how to deal with a class which has __getitem__ but no __len__. The documentation suggests that the length of a sequence can always be obtai

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-23 Thread Ivan Pozdeev via Python-Dev
On 23.06.2018 5:46, Steven D'Aprano wrote: On Fri, Jun 22, 2018 at 10:59:43AM -0700, Michael Selik wrote: I've started testing the proposed syntax when I teach. I don't have a large sample yet, but most students either dislike it or don't appreciate the benefits. They state a clear preference f

Re: [Python-Dev] We now have C code coverage!

2018-06-23 Thread Ivan Pozdeev via Python-Dev
On 23.06.2018 13:52, Paul Moore wrote: On 22 June 2018 at 23:21, Brett Cannon wrote: Thanks to a PR from Ammar Askar we now run Python under lcov as part of the code coverage build. And thanks to codecov.io automatically merging code coverage reports we get a complete report of our coverage (th

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-24 Thread Ivan Pozdeev via Python-Dev
On 24.06.2018 9:53, Chris Angelico wrote: On Sun, Jun 24, 2018 at 4:33 PM, Nick Coghlan wrote: On 24 June 2018 at 15:56, Steven D'Aprano wrote: On Sun, Jun 24, 2018 at 02:33:59PM +1000, Nick Coghlan wrote: Given that PEP 572 *is* proposing implicit comprehension state export, "Implicit" an

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-25 Thread Ivan Pozdeev via Python-Dev
On 25.06.2018 2:30, Greg Ewing wrote: Guido van Rossum wrote: Greg seem to be +0 or better for (a) Actually, I'm closer to -1 on (a) as well. I don't like := as a way of getting assignment in an expression. The only thing I would give a non-negative rating is some form of "where" or "given".

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-25 Thread Ivan Pozdeev via Python-Dev
On 25.06.2018 14:44, Nick Coghlan wrote: On 25 June 2018 at 02:24, Guido van Rossum wrote: A quick follow-up: PEP 572 currently has two ideas: (a) introduce := for inline assignment, (b) when := is used in a comprehension, set the scope for the target as if the assignment occurred outside any c

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-26 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 0:13, Steve Holden wrote: On Mon, Jun 25, 2018 at 8:37 PM, Terry Reedy > wrote: On 6/24/2018 7:25 PM, Guido van Rossum wrote: I'd wager that the people who might be most horrified about it the (b) scoping rule change would be peo

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-26 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 1:58, Greg Ewing wrote: Chris Angelico wrote: The wheel turns round and round, and the same spokes come up. Unless there's a repository of prior discussion no-one can be bothered to gather scraps from around the Net. Wikis solve this by all the discussion being in one place,

Re: [Python-Dev] Policy on refactoring/clean up

2018-06-26 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 12:00, Jeroen Demeyer wrote: Hello, On https://github.com/python/cpython/pull/7909 I encountered friction for a PR which I expected to be uncontroversial: it just moves some code without changing any functionality. So basically my question is: is there some CPython policy *agai

Re: [Python-Dev] Policy on refactoring/clean up

2018-06-26 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 14:43, Jeroen Demeyer wrote: On 2018-06-26 13:11, Ivan Pozdeev via Python-Dev wrote: AFAICS, your PR is not a strict improvement What does "strict improvement" even mean? Many changes are not strict improvements, but still useful to have. Inada pointed me to YAG

Re: [Python-Dev] Policy on refactoring/clean up

2018-06-26 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 14:54, INADA Naoki wrote: On Tue, Jun 26, 2018 at 8:46 PM Jeroen Demeyer <mailto:j.deme...@ugent.be>> wrote: On 2018-06-26 13:11, Ivan Pozdeev via Python-Dev wrote: > AFAICS, your PR is not a strict improvement What does "strict improvement" e

Re: [Python-Dev] Policy on refactoring/clean up

2018-06-26 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 14:54, Ivan Pozdeev via Python-Dev wrote: On 26.06.2018 14:43, Jeroen Demeyer wrote: On 2018-06-26 13:11, Ivan Pozdeev via Python-Dev wrote: AFAICS, your PR is not a strict improvement What does "strict improvement" even mean? Many changes are not strict improve

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 26.06.2018 1:34, Greg Ewing wrote: Ivan Pozdeev via Python-Dev wrote: "as" was suggested even before is became a keyword in `with'. ( if (re.match(regex,line) as m) is not None: ) That's not equivalent where/given, though, since it still has the asymmetry problem.

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 27.06.2018 5:36, Guido van Rossum wrote: [This is my one response today] On Mon, Jun 25, 2018 at 12:40 PM Terry Reedy > wrote: On 6/24/2018 7:25 PM, Guido van Rossum wrote: > I'd wager that the people who might be most horrified about it the (b) scoping

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 27.06.2018 16:25, Greg Ewing wrote: Ivan Pozdeev via Python-Dev wrote: Using this assigned result elsewhere in the same expression (akin to regex backreferences) is not a part of the basic idea actually. If that's true, then the proposal has mutated into something that has *no* ov

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 27.06.2018 16:49, Steven D'Aprano wrote: On Wed, Jun 27, 2018 at 08:00:20AM -0400, Eric V. Smith wrote: On 6/27/2018 7:08 AM, Chris Angelico wrote: It gets funnier with nested loops. Or scarier. I've lost the ability to distinguish those two. def test(): spam = 1 ham = 2 vars

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 28.06.2018 1:42, Steven D'Aprano wrote: On Wed, Jun 27, 2018 at 05:52:16PM +0300, Ivan Pozdeev via Python-Dev wrote: What this means in practice is that assignments will go to different scopes depending on *where* they are in the comprehension: [ expr for x in iter1 for y in

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 28.06.2018 2:31, Ivan Pozdeev via Python-Dev wrote: On 28.06.2018 1:42, Steven D'Aprano wrote: On Wed, Jun 27, 2018 at 05:52:16PM +0300, Ivan Pozdeev via Python-Dev wrote: What this means in practice is that assignments will go to different scopes depending on *where* they are i

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 28.06.2018 2:45, Ivan Pozdeev via Python-Dev wrote: On 28.06.2018 2:31, Ivan Pozdeev via Python-Dev wrote: On 28.06.2018 1:42, Steven D'Aprano wrote: On Wed, Jun 27, 2018 at 05:52:16PM +0300, Ivan Pozdeev via Python-Dev wrote: What this means in practice is that assignments will

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 28.06.2018 2:31, Greg Ewing wrote: Steven D'Aprano wrote: The *very first* motivating example for this proposal came from a comprehension. I think it is both unfortunate and inevitable that the discussion bogged down in comprehension-hell. I think the unfortunateness started when we cross

Re: [Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)

2018-06-27 Thread Ivan Pozdeev via Python-Dev
On 28.06.2018 2:44, Greg Ewing wrote: Ivan Pozdeev via Python-Dev wrote: for me, the primary use case for an assignment expression is to be able to "catch" a value into a variable in places where I can't put an assignment statement in, like the infamous `if re.match() is not

Re: [Python-Dev] PEP 572: Write vs Read, Understand and Control Flow

2018-07-04 Thread Ivan Pozdeev via Python-Dev
On 04.07.2018 15:29, Victor Stinner wrote: The PEP 572 has been approved, it's no longer worth it to discuss it ;-) Victor As of now, https://www.python.org/dev/peps/pep-0572/ is marked as "draft". 2018-07-04 13:21 GMT+02:00 Abdur-Rahmaan Janhangeer : was going to tell instead of := maybe

Re: [Python-Dev] Examples for PEP 572

2018-07-04 Thread Ivan Pozdeev via Python-Dev
On 04.07.2018 11:54, Serhiy Storchaka wrote: 04.07.18 10:06, Tim Peters пише: [Tim]  >> I really don't know what Guido likes best about this, but for me it's  >> the large number of objectively small wins in `if` and `while`  >> contexts.   They add up.  That conclusion surprised me.  That

[Python-Dev] Don't assign to a variable used later in the expression

2018-07-04 Thread Ivan Pozdeev via Python-Dev
On 04.07.2018 10:10, Nathaniel Smith wrote: On Tue, Jul 3, 2018 at 11:07 PM, Serhiy Storchaka wrote: 04.07.18 00:51, Chris Angelico пише: On Wed, Jul 4, 2018 at 7:37 AM, Serhiy Storchaka wrote: I believe most Python users are not professional programmers -- they are sysadmins, scientists, hob

[Python-Dev] "as" postfix notation highlights

2018-07-04 Thread Ivan Pozdeev via Python-Dev
On 04.07.2018 10:10, Nathaniel Smith wrote: I think the most striking evidence for this is that during the discussion of PEP 572 we discovered that literally none of us – including Guido – even *know* what the order-of-evaluation is inside expressions. If has stricken me that this is a highligh

Re: [Python-Dev] Don't assign to a variable used later in the expression

2018-07-04 Thread Ivan Pozdeev via Python-Dev
On 05.07.2018 2:29, Nathaniel Smith wrote: On Wed, Jul 4, 2018 at 4:10 PM, Ivan Pozdeev via Python-Dev wrote: On 04.07.2018 10:10, Nathaniel Smith wrote: Right, Python has a *very strong* convention that each line should have at most one side-effect, and that if it does have a side-effect it

Re: [Python-Dev] Examples for PEP 572

2018-07-04 Thread Ivan Pozdeev via Python-Dev
On 04.07.2018 4:26, Tim Peters wrote: [INADA Naoki] > ... > On the other hand, I understand PEP 572 allows clever code > simplifies tedious code.  It may increase readability of non-dirty code. The latter is the entire intent ,of course.  We can't force people to write readable code, but I do

Re: [Python-Dev] Don't assign to a variable used later in the expression

2018-07-04 Thread Ivan Pozdeev via Python-Dev
On 05.07.2018 3:40, Ivan Pozdeev via Python-Dev wrote: On 05.07.2018 2:29, Nathaniel Smith wrote: On Wed, Jul 4, 2018 at 4:10 PM, Ivan Pozdeev via Python-Dev wrote: On 04.07.2018 10:10, Nathaniel Smith wrote: Right, Python has a *very strong* convention that each line should have at most

Re: [Python-Dev] Assignment expression and coding style: the while True case

2018-07-04 Thread Ivan Pozdeev via Python-Dev
On 05.07.2018 3:36, Chris Angelico wrote: On Thu, Jul 5, 2018 at 10:33 AM, Victor Stinner wrote: 2018-07-05 2:15 GMT+02:00 Chris Angelico : On Thu, Jul 5, 2018 at 10:03 AM, Victor Stinner wrote: On the 3360 for loops of the stdlib (*), I only found 2 loops which would benefit of assignment e

Re: [Python-Dev] Assignment expression and coding style: the while True case

2018-07-04 Thread Ivan Pozdeev via Python-Dev
On 05.07.2018 1:51, Victor Stinner wrote: Hi, Let's say that the PEP 572 (assignment expression) is going to be approved. Let's move on and see how it can be used in the Python stdlib. I propose to start the discussion about "coding style" (where are assignment expressions appropriate or not?)

Re: [Python-Dev] PEP 572, VF/B, and "Shark Jumping"

2018-07-04 Thread Ivan Pozdeev via Python-Dev
On 05.07.2018 2:52, Mike Miller wrote: Recently on Python-Dev: On 2018-07-03 15:24, Chris Barker wrote: > On Tue, Jul 3, 2018 at 2:51 PM, Chris Angelico > On Wed, Jul 4, 2018 at 7:37 AM, Serhiy Storchaka > > > I believe most Python users are not > > professional programmers -- the

[Python-Dev] PEP 572 semantics: all capabilities of the assignment statement

2018-07-04 Thread Ivan Pozdeev via Python-Dev
Victor Stinner in "Assignment expression and coding style: the while True case" and others have brought to attention that the AE as currently written doesn't support all the capabilities of the assignment statement, namely: * tuple unpacking * augmented assignment (I titled the letter "all c

Re: [Python-Dev] Assignment expression and coding style: the while True case

2018-07-05 Thread Ivan Pozdeev via Python-Dev
On 05.07.2018 9:23, Serhiy Storchaka wrote: 05.07.18 01:51, Victor Stinner пише: == Pattern 1, straighforward == while True: line = input.readline() if not line: break ... IMHO here assingment expression is appropriate here. The code remains straighfoward to read. whil

Re: [Python-Dev] Assignment expression and coding style: the while True case

2018-07-05 Thread Ivan Pozdeev via Python-Dev
On 05.07.2018 9:47, Steven D'Aprano wrote: On Thu, Jul 05, 2018 at 12:51:37AM +0200, Victor Stinner wrote: I propose to start the discussion about "coding style" (where are assignment expressions appropriate or not?) with the "while True" case. We don't even have an official implementation yet

Re: [Python-Dev] PEP 572, VF/B, and "Shark Jumping"

2018-07-05 Thread Ivan Pozdeev via Python-Dev
On 05.07.2018 9:20, Steven D'Aprano wrote: On Thu, Jul 05, 2018 at 05:33:50AM +0300, Ivan Pozdeev via Python-Dev wrote: And https://mail.python.org/pipermail/python-dev/2018-June/154160.html disproves the "chosen often these days in new languages". Ivan, I think you may hav

Re: [Python-Dev] PEP 572: intended scope of assignment expression

2018-07-05 Thread Ivan Pozdeev via Python-Dev
On 05.07.2018 15:20, Victor Stinner wrote: Hi, My work (*) in the "Assignment expression and coding style: the while True case" thread helped me to understand something about the *intended* scope. While technically, assignment expressions keep the same scoping rules than assignment statements,

Re: [Python-Dev] PEP 572, VF/B, and "Shark Jumping"

2018-07-05 Thread Ivan Pozdeev via Python-Dev
On 05.07.2018 3:22, Chris Angelico wrote: Python uses "as NAME" for things that are quite different from this, so it's confusing I wrote in https://mail.python.org/pipermail/python-dev/2018-June/154066.html that this is easily refutable. Looks like not for everybody. Okay, here goes: The cons

Re: [Python-Dev] Symmetric vs asymmetric symbols (was PEP 572: Do we really need a ":" in ":="?)

2018-07-06 Thread Ivan Pozdeev via Python-Dev
On 06.07.2018 7:02, Chris Angelico wrote: On Fri, Jul 6, 2018 at 12:48 PM, Alexander Belopolsky wrote: Python really has a strong C legacy and this is the area where I agree that C designers made a mistake by picking a symmetric symbol (=) for an asymmetric operation. On top of that, they picke

[Python-Dev] A "day of silence" on PEP 572?

2018-07-06 Thread Ivan Pozdeev via Python-Dev
On 06.07.2018 1:40, Guido van Rossum wrote: Thanks you for writing up a proposal. There have been many proposals made, including 'EXPR as NAME', similar to yours. It even has a small section in the PEP: https://www.python.org/dev/peps/pep-0572/#alternative-spellings. It's really hard to choos

Re: [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

2018-07-06 Thread Ivan Pozdeev via Python-Dev
On 07.07.2018 2:31, Guido van Rossum wrote: On Fri, Jul 6, 2018 at 4:19 PM Terry Reedy > wrote: Since Guido, the first respondent, did not immediately shoot the idea down, I intend to flesh it out and make it more concrete. Maybe I should have shot it down. The

Re: [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

2018-07-06 Thread Ivan Pozdeev via Python-Dev
On 07.07.2018 2:58, Ivan Pozdeev via Python-Dev wrote: On 07.07.2018 2:31, Guido van Rossum wrote: On Fri, Jul 6, 2018 at 4:19 PM Terry Reedy <mailto:tjre...@udel.edu>> wrote: Since Guido, the first respondent, did not immediately shoot the idea down, I intend to flesh i

Re: [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

2018-07-06 Thread Ivan Pozdeev via Python-Dev
https://github.com/python/cpython/pull/8145 On 07.07.2018 3:33, Ivan Pozdeev via Python-Dev wrote: On 07.07.2018 2:58, Ivan Pozdeev via Python-Dev wrote: On 07.07.2018 2:31, Guido van Rossum wrote: On Fri, Jul 6, 2018 at 4:19 PM Terry Reedy <mailto:tjre...@udel.edu>> wrote: Si

Re: [Python-Dev] Time for 3.4.9 and 3.5.6

2018-07-08 Thread Ivan Pozdeev via Python-Dev
I'll use this opportunity to remind you that 3.4 build is broken -- it can't be built from start to installer with the instructions given because of outside factors (CPython has migrated from Hg to Git). https://bugs.python.org/issue31623 about this was ignored (see https://bugs.python.org/issu

Re: [Python-Dev] Time for 3.4.9 and 3.5.6

2018-07-08 Thread Ivan Pozdeev via Python-Dev
On 09.07.2018 1:32, Larry Hastings wrote: On 07/08/2018 10:05 AM, Ivan Pozdeev via Python-Dev wrote: I'll use this opportunity to remind you that 3.4 build is broken -- it can't be built from start to installer with the instructions given because of outside factors (CPython has mig

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-09 Thread Ivan Pozdeev via Python-Dev
On 09.07.2018 19:01, Steve Dower wrote: On 09Jul2018 0803, Cosimo Lupo wrote: If one goes to httWhps://www.python.org/downloads  from a Windows browser, the default download URL is for the 32-bit installer instead of the 64-bit one. I wonder why is this still

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-10 Thread Ivan Pozdeev via Python-Dev
On 11.07.2018 1:41, Victor Stinner wrote: 2018-07-09 18:01 GMT+02:00 Steve Dower : The difficulty is that they *definitely* can use the 32-bit version, and those few who are on older machines or older installs of Windows may not understand why the link we provide didn't work for them. Let's say

Re: [Python-Dev] Can I make marshal.dumps() slower but stabler?

2018-07-13 Thread Ivan Pozdeev via Python-Dev
If the use case for stability is only .pyc compilation, I doubt it's even relevant 'cuz .pyc's are supposed to be compiled in isolation from other current objects (otherwise, they wouldn't be reusable or would be invalidated when dependent modules change, neither of which is the case), so relev

Re: [Python-Dev] Const access to CPython objects outside of GIL?

2018-07-17 Thread Ivan Pozdeev via Python-Dev
On 17.07.2018 7:18, Radim Řehůřek wrote: Hi all, one of our Python projects calls for pretty heavy, low-level optimizations. We went down the rabbit hole and determined that having access to PyList_GET_ITEM(list), PyInt_AS_LONG(int) and PyDict_GetItem(dict, unicode) on Python objects **outs

Re: [Python-Dev] Fuzzing the Python standard library

2018-07-18 Thread Ivan Pozdeev via Python-Dev
On 17.07.2018 19:44, Jussi Judin wrote: Hi, I have been fuzzing[1] various parts of Python standard library for Python 3.7 with python-afl[2] to find out internal implementation issues that exist in the library. What I have been looking for are mainly following: * Exceptions that are somethin

Re: [Python-Dev] Benchmarks why we need PEP 576/579/580

2018-07-22 Thread Ivan Pozdeev via Python-Dev
I think it'll benefit all to keep the discussion objective, or at least "good subjective" (https://stackoverflow.blog/2010/09/29/good-subjective-bad-subjective/). Laments or mutual accusations are only wasting everyone's time, including the writers. It's strange that even Guido jumped on the ba

Re: [Python-Dev] Finding Guido's replacement

2018-07-22 Thread Ivan Pozdeev via Python-Dev
Whatever you decide, please research existing practices and their results so as not to repeat the same mistakes as others made before you. In particular, http://meatballwiki.org/wiki/BenevolentDictator and https://en.wikipedia.org/wiki/Anti-pattern . It would be a waste if Python falls victim to

[Python-Dev] Tests for internal functionality

2019-03-16 Thread Ivan Pozdeev via Python-Dev
In https://github.com/python/cpython/pull/6541 , I was requested to add tests for an internal C function. As I wrote in https://github.com/python/cpython/pull/6541#issuecomment-445514807 , it's not clear from the codebase 1) where tests for internal (as opposed to public) functionality should

Re: [Python-Dev] Best way to specify docstrings for member objects

2019-03-20 Thread Ivan Pozdeev via Python-Dev
On 19.03.2019 21:55, Raymond Hettinger wrote: I'm working on ways to make improve help() by giving docstrings to member objects. One way to do it is to wait until after the class definition and then make individual, direct assignments to __doc__ attributes.This way widely the separates docstr

Re: [Python-Dev] Remove tempfile.mktemp()

2019-03-20 Thread Ivan Pozdeev via Python-Dev
Before we can say if something is "secure" or not, we need a threat model -- i.e we need to agree which use cases we are protecting and from what threats. So far, I've seen these use cases: 1. File for the current process' private use 2. File/file name generated by the current process; written

Re: [Python-Dev] New Python Initialization API

2019-03-28 Thread Ivan Pozdeev via Python-Dev
On 27.03.2019 20:48, Victor Stinner wrote: Hi, I would like to add a new C API to initialize Python. I would like your opinion on the whole API before making it public. The code is already implemented. Doc of the new API: https://pythondev.readthedocs.io/init_config.html To make the API

Re: [Python-Dev] PEP 578: Python Runtime Audit Hooks

2019-03-29 Thread Ivan Pozdeev via Python-Dev
Like in the mktemp thread earlier, I would request a threat model (what use cases are supposed to be protected (in this case, by reporting rather than preventing) and from what threats) -- in the discussion, and eventually, in the PEP. Without one, any claims and talks about whether something woul

Re: [Python-Dev] Strange umask(?)/st_mode issue

2019-03-30 Thread Ivan Pozdeev via Python-Dev
On 30.03.2019 19:00, Steve Dower wrote: On 29Mar.2019 1944, Steve Dower wrote: On 29Mar.2019 1939, Cameron Simpson wrote: Can you get a branch into your pipeline? Then you could just hack the tarfile test with something quick and dirty like:    pid = os.getpid()    system("strace -p %d 2>/pa

Re: [Python-Dev] Strange umask(?)/st_mode issue

2019-04-01 Thread Ivan Pozdeev via Python-Dev
On 02.04.2019 1:44, Steve Dower wrote: On 01Apr2019 1535, Cameron Simpson wrote: On 01Apr2019 09:12, Steve Dower wrote: On 30Mar2019 1130, Gregory P. Smith wrote: I wouldn't expect it to be the case in a CI environment but I believe a umask can be overridden if the filesystem is mounted and c

Re: [Python-Dev] Need help to fix HTTP Header Injection vulnerability

2019-04-10 Thread Ivan Pozdeev via Python-Dev
On 10.04.2019 7:30, Karthikeyan wrote: Thanks Gregory. I think it's a good tradeoff to ensure this validation only for URLs of http scheme. I also agree handling newline is little problematic over the years and the discussion over the level at which validation should occur also prolongs some

Re: [Python-Dev] Removing PID check from signal handler

2019-04-12 Thread Ivan Pozdeev via Python-Dev
On 12.04.2019 21:05, Steve Dower wrote: On 12Apr.2019 0919, Jeroen Demeyer wrote: The signal handler (that receives signals from the OS) in Python starts with a check     if (getpid() == main_pid) Looking at the comments, the intent was to do a check for the main *thread* but this is checking

Re: [Python-Dev] bpo-36558: Change time.mktime() return type from float to int?

2019-04-16 Thread Ivan Pozdeev via Python-Dev
On 16.04.2019 17:24, Victor Stinner wrote: Hi, time.mktime() looks "inconsistent" to me and I would like to change it, but I'm not sure how it impacts backward compatibility. https://bugs.python.org/issue36558 time.mktime() returns a floating point number: type(time.mktime(time.localtime()))

Re: [Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode

2019-04-23 Thread Ivan Pozdeev via Python-Dev
On 24.04.2019 2:44, Victor Stinner wrote: Hi, Two weeks ago, I started a thread "No longer enable Py_TRACE_REFS by default in debug build", but I lost myself in details, I forgot the main purpose of my proposal... Let me retry from scratch with a more explicit title: I would like to be able to

Re: [Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode

2019-04-24 Thread Ivan Pozdeev via Python-Dev
On 24.04.2019 3:50, Ivan Pozdeev via Python-Dev wrote: On 24.04.2019 2:44, Victor Stinner wrote: Hi, Two weeks ago, I started a thread "No longer enable Py_TRACE_REFS by default in debug build", but I lost myself in details, I forgot the main purpose of my proposal... Let me

Re: [Python-Dev] Use C extensions compiled in release mode on a Python compiled in debug mode

2019-04-24 Thread Ivan Pozdeev via Python-Dev
On 24.04.2019 17:03, Antoine Pitrou wrote: On Wed, 24 Apr 2019 01:44:17 +0200 Victor Stinner wrote: The first requirement for the use case is that a Python debug build supports the ABI of a release build. The current blocker issue is that the Py_DEBUG define imply the Py_TRACE_REFS define: PyOb

Re: [Python-Dev] datetime.fromisocalendar

2019-04-29 Thread Ivan Pozdeev via Python-Dev
On 29.04.2019 16:30, Victor Stinner wrote: I reviewed and merged Paul's PR. I concur with Guido, the new constructor perfectly makes sense and is useful. About the implementation: date and time are crazy beasts. Extract of the code: if not 0 < week < 53: out_of_range = Tru

Re: [Python-Dev] Redoing failed PR checks

2019-05-08 Thread Ivan Pozdeev via Python-Dev
On 08.05.2019 22:47, Terry Reedy wrote: On 5/8/2019 10:23 AM, Eric V. Smith wrote: I think you can close and reopen the PR. That’s what I’m trying on my blocked PR. That works but reruns all the CI checks, including the ones already passed.  Some bots allow individual reruns, but it is not as

Re: [Python-Dev] PEP 581 (Using GitHub issues for CPython) is accepted

2019-05-15 Thread Ivan Pozdeev via Python-Dev
On 15.05.2019 11:48, Antoine Pitrou wrote: On Tue, 14 May 2019 18:11:14 -0700 Barry Warsaw wrote: As the BDFL-Delegate for PEP 581, and with the unanimous backing of the rest of the Steering Council, I hereby Accept this PEP. For future reference, is it possible to post the Steering Council'

Re: [Python-Dev] Python in next Windows 10 update

2019-05-22 Thread Ivan Pozdeev via Python-Dev
On 21.05.2019 23:30, Steve Dower wrote: Hi all Just sharing this here because I think it's important for us to be aware of it - I'm not trying to promote or sell anything here :) (Those who were at the language summit have seen this already.) In the next Windows 10 update that starts rollin

Re: [Python-Dev] Python in next Windows 10 update

2019-05-22 Thread Ivan Pozdeev via Python-Dev
On 22.05.2019 23:52, Steve Dower wrote: On 22May2019 1309, Ivan Pozdeev via Python-Dev wrote: As someone whose job is to diagnose and fix problems with running software: Are there patches in your release? Do you provide corresponding sources and debug symbols for it? You can find the sources

  1   2   3   >