[issue21914] Create unit tests for Turtle guionly

2019-02-11 Thread RAJALAKSHMI V
RAJALAKSHMI V added the comment: I’m no longer working on this. Please feel free to take it up. Rajalakshmi.V > On 12-Feb-2019, at 11:48 AM, Joannah Nanjekye wrote: > > > Joannah Nanjekye added the comment: > > @RAJALAKSHMI V Any status on this? I would love to take this up if you are no

[issue25461] Unclear language (the word ineffective) in the documentation for os.walk

2019-02-11 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: What is the status on this? From this discussion, it looks like @vstinner pushed changes to resolve this. Do we close this? If this still needs a patch, then one of the patches can be reviewed in a PR on GitHub. -- nosy: +nanjekyejoannah

[issue21914] Create unit tests for Turtle guionly

2019-02-11 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: @RAJALAKSHMI V Any status on this? I would love to take this up if you are no longer working on it. -- nosy: +nanjekyejoannah ___ Python tracker

comp.lang.python

2019-02-11 Thread Jaya Priya
The comp.lang.python.announce newsgroup (or c.l.py.a for short) has been created in early 1998 as a companion newsgroup for comp.lang.python focused on Python-related announcements. ... other items of general interest to the Python community.

[issue35973] `growable_int_array type_ignores` in parsetok.c is not always freed.

2019-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for the report! I think I see a path through the code that doesn't free the memory. Does this patch fix it? diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 1fa4a1286b..6a96f6bc5a 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@

[issue35973] `growable_int_array type_ignores` in parsetok.c is not always freed.

2019-02-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35934] Add socket.bind_socket() utility function

2019-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Closing this out as duplicate. Will continue in issue35934. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue17561] Add socket.bind_socket() convenience function

2019-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: After iterating over this over the last few days I realized it makes more sense to implement and discuss the whole thing in here and as a single PR, so sorry about previously splitting this in a separate ticket/PR. Relevant PR is now this one and is

[issue35976] PCBuild file changes for arm32 should be separated from code changes for review

2019-02-11 Thread Paul Monson
Change by Paul Monson : -- keywords: +patch pull_requests: +11855 stage: -> patch review ___ Python tracker ___ ___

[issue35976] PCBuild file changes for arm32 should be separated from code changes for review

2019-02-11 Thread Paul Monson
Change by Paul Monson : -- components: Build, Windows nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: PCBuild file changes for arm32 should be separated from code changes for review type: enhancement versions:

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-11 Thread Davin Potts
Davin Potts added the comment: @giampaolo.rodola: It definitely helps. Conceptually, SyncManager provides "distributed shared memory" where lists, dicts, etc. are held in memory by one process but may be accessed remotely from another via a Proxy Object. Mutating a dict from one process

[issue35971] Documentation should warn about code injection from current working directory

2019-02-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: The change in behavior of Perl was discussed in https://mail.python.org/pipermail/python-ideas/2017-June/045842.html -- nosy: +vstinner, xtreak ___ Python tracker

Re: exit 2 levels of if/else and execute common code

2019-02-11 Thread Cameron Simpson
On 11Feb2019 08:17, Irv Kalb wrote: On Feb 11, 2019, at 7:25 AM, Neal Becker wrote: I have code with structure: ``` if cond1: [some code] if cond2: #where cond2 depends on the above [some code] [ more code] else: [ do xxyy ] else: [ do the same xxyy as above ] ``` So what's the

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I read the draft docs and found them to be at the right level throughout. I definitely wouldn't want anything more terse. -- ___ Python tracker

[issue35972] _xxsubinterpreters: channel_send() may truncate ints on 32-bit platforms

2019-02-11 Thread Eric Snow
Eric Snow added the comment: Is "long long" (AKA int64_t) 32 bits or 64 bits on a 32-bit platform? It it's always 32 bits then there is no problem here. Otherwise I agree we have a problem to fix. My understanding is that it is the former (always 32 bits). --

[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-11 Thread Ethan Smith
Change by Ethan Smith : -- nosy: +Ethan Smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35918] multiprocessing's SyncManager.dict.has_key() method is broken

2019-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 58f05ce059cc5207320fef27a9fbc0ffdc2b1d1a by Giampaolo Rodola (Miss Islington (bot)) in branch '3.7': bpo-35918: Remove broken has_key method and add test (GH-11819) (#11824)

[issue35918] multiprocessing's SyncManager.dict.has_key() method is broken

2019-02-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +11854 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35918] multiprocessing's SyncManager.dict.has_key() method is broken

2019-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset a31f4cc881992e84d351957bd9ac1a92f882fa39 by Giampaolo Rodola (Rémi Lapeyre) in branch 'master': bpo-35918: Remove broken has_key method and add test (#11819) https://github.com/python/cpython/commit/a31f4cc881992e84d351957bd9ac1a92f882fa39

[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-11 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35505] Test test_imaplib fail in test_imap4_host_default_value

2019-02-11 Thread Matej Cepl
Change by Matej Cepl : -- keywords: +patch pull_requests: +11853 stage: -> patch review ___ Python tracker ___ ___

[issue35963] Python/symtable.c: warning: enumeration value ‘FunctionType_kind’ not handled in switch [-Wswitch]"

2019-02-11 Thread Guido van Rossum
Change by Guido van Rossum : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35766] Merge typed_ast back into CPython

2019-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: See https://bugs.python.org/issue35975 -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-11 Thread Guido van Rossum
New submission from Guido van Rossum : Now that the ast module can be used to parse type comments, there’s one more feature I’d like to lobby for – a flag that modifies the grammar slightly so it resembles an older version of Python (going back to 3.4). This is used in mypy to decouple the

[issue35766] Merge typed_ast back into CPython

2019-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: I have some follow-up wishes but I'll create a new issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35963] Python/symtable.c: warning: enumeration value ‘FunctionType_kind’ not handled in switch [-Wswitch]"

2019-02-11 Thread Guido van Rossum
Change by Guido van Rossum : -- stage: resolved -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35974] os.DirEntry.inode() returns invalid value within Docker container

2019-02-11 Thread Marat Sharafutdinov
New submission from Marat Sharafutdinov : I'm trying to build Python 3.7.2 within official CentOS 7.6.1810 image (https://hub.docker.com/_/centos) and getting the following error during testing: == FAIL: test_attributes

[issue35973] `growable_int_array type_ignores` in parsetok.c is not always freed.

2019-02-11 Thread Brennan Vincent
New submission from Brennan Vincent : To reproduce: (1) build python: `../configure --prefix=$HOME/prefix --with-pydebug --without-pymalloc && make install` (2) run with valgrind: `valgrind --leak-check=full ~/prefix/bin/python3` (3) exit immediately from the interpreter by pressing ^D (4)

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I submitted an initial review / comments in the PR. I think this is good for a first iteration in order to understand what APIs to expose publicly (also, keep in mind I may not have a full picture of how this is intended to be used precisely). As for

Re: Replicating YouTube video AI code in python

2019-02-11 Thread jadenfigger
The error I get typing pip install -U tensorflow into the command terminal Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow. Ive been able to install numpy, scipy, and pygame. Tensorflow is the only package

[issue35972] _xxsubinterpreters: channel_send() may truncate ints on 32-bit platforms

2019-02-11 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +11852 stage: -> patch review ___ Python tracker ___ ___

[issue35972] _xxsubinterpreters: channel_send() may truncate ints on 32-bit platforms

2019-02-11 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : Victor Stinner pointed out that on x86 Gentoo Installed with X 3.x buildbot, there is a compiler warning: Python/pystate.c:1483:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

[issue35971] Documentation should warn about code injection from current working directory

2019-02-11 Thread Gabriel Corona
New submission from Gabriel Corona : The CLI tools shipped in Debian python-rdflib-tools package can load modules from the current directory [1]: $ echo 'print("Something")' > cgi.py $ rdf2dot INFO:rdflib:RDFLib Version: 4.2.2 Something Reading from stdin as None... This

[issue2771] Test issue

2019-02-11 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: irc pong -- nosy: +matrixise ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: The slash "/" as used in the documentation

2019-02-11 Thread Chris Angelico
On Tue, Feb 12, 2019 at 8:13 AM Avi Gross wrote: > > > Just Chris, Can we keep things on the list please? > I am thinking I missed the point of this discussion thus what I say makes no > sense. Not sure. You were fairly specific with your statements about how things supposedly were in the

Re: more pythonic way

2019-02-11 Thread Jimmy Girardet
The first one is used very often. Less verbose Le 11 févr. 2019 à 20:41, à 20:41, Felix Lazaro Carbonell a écrit: > > >Hello to everyone: > >Could you please tell me wich way of writing this method is more >pythonic: > > > >.. > >def find_monthly_expenses(month=None, year=None): > >

Re: Can't run setup.py offline due to setup_requires - setup.py calls home

2019-02-11 Thread Chris Narkiewicz via Python-list
On 11/02/2019 19:30, Chris Narkiewicz via Python-list wrote: > Is there any extra step I have to take? Ok, I'll respond to myself, as this was really silly. Debian ships hopelessly obsolete pip 9.PEP 518 is supported in pip 10+. Cheers, Chris signature.asc Description: OpenPGP digital

Re: The slash "/" as used in the documentation

2019-02-11 Thread Ian Kelly
On Mon, Feb 11, 2019 at 1:56 PM boB Stepp wrote: > > On Mon, Feb 11, 2019 at 2:34 PM Chris Angelico wrote: > > > Calling on the D'Aprano Collection of Ancient Pythons for confirmation > > here, but I strongly suspect that positional arguments with defaults > > go back all the way to 1.x. > > Has

Re: more pythonic way

2019-02-11 Thread Peter Otten
Felix Lazaro Carbonell wrote: > Hello to everyone: > Could you please tell me wich way of writing this method is more pythonic: > def find_monthly_expenses(month=None, year=None): > > month = month or datetime.date.today() > Or it should better be: > if not month: >

Re: The slash "/" as used in the documentation

2019-02-11 Thread boB Stepp
On Mon, Feb 11, 2019 at 2:34 PM Chris Angelico wrote: > Calling on the D'Aprano Collection of Ancient Pythons for confirmation > here, but I strongly suspect that positional arguments with defaults > go back all the way to 1.x. Has Steve's banishment ended yet? The only postings I have

Re: The slash "/" as used in the documentation

2019-02-11 Thread Ian Kelly
On Mon, Feb 11, 2019 at 1:35 PM Chris Angelico wrote: > > On Tue, Feb 12, 2019 at 7:26 AM Avi Gross wrote: > > If you want to talk about recent or planned changes, fine. But make that > > clear. I was talking about how in the past positional arguments did not have > > defaults available at the

Re: more pythonic way

2019-02-11 Thread Peter Otten
Grant Edwards wrote: > On 2019-02-11, Felix Lazaro Carbonell wrote: > >> Could you please tell me wich way of writing this method is more >> pythonic: >> >> def find_monthly_expenses(month=None, year=None): >> month = month or datetime.date.today() >> >> Or it should better be: >>

Re: more pythonic way

2019-02-11 Thread Sivan Grünberg
+1 with David Raymond, it's nice to use condensed style when it leaves things readable and logic. But if in doubt: "Explicit is better than implicit. Simple is better than complex." :) -Sivan On Mon, Feb 11, 2019 at 10:19 PM David Raymond wrote: > My non-expert vote is for > > if month is

Re: more pythonic way

2019-02-11 Thread Terry Reedy
On 2/11/2019 2:46 PM, Felix Lazaro Carbonell wrote: def find_monthly_expenses(month=None, year=None): month = month or datetime.date.today().month Or it should better be: if not month: month = datetime.date.today().month As a 20+ year veteran, I would

Re: The slash "/" as used in the documentation

2019-02-11 Thread Chris Angelico
On Tue, Feb 12, 2019 at 7:26 AM Avi Gross wrote: > If you want to talk about recent or planned changes, fine. But make that > clear. I was talking about how in the past positional arguments did not have > defaults available at the def statement level. I was talking about how use > of the symbol

RE: The slash "/" as used in the documentation

2019-02-11 Thread Avi Gross
Ian, Again, not having read whatever documentation we may be discussing, I may be very wrong. The topic is the C API. I started using C at Bell Laboratories in 1982 replacing other languages I had used before. I haven't felt a reason to use it in the last few decades as I moved on to yet other

RE: The slash "/" as used in the documentation

2019-02-11 Thread Avi Gross
Ian, I now assume we are no longer talking about the past or even the present but some planned future. In that future we are talking about how to define a function with added or changed functionality. So nothing I wrote earlier really applies because I was talking of how things did work in the

RE: The slash "/" as used in the documentation

2019-02-11 Thread Avi Gross
Ian, I want to make sure we are talking about the same things in the same ways. I will thus limit my comments in this message. If efficiency is your major consideration, then using only positional arguments of known types you can place on the stack and optimize at compile time may be a great way

RE: more pythonic way

2019-02-11 Thread David Raymond
My non-expert vote is for if month is None: month = datetime.date.today().month Because you're checking for your default value, not whether the boolean version of what they did give you is True or False. It's explicit, it's not reliant on any __bool__() function implementations or

[issue35955] difflib reports incorrect location of mismatch

2019-02-11 Thread Tim Peters
Tim Peters added the comment: It's probably OK, but there's no "pure win" to be had here. There's generally more than one way to convert one string to another, and what "looks right" to humans depends a whole lot on context. For example, consider these strings: "private Thread

[issue35955] difflib reports incorrect location of mismatch

2019-02-11 Thread Jason R. Coombs
Jason R. Coombs added the comment: Nice insight Tim. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

RE: more pythonic way

2019-02-11 Thread Felix Lazaro Carbonell
-Mensaje original- De: Python-list [mailto:python-list-bounces+felix=epepm.cupet...@python.org] En nombre de Grant Edwards Enviado el: lunes, 11 de febrero de 2019 02:46 p.m. Para: python-list@python.org Asunto: Re: more pythonic way On 2019-02-11, Felix Lazaro Carbonell wrote: >

[issue2771] Test issue

2019-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: notifying a lot of people -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue2771] Test issue

2019-02-11 Thread Ernest W. Durbin III
Ernest W. Durbin III added the comment: test -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35963] Python/symtable.c: warning: enumeration value ‘FunctionType_kind’ not handled in switch [-Wswitch]"

2019-02-11 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the fix, Guido ;-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

RE: more pythonic way

2019-02-11 Thread Felix Lazaro Carbonell
Sorry I meant .. def find_monthly_expenses(month=None, year=None): month = month or datetime.date.today().month .. Or it should better be: ... if not month: month = datetime.date.today().month .. Cheers, Felix. --

Re: more pythonic way

2019-02-11 Thread Grant Edwards
On 2019-02-11, Felix Lazaro Carbonell wrote: > Could you please tell me wich way of writing this method is more pythonic: > > def find_monthly_expenses(month=None, year=None): > month = month or datetime.date.today() > > Or it should better be: > > if not month: >

more pythonic way

2019-02-11 Thread Felix Lazaro Carbonell
Hello to everyone: Could you please tell me wich way of writing this method is more pythonic: .. def find_monthly_expenses(month=None, year=None): month = month or datetime.date.today() .. Or it should better be: ... if not month: month =

[issue35963] Python/symtable.c: warning: enumeration value ‘FunctionType_kind’ not handled in switch [-Wswitch]"

2019-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 522346d792d9013140a3f4ad3534ac10f38d9085 by Guido van Rossum in branch 'master': Complete switch cases in symtable.c; fixes bpo-35963 (GH-11821) https://github.com/python/cpython/commit/522346d792d9013140a3f4ad3534ac10f38d9085 --

Re: Can't run setup.py offline due to setup_requires - setup.py calls home

2019-02-11 Thread Chris Narkiewicz via Python-list
On 11/02/2019 15:57, Ben Finney wrote: > All of the build dependencies, *including* the ones specified in > ‘setup_requires’? Yes. easy_install simply doesn't look there. If I provide ~/.pydistutils.cfg with a path to find_links, it works ok. Config file in $HOME however is no-go for a CI or

[issue2771] Test issue

2019-02-11 Thread Ernest W. Durbin III
Ernest W. Durbin III added the comment: should be fast send. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-11 Thread Davin Potts
Davin Potts added the comment: @terry.reedy and @ronaldoussoren: I have asked Van again to provide comments here clarifying the topics of (1) copyright notices and (2) requiring the BSD-licensed-work's author to sign a contributor agreement. Specifically regarding the appearance of

Re: Replicating YouTube video AI code in python

2019-02-11 Thread Abdur-Rahmaan Janhangeer
what python version are you using? what errors are you getting? Abdur-Rahmaan Janhangeer http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius -- https://mail.python.org/mailman/listinfo/python-list

Replicating YouTube video AI code in python

2019-02-11 Thread jadenfigger
I'm trying to replicate the YouTube video, https://m.youtube.com/watch?v=NTlXEJjfsQU. The videos git hub address is, https://github.com/carykh/alignedCelebFaces. The video says I have to download python 3 and using pip download tensorflow, numpy, scipy, and pygame. I've tried downloading this

[issue35969] Interpreter crashes with "can't initialize init_sys_streams" when abc fails to import

2019-02-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sorry by previous reports I was talking about some of the issues where the installers were not correct though I couldn't find the issue at the moment. I just presented it as a data point where some necessary modules that cannot be imported could

Re: Im trying to replicate the youtube video Creating my own customized celebrities with AI.

2019-02-11 Thread Peter J. Holzer
On 2019-02-10 16:28:24 -0500, Avi Gross wrote: > >> tenserflow, pygame, scipy, and numby [...] > please mention that the tenser flow should be tensorflow. Eight, sir; seven, sir; Six, sir; five, sir; Four, sir; three, sir; Two, sir; one! Tenser, said the Tensor. Tenser, said the Tensor. Tension,

[issue2771] Test issue

2019-02-11 Thread Ernest W. Durbin III
Ernest W. Durbin III added the comment: test mail sending -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: where is math_sin defined?

2019-02-11 Thread Barry Scott
> On 10 Feb 2019, at 16:43, Chris Angelico wrote: > > On Mon, Feb 11, 2019 at 3:37 AM Barry Scott wrote: >> >> On Sunday, 10 February 2019 15:15:32 GMT Jon Ribbens wrote: >>> As an aside, how is 'math.sin' actually implemented? mathmodule.c >>> refers to the function 'math_sin' but that

[issue35955] difflib reports incorrect location of mismatch

2019-02-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the explanation. This seems to give the desired diff with charjunk=None passed to multiline string comparison helper. I am not sure how useful it would be to pass it to sequence and dict comparison that also use ndiff. I can open a PR if

[issue35969] Interpreter crashes with "can't initialize init_sys_streams" when abc fails to import

2019-02-11 Thread Paul Ganssle
Paul Ganssle added the comment: @Karthikeyan I would certainly consider this a duplicate of the encodings bug/behavior that you demonstrate. I don't see an existing bug on the tracker for it, though. I think it's pretty clear that the interpreter needs to fail, but it seems to *crash*

[issue35970] no help flag in base64 util

2019-02-11 Thread Robert Kuska
New submission from Robert Kuska : I failed today to print help message for base64 utility without an error: $ python3 -m base64 -help option -h not recognized usage: /usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/base64.py [-d|-e|-u|-t] [file|-]

[issue2771] Test issue

2019-02-11 Thread Ernest W. Durbin III
Ernest W. Durbin III added the comment: test comment -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2771] Test issue

2019-02-11 Thread Ernest W. Durbin III
Ernest W. Durbin III added the comment: comment on test issue to test the request time. -- ___ Python tracker ___ ___

[issue35955] difflib reports incorrect location of mismatch

2019-02-11 Thread Tim Peters
Tim Peters added the comment: difflib generally synchs on the longest contiguous matching subsequence that doesn't contain a "junk" element. By default, `ndiff()`'s optional `charjunk` argument considers blanks and tabs to be junk characters. In the strings: "drwxrwxr-x 2 2000 2000\n"

[issue35967] Better platform.processor support

2019-02-11 Thread Ned Deily
Change by Ned Deily : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23460] Decimals do not obey ':g' exponential notation formatting rules

2019-02-11 Thread Brennan D Baraban
Brennan D Baraban <3...@holbertonschool.com> added the comment: Well, Tuomas, I defer submission of a PR to you, as its your original patch. -- ___ Python tracker ___

[issue35968] lib2to3 cannot parse rf''

2019-02-11 Thread Ned Deily
Ned Deily added the comment: @xtreak, I concur. While it would have better to originally fix this in the release where f strings first appeared, the window to do that has closed. Sorry! -- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed

[issue35969] Interpreter crashes with "can't initialize init_sys_streams" when abc fails to import

2019-02-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I hope there are certain modules that CPython interpreter expects to load properly. There were some cases in the past where encodings module caused the interpreter to crash. A similar scenario. ➜ cpython git:(master) echo "raise Exception('a')" >

[issue35955] difflib reports incorrect location of mismatch

2019-02-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am not sure this is a duplicate since the other issue was about newline at the end of strings. This is about the diff being little irrelevant even with newline in the end for strings. Sample program where change in 5th character gives the

[issue35955] difflib reports incorrect location of mismatch

2019-02-11 Thread Jason R. Coombs
Jason R. Coombs added the comment: I don't think so, because the issue happens on a single line diff... although it's plausible there's a common-mode fix. -- ___ Python tracker

[issue35955] difflib reports incorrect location of mismatch

2019-02-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Is this a duplicate of issue24780? -- nosy: +chris.jerdonek ___ Python tracker ___ ___

Zato blog post: A successful Python 3 migration story

2019-02-11 Thread Terry Reedy
The migration was from 2.7 to 2.7 and 3.x, rather than 3.x only. I think it worth reading for anyone interested in the subject. https://zato.io/blog/posts/python-3-migration-success-story.html 60,000 lines of Python and Cython, 130 external dependencies (but only 10 not already 3.x ready) took

[issue35969] Interpreter crashes with "can't initialize init_sys_streams" when abc fails to import

2019-02-11 Thread Paul Ganssle
Paul Ganssle added the comment: Tested with 3.6 and 2.7 - core dump on 3.6, no core dump on 2.7. The crash on 2.7 goes through a different path, it goes site.py > os.py >= UserDict.py > _abcoll.py > abc.py. That may account for why it's not crashing the interpreter itself. --

[issue35969] Interpreter crashes with "can't initialize init_sys_streams" when abc fails to import

2019-02-11 Thread Paul Ganssle
New submission from Paul Ganssle : Just noticed this (tested on Python 3.7 and 3.8): mkdir /tmp/demo cd /tmp/demo cat << EOF > abc.py raise Exception("Hi") EOF PYTHONPATH=: python -c "" This will crash the interpreter with: Fatal Python error: init_sys_streams:

[issue35965] Behavior for unittest.assertRaisesRegex differs depending on whether it is used as a context manager

2019-02-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: No problem, after some debugging the statement finally executed is 'exec(compile("set.add(0)", "foo.py", "exec"))' . In Python interpreter this will give the expected error. It also gives the same error before coverage.start() [0] and gives a

[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

2019-02-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

2019-02-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 3766f18c524c57784eea7c0001602017d2122156 by Pablo Galindo in branch 'master': bpo-35378: Fix multiprocessing.Pool references (GH-11627) https://github.com/python/cpython/commit/3766f18c524c57784eea7c0001602017d2122156 --

[issue35968] lib2to3 cannot parse rf''

2019-02-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: The reported example works fine on master and 3.7 . The related issue's fix was not backported to 3.6 . 3.6 is in security fixes only mode. So upgrading to 3.7 will help and I propose closing this as a duplicate of issue33266 . ➜ cpython

[issue35968] lib2to3 cannot parse rf''

2019-02-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems related : issue33266 -- nosy: +xtreak ___ Python tracker ___ ___

[issue35965] Behavior for unittest.assertRaisesRegex differs depending on whether it is used as a context manager

2019-02-11 Thread SylvainDe
SylvainDe added the comment: I have no explanation whatsoever but removing the call to coverage seems to remove the issue: https://travis-ci.org/SylvainDe/DidYouMean-Python/builds/491727724 . I guess we can close this issue - sorry for the inconvenience. @nedbat: do you want me to open an

[issue35968] lib2to3 cannot parse rf''

2019-02-11 Thread Dylan Lloyd
New submission from Dylan Lloyd : ``` #!/usr/bin/env python # -*- coding: utf-8 -*- regex_format = rf'' ``` ``` yapf poc.py ``` ``` Traceback (most recent call last): File "lib/python3.6/site-packages/yapf/yapflib/pytree_utils.py", line 115, in ParseCodeToTree tree =

Re: exit 2 levels of if/else and execute common code

2019-02-11 Thread Neal Becker
Chris Angelico wrote: > On Tue, Feb 12, 2019 at 3:21 AM Neal Becker wrote: >> >> Chris Angelico wrote: >> >> > On Tue, Feb 12, 2019 at 2:27 AM Neal Becker >> > wrote: >> >> >> >> I have code with structure: >> >> ``` >> >> if cond1: >> >> [some code] >> >> if cond2: #where cond2 depends on

Re: exit 2 levels of if/else and execute common code

2019-02-11 Thread Irv Kalb
> On Feb 11, 2019, at 7:25 AM, Neal Becker wrote: > > I have code with structure: > ``` > if cond1: > [some code] > if cond2: #where cond2 depends on the above [some code] >[ more code] > > else: >[ do xxyy ] > else: > [ do the same xxyy as above ] > ``` > > So what's the best

Re: exit 2 levels of if/else and execute common code

2019-02-11 Thread Chris Angelico
On Tue, Feb 12, 2019 at 3:21 AM Neal Becker wrote: > > Chris Angelico wrote: > > > On Tue, Feb 12, 2019 at 2:27 AM Neal Becker wrote: > >> > >> I have code with structure: > >> ``` > >> if cond1: > >> [some code] > >> if cond2: #where cond2 depends on the above [some code] > >> [ more

Re: exit 2 levels of if/else and execute common code

2019-02-11 Thread Neal Becker
Chris Angelico wrote: > On Tue, Feb 12, 2019 at 2:27 AM Neal Becker wrote: >> >> I have code with structure: >> ``` >> if cond1: >> [some code] >> if cond2: #where cond2 depends on the above [some code] >> [ more code] >> >> else: >> [ do xxyy ] >> else: >> [ do the same xxyy as

[issue35965] Behavior for unittest.assertRaisesRegex differs depending on whether it is used as a context manager

2019-02-11 Thread SylvainDe
SylvainDe added the comment: This is a brilliant idea! I'll give it a try and keep you posted. -- ___ Python tracker ___ ___

[issue35963] Python/symtable.c: warning: enumeration value ‘FunctionType_kind’ not handled in switch [-Wswitch]"

2019-02-11 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch, patch, patch pull_requests: +11848, 11849, 11850 stage: -> patch review ___ Python tracker ___

[issue35963] Python/symtable.c: warning: enumeration value ‘FunctionType_kind’ not handled in switch [-Wswitch]"

2019-02-11 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch, patch pull_requests: +11848, 11849 stage: -> patch review ___ Python tracker ___

[issue35963] Python/symtable.c: warning: enumeration value ‘FunctionType_kind’ not handled in switch [-Wswitch]"

2019-02-11 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +11848 stage: -> patch review ___ Python tracker ___ ___

[issue35963] Python/symtable.c: warning: enumeration value ‘FunctionType_kind’ not handled in switch [-Wswitch]"

2019-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: Sure, I'll fix it. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

  1   2   >