[issue33394] the build of the shared modules is quiet/non-visible when GNU make gets passed macros

2018-05-01 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6382

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33406] [ctypes] increase refcount of a CFUNCTYPE instance when passing to a CDLL

2018-05-01 Thread Ned Deily

Change by Ned Deily :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33393] update config.guess and config.sub

2018-05-01 Thread Matthias Klose

Matthias Klose  added the comment:


New changeset 9da7ee40037fa30d0d28fd8d7c652cde14e5a834 by Matthias Klose (Miss 
Islington (bot)) in branch '3.7':
bpo-33393: Update config.guess and config.sub files (GH-6658) (#6661)
https://github.com/python/cpython/commit/9da7ee40037fa30d0d28fd8d7c652cde14e5a834


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33406] [ctypes] increase refcount of a CFUNCTYPE instance when passing to a CDLL

2018-05-01 Thread Zuzu_Typ

New submission from Zuzu_Typ :

It should be considered to increase the refcount of functions that are passed 
on to an external library at some point.

If this is not done and e.g. the function was a local variable, when leaving 
the scope it gets garbage-collected. When the library now tries to execute said 
function, an access violation occurs.

So if the refcount were increased either upon creating the CFUNCTYPE instance 
or when it's passed on, this could be avoided.

--
components: ctypes
messages: 316047
nosy: Zuzu_Typ
priority: normal
severity: normal
status: open
title: [ctypes] increase refcount of a CFUNCTYPE instance when passing to a CDLL
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33355] Windows 10 buildbot: 15 min timeout on test_mmap.test_large_filesize()

2018-05-01 Thread Ned Deily

Change by Ned Deily :


--
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
priority: normal -> deferred blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33405] PYTHONCOERCECLOCALE no longer being respected

2018-05-01 Thread Ned Deily

Change by Ned Deily :


--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20104] expose posix_spawn(p)

2018-05-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The current implementation looks half-baked to me. It doesn't implement the 
following features:

1. posix_spawnp(). It is like posix_spawn(), but searches an executable in PATH.

2. Passing various attributes of the created child process. 
POSIX_SPAWN_SETSIGMASK, POSIX_SPAWN_SETSCHEDPARAM, etc.

And I have doubts about introducing constants like POSIX_SPAWN_OPEN:

1. There is no need to make them integers. They could be strings (for 
readability) or opaque values.

2. Their names can conflict with future standard constants related to 
posix_path().

Implementing new features in 3.8 can conflict with the current design. Removing 
posix_spawn() in 3.7 and deferring the work to 3.8 still looks a better 
solution to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33405] PYTHONCOERCECLOCALE no longer being respected

2018-05-01 Thread anthony shaw

New submission from anthony shaw :

observing a behaviour on Python 3.7 b2 that doesn't match what's documented in 
PEP 538

PEP 538 states that the locale coercion behaviour can be disabled through the 
PYTHONCOERCECLOCALE environment variable.
I would then expect the stdin encoding to be the same as Python 3.6 when the C 
locale is specified with no encoding value. 

bash-3.2$ LANG=C python3.6 -c "import sys; print(sys.stdin.encoding)"
US-ASCII
bash-3.2$ LANG=C python3.7 -c "import sys; print(sys.stdin.encoding)"
utf-8
bash-3.2$ PYTHONCOERCECLOCALE=0 LANG=C python3.7 -c "import sys; 
print(sys.stdin.encoding)"
utf-8

LC_ALL is not set

bash-3.2$ locale
LANG="C"
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

Trying to dig into the reason why the env flag isn't disabling the behaviour I 
found some subsequent changes after the PEP which look to have broken the 
original implementation behaviour.

https://github.com/python/cpython/commit/9454060e84a669dde63824d9e2fcaf295e34f687

--
messages: 316045
nosy: anthony shaw
priority: normal
severity: normal
status: open
title: PYTHONCOERCECLOCALE no longer being respected
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33404] Phone Number Generator

2018-05-01 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

Hi Braiden, and welcome!

I see that the ticket has already been closed, but another note for the future: 
please don't paste screenshots of your code, copy and paste the relevant source 
code. We don't edit code with Photoshop, and posting images makes it hard to 
copy the source for additional testing, and prevents those who are blind or 
visually impaired from getting involved.

--
nosy: +steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33290] Python.org macOS pkg installs pip3 as pip

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:


New changeset 8ac441876418a217c31fe429733d7fa4704f0e3c by Ned Deily (Miss 
Islington (bot)) in branch '3.6':
bpo-33290: Have macOS installer remove "pip" alias (GH-6683) (GH-6685)
https://github.com/python/cpython/commit/8ac441876418a217c31fe429733d7fa4704f0e3c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33290] Python.org macOS pkg installs pip3 as pip

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:


New changeset 1470e43076559d22518f2e8d704fa9426d2659dd by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-33290: Have macOS installer remove "pip" alias (GH-6683) (GH-6684)
https://github.com/python/cpython/commit/1470e43076559d22518f2e8d704fa9426d2659dd


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33290] Python.org macOS pkg installs pip3 as pip

2018-05-01 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6381

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33290] Python.org macOS pkg installs pip3 as pip

2018-05-01 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6380

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33290] Python.org macOS pkg installs pip3 as pip

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:


New changeset 0dd80709b5dc03756e7f4510761ae60236bb9f6d by Ned Deily in branch 
'master':
bpo-33290: Have macOS installer remove "pip" alias (GH-6683)
https://github.com/python/cpython/commit/0dd80709b5dc03756e7f4510761ae60236bb9f6d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33290] Python.org macOS pkg installs pip3 as pip

2018-05-01 Thread Ned Deily

Change by Ned Deily :


--
pull_requests: +6379

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33281] ctypes.util.find_library not working on macOS

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the PR, Ray.  Merged for 3.7.0b4 (and 3.8.0).

--
nosy: +Ray.Donnelly
priority: release blocker -> 
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33281] ctypes.util.find_library not working on macOS

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:


New changeset d74f35331f176e0679f0614b6cccf0dc0422e31a by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-33281: NEWS and ACK (GH-6681) (GH-6682)
https://github.com/python/cpython/commit/d74f35331f176e0679f0614b6cccf0dc0422e31a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33281] ctypes.util.find_library not working on macOS

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:


New changeset c74ca5396aa7740d4fc90617e6b2315e849fa71f by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-33281:  Fix ctypes.util.find_library regression on macOS (GH-6625) (GH-6680)
https://github.com/python/cpython/commit/c74ca5396aa7740d4fc90617e6b2315e849fa71f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33281] ctypes.util.find_library not working on macOS

2018-05-01 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6378

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33404] Phone Number Generator

2018-05-01 Thread Braiden Gole

Braiden Gole  added the comment:

Thanks for the detailed explenation and my apologies. I will contact
Stack Overflow in the future when I have an issue. This is my first report
in the bug section of Python and I now understand the content that needs to
be put under a category like this one.

Thanks: Braiden Gole

On Tue, May 1, 2018, 9:40 PM Josh Rosenberg,  wrote:

>
> Josh Rosenberg  added the comment:
>
> You named your loop variable i, overlapping the name of your second to
> last digit, so you end up replacing the original value of i in each (given
> the break, the only) loop.
>
> So before the loop begins, i has the expected value of '6', but on the
> first iteration, i is rebound to the value of a (the first element in the
> tuple), '5', and your format string uses that value instead. If you removed
> the break, you'd see the second to last digit cycle through all the other
> values as it goes, because i would be repeatedly rebound to each digit as
> it goes.
>
> This is a bug in your code, not a problem with Python; in the future,
> direct questions of this sort to other online resources (e.g. Stack
> Overflow); unless you have a provable bug in Python itself, odds are it's a
> bug in your code's logic.
>
> --
> nosy: +josh.r
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33281] ctypes.util.find_library not working on macOS

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:


New changeset 69a013ec189f93a0dea97cfdbb3adc348648a666 by Ned Deily in branch 
'master':
bpo-33281: NEWS and ACK (GH-6681)
https://github.com/python/cpython/commit/69a013ec189f93a0dea97cfdbb3adc348648a666


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33281] ctypes.util.find_library not working on macOS

2018-05-01 Thread Ned Deily

Change by Ned Deily :


--
pull_requests: +6377

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33281] ctypes.util.find_library not working on macOS

2018-05-01 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6376

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33281] ctypes.util.find_library not working on macOS

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:


New changeset d06d345f04b3f7e5b318df69b1d179328a64ca9c by Ned Deily (Ray 
Donnelly) in branch 'master':
bpo-33281:  Fix ctypes.util.find_library regression on macOS (GH-6625)
https://github.com/python/cpython/commit/d06d345f04b3f7e5b318df69b1d179328a64ca9c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33404] Phone Number Generator

2018-05-01 Thread Zachary Ware

Change by Zachary Ware :


--
components:  -IDLE

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33404] Phone Number Generator

2018-05-01 Thread Zachary Ware

Change by Zachary Ware :


--
assignee: terry.reedy -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33404] Phone Number Generator

2018-05-01 Thread Zachary Ware

Change by Zachary Ware :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

Strings in Python 3 are already unicode.

Looking at the patch, I see a lot of fractions which display as the missing 
glyph white square. For example, instead of seeing 1/9, which displays 
perfectly everywhere, I see a mysterious box similar to □.

Even when I see one, there's the visual inconsistency between fractions which 
display like ½ and those that display like ¹²/₄₅ which frankly just looks ugly 
to me. One problem is that in many fonts, the glyphs for superscript and 
subscript digits are a hodge-podge of sizes and styles with no consistent 
design.

If you're going to do this, you ought to use U+2044 FRACTION SLASH rather than 
U+002F SOLIDUS: compare ¹²⁄₄₅ with the above. If your font is decent, and many 
are not, the fraction slash is tighter and allows the numerator and denominator 
to overlap the slash, closer to the visual look of ½.

I would strongly oppose this becoming the default __str__ of fractions.

--
nosy: +steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33380] Update module attribute on namedtuple methods for introspection.

2018-05-01 Thread pmpp

pmpp  added the comment:

Indeed thanks for the deep explanation. It seems that not finding im_self 
anymore (not even in the dunder clutter), i've mistaken '.__self__.__module__' 
with '.__module__'. How joyfull to learn anew to trace a caller id, and sorry 
for the noise (again).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33404] Phone Number Generator

2018-05-01 Thread Josh Rosenberg

Change by Josh Rosenberg :


--
versions:  -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33404] Phone Number Generator

2018-05-01 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

You named your loop variable i, overlapping the name of your second to last 
digit, so you end up replacing the original value of i in each (given the 
break, the only) loop.

So before the loop begins, i has the expected value of '6', but on the first 
iteration, i is rebound to the value of a (the first element in the tuple), 
'5', and your format string uses that value instead. If you removed the break, 
you'd see the second to last digit cycle through all the other values as it 
goes, because i would be repeatedly rebound to each digit as it goes.

This is a bug in your code, not a problem with Python; in the future, direct 
questions of this sort to other online resources (e.g. Stack Overflow); unless 
you have a provable bug in Python itself, odds are it's a bug in your code's 
logic.

--
nosy: +josh.r

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33404] Phone Number Generator

2018-05-01 Thread Braiden Gole

New submission from Braiden Gole :

I was creating a small program to generate numbers for fun and I realized that 
my output is different from my input. The random phone number that I used is: 
(519-662-6963) and what I get is: (519-662-6953), where the second last digit 
changes, thought it would be worth looking at. Everything looks to be inline 
and in order of precedence but not sure what is going on.

--
assignee: terry.reedy
components: IDLE
files: Phone_numbers.PNG
messages: 316031
nosy: Braiden Gole, terry.reedy
priority: normal
severity: normal
status: open
title: Phone Number Generator
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47559/Phone_numbers.PNG

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION

2018-05-01 Thread pyneda

Change by pyneda :


--
keywords: +patch
pull_requests: +6374
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION

2018-05-01 Thread pyneda

Change by pyneda :


--
components: asyncio
nosy: asvetlov, giampaolo.rodola, pyneda, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.tasks.wait does not allow to set custom exception when 
return_when=FIRST_EXCEPTION
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread R. David Murray

R. David Murray  added the comment:

I vote -1.  It's cute, but I'd much rather have a consistently ascii 
representation of something that is easily represented in ascii.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Eric V. Smith

Eric V. Smith  added the comment:

I'd bring it up on python-ideas, and point the discussion to this issue. I 
think the primary complain will be using non-ASCII characters in a function 
that normally doesn't return non-ASCII. But maybe people will be willing to 
accept it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Gabe Appleton

Gabe Appleton  added the comment:

Would it be workable if I instead just changed the __str__() method? I'm 
willing to go either way, but I feel like it's a bit nicer to have it output a 
nice fraction that way.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Eric V. Smith

Eric V. Smith  added the comment:

Your patch would break the usual and useful behavior of x == eval(repr(x))

>>> f = Fraction(1,2)
>>> repr(f)
'Fraction(1, 2)'
>>> eval(repr(f))
Fraction(1, 2)
>>> f == eval(repr(f))
True

Plus, I'm sure there's working code that would break as a result of this.

I'd suggest having a utility function that provides the functionality that 
you're after.

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Gabe Appleton

Change by Gabe Appleton :


--
keywords: +patch
pull_requests: +6372
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Gabe Appleton

New submission from Gabe Appleton :

Currently it has a __repr__() which returns `Fraction(x, y)`, and a __str__() 
which returns `x/y`. I have a ready pull request to change this to a scheme 
where both return unicode fractions.

--
components: Library (Lib)
messages: 316026
nosy: gappleto97
priority: normal
severity: normal
status: open
title: Change the fractions.Fraction class to convert to a unicode fraction 
string
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2018-05-01 Thread Paul Goins

Paul Goins  added the comment:

Good point, I forgot about WaitForMultipleObjectsEx; something like that seems 
like it would be much simpler for the first 2 cases.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2018-05-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

multiprocessing semaphores support Ctrl-C under Windows, so it should be doable 
for regular locks as well (notice the `sigint_event`):
https://github.com/python/cpython/blob/master/Modules/_multiprocessing/semaphore.c#L109-L146

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2018-05-01 Thread Paul Goins

Paul Goins  added the comment:

Okay, I think I need to abandon my research into this.  This does seem to have 
quite an amount of complexity to it and is probably more than I should be 
taking on at this point in time.

Anyone else who wants to look at this, consider it fair game.

Parting thoughts based on my limited expertise in the area, take them or ignore 
them:

* Semaphore-based AllocNonRecursiveMutex (!_PY_USE_CV_LOCKS): Using 
WaitForSingleObjectEx with alertable set to TRUE may be one path forward, 
however it seems like that would involve tracking all threads performing a 
ctrl-c-interruptible wait and calling QueueUserAPC with a no-op callback for 
each such thread to cause the wait to terminate early.  I don't particularly 
like the need to roll-our-own tracking, but at least off-hand and based on my 
somewhat limited experience in this area, I don't know of a better way.  
Hopefully someone else does.

* CriticalSection/Semaphore-based AllocNonRecursiveMutex (_PY_USE_CV_LOCKS with 
_PY_EMULATED_WIN_CV): I don't know of a way of interrupting the CriticalSection 
lock, but the WaitForSingleObjectEx strategy may be usable on the 
semaphore-based condition variable.

* SRWLock/ConditionVariable-based AllocNonRecursiveMutex (_PY_USE_CV_LOCKS with 
!_PY_EMULATED_WIN_CV): Similarly, I don't know of a way to interrupt the 
SRWLock.  However, similar to WaitForSingleObjectEx, it may be possible to wake 
the condition variables via a Ctrl-C if we add our own tracking for such.  I'm 
not sure if this gets us quite to where we need to be or not.

Hopefully the above notes are of some value.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Stephan Hohe

Stephan Hohe  added the comment:

> Do you mean the "python" command-line program?

Yes, that's what I used.

>  That uses a different algorithm:

I see, it only works for top-level modules. You're right, that's not a real 
solution.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32608] Incompatibilities with the socketserver and multiprocessing packages

2018-05-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Posted a review now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33401] `exec` attribute can't be set to objects in Python2 (SyntaxError)

2018-05-01 Thread Emanuel Barry

Emanuel Barry  added the comment:

Any valid variable name can be used as a an attribute; for example, "spam" is 
valid while "spam-eggs" is not. This isn't unique to classes, but to all 
assignments everywhere. If we allowed `o.exec = blah` then we should also allow 
`exec = blah` at the global scope and that's a whole load of not happening, 
much less in Python 2 (which isn't getting any significant updates anymore).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33401] `exec` attribute can't be set to objects in Python2 (SyntaxError)

2018-05-01 Thread luav

luav  added the comment:

I'm sorry for the previous question, now it's clear (the space is allowed after 
the '.' which complicates the parsing):
```
>>> o.e = 1
>>> o. e
1
>>> o.e
1

```

Anyway, it would be nice to outline the eligible values for attributes in the 
documentation (https://docs.python.org/2/tutorial/classes.html).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33401] `exec` attribute can't be set to objects in Python2 (SyntaxError)

2018-05-01 Thread luav

luav  added the comment:

Why Python 2 documentation does not outline that keywords / statements can't be 
used as the object attributes?
https://docs.python.org/2/reference/simple_stmts.html#exec

And why does this restriction exist at all? The keywords always stand-alone and 
newer follow '.', i.e. always distinguishable from the object attributes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:

Christian, ping.  Can we close this?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33311] cgitb: remove parentheses when the error is in module

2018-05-01 Thread Stéphane Blondon

Change by Stéphane Blondon :


--
pull_requests: +6371

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33401] `exec` attribute can't be set to objects in Python2 (SyntaxError)

2018-05-01 Thread Emanuel Barry

Emanuel Barry  added the comment:

This is because `exec` is a keyword in Python 2, whereas in Python 3 it's a 
function.

--
nosy: +ebarry
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33401] `exec` attribute can't be set to objects in Python2 (SyntaxError)

2018-05-01 Thread luav

New submission from luav :

The following code works fine on Python 3.5.2 but `exec` attribute fails to be 
set to the object on Python 2.7.12:
```python
>>> o = type('O', (object,), {})
>>> o.e = 1
>>> o.eval = 1
>>> o.exec = 1
  File "", line 1
o.exec = 1
 ^
SyntaxError: invalid syntax
```

OS Environments:  Ubuntu 16.04.4 LTS x64

--
components: Interpreter Core
messages: 316015
nosy: luav
priority: normal
severity: normal
status: open
title: `exec` attribute can't be set to objects in Python2 (SyntaxError)
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20104] expose posix_spawn(p)

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the latest fixes, Serhiy.

Now is there anything more that needs to be done for this issue?

--
priority: release blocker -> deferred blocker
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33191] Refleak in posix_spawn

2018-05-01 Thread Ned Deily

Change by Ned Deily :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> expose posix_spawn(p)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-01 Thread Paul Ganssle

Paul Ganssle  added the comment:

ISO 8601 does not require an offset (in fact, most portions of the ISO 8601 
date and time are optional - ISO 8601 is more complicated than most people 
think). Without an offset a datetime is assumed to be local time.

The T delimiter is required, but can be omitted by mutual consent, see 
https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations

--
nosy: +p-ganssle

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-01 Thread Ned Deily

Change by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-01 Thread Paul Cyr

New submission from Paul Cyr :

>From the docs:

https://docs.python.org/3.6/library/logging.html#logging.Formatter

"class logging.Formatter(fmt=None, datefmt=None, style='%') ...
If no datefmt is specified, the ISO8601 date format is used."

However, the output from the formatter when no datefmt is specified is not an 
ISO8601 date. It is also a datetime format, not a date format.

Example output: 2018-05-01 19:04:31,505

Not being an ISO member, I don't have access to the official source for the 
specification but, trusting other sources, it appears that the output is 
missing the required 'T' delimiter between the date and time, and it is also 
missing the timezone. A compliant output would be:

2018-05-01T19:04:31,505Z

The current output appears to actually be closer to RFC 3339, as that standards 
allows for a space instead of the 'T' delimiter, but RFC 3339 still requires a 
timezone.

Either the documentation should be updated to state that the format used is an 
RFC 3339 datetime but without a timezone, or the format should comply with the 
standard specified in the documentation.

--
components: Library (Lib)
messages: 316012
nosy: paulc
priority: normal
severity: normal
status: open
title: logging.Formatter does not default to ISO8601 date format
type: behavior
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33038] GzipFile doesn't always ignore None as filename

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:

It looks like PR 6095 for this issue has not been reviewed or merged yet.

The commits for v2.7.15 are here:
https://github.com/python/cpython/commits/v2.7.15

--
nosy: +benjamin.peterson, ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33038] GzipFile doesn't always ignore None as filename

2018-05-01 Thread Diego Argueta

Diego Argueta  added the comment:

Did this make it into 2.7.15? There aren't any release notes for it on the 
download page like usual.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33392] pathlib .glob('*/') returns files as well as directories

2018-05-01 Thread robbuckley

robbuckley  added the comment:

I checked this on Mac and Windows, pathlib and the old glob std lib behave
the same on both in this respect

On Tue, 1 May 2018, 18:35 Emily Morehouse,  wrote:

>
> Emily Morehouse  added the comment:
>
> Good find -- I agree that when using Path.cwd().glob('*/'), it should only
> return directories. This follows the original glob library's functionality
> as well as the Unix expectation (I believe Windows as well, but I'll double
> check).
>
> I'll work on a fix!
>
> --
> assignee:  -> emilyemorehouse
> nosy: +emilyemorehouse
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33399] site.abs_paths should handle None __cached__ type

2018-05-01 Thread Demian Brecht

Change by Demian Brecht :


--
keywords: +patch
pull_requests: +6369
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33399] site.abs_paths should handle None __cached__ type

2018-05-01 Thread Demian Brecht

New submission from Demian Brecht :

Echoing an email sent to python-list:

I recently ran into an issue using the site package and I wanted to confirm 
that I'm not doing something wrong here before creating an issue:

I have a need to `git subtree` modules into a Django project and then add the 
dependencies such that they're discoverable in code. I also need to have 
consistent behavior between `python setup.py (develop|install)` and `pip 
install -r requirements.txt` (the latter is used by Heroku for project 
installation). An example project that demonstrates the issue is here: 
https://github.com/demianbrecht/python-sitehooks-example.

In the example, I've subtree'd requests into _vendor and forced site hooks to 
fire using `site.main()` in testme/settings.py: 
https://github.com/demianbrecht/python-sitehooks-example/commit/1b81e15c6f28bc80a4f984cffa78eb2ced80a320.
 Forcing the execution is not needed when the package is actually installed 
using setup.py, but is needed when using `pip install -r requirements.txt`. 
This works great when running within a virtualenv, but I get the following on 
system python:

$ python3.6 ./manage.py test
Traceback (most recent call last):
 File "./manage.py", line 22, in 
   execute_from_command_line(sys.argv)
 File 
"/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", 
line 364, in execute_from_command_line
   utility.execute()
 File 
"/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", 
line 308, in execute
   settings.INSTALLED_APPS
 File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 
56, in __getattr__
   self._setup(name)
 File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 
41, in _setup
   self._wrapped = Settings(settings_module)
 File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 
110, in __init__
   mod = importlib.import_module(self.SETTINGS_MODULE)
 File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in 
import_module
   return _bootstrap._gcd_import(name[level:], package, level)
 File "", line 978, in _gcd_import
 File "", line 961, in _find_and_load
 File "", line 950, in _find_and_load_unlocked
 File "", line 655, in _load_unlocked
 File "", line 678, in exec_module
 File "", line 205, in _call_with_frames_removed
 File "///testme/testme/settings.py", line 13, in 
   site.main()
 File "/usr/local/lib/python3.6/site.py", line 525, in main
   abs_paths()
 File "/usr/local/lib/python3.6/site.py", line 110, in abs_paths
   m.__cached__ = os.path.abspath(m.__cached__)
 File "/usr/local/lib/python3.6/posixpath.py", line 369, in abspath
   path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Using venv and system comparisons for debugging doesn't help much as site.py is 
different in the two environments. Any insight into what may be going on here 
or what I'm doing wrong would be much appreciated. I realize that I could just 
muck with PYTHONPATH, but I thought this approach would be a little nicer as 
it's transparent to the user.

Digging a little deeper, it seems that site.abs_paths fails when a module's 
__cached__ value is None. I haven't spent enough time digging into it to 
understand why this is valid behavior, hoping to get some insight from folks 
who have spent more time on it.

--
components: Library (Lib)
messages: 316008
nosy: demian.brecht
priority: normal
severity: normal
status: open
title: site.abs_paths should handle None __cached__ type
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33392] pathlib .glob('*/') returns files as well as directories

2018-05-01 Thread Emily Morehouse

Emily Morehouse  added the comment:

Good find -- I agree that when using Path.cwd().glob('*/'), it should only 
return directories. This follows the original glob library's functionality as 
well as the Unix expectation (I believe Windows as well, but I'll double check).

I'll work on a fix!

--
assignee:  -> emilyemorehouse
nosy: +emilyemorehouse

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Jeroen Demeyer

Jeroen Demeyer  added the comment:

> How does CPython display the source for tracebacks in Cython modules?

Do you mean the "python" command-line program? That uses a different algorithm: 
to find a file FOO, it searches

[os.path.join(p, os.path.basename(FOO)) for p in sys.path]

This is completely broken because it ignores all leading path components of 
FOO. So it will only work if your file is in the root of your package, not in a 
subdirectory.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Paul Moore

Paul Moore  added the comment:

That's interesting. It sounds like linecache might be working differently then.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33395] TypeError: unhashable type: 'instancemethod'

2018-05-01 Thread R. David Murray

R. David Murray  added the comment:

Functions/methods should be immutable, so yes, I think it is a safe assumption 
that they should be hashable, and a bug if they are not.  I seem to vaguely 
recall that there is some other part of the cpython machinery that depend on 
being able to test function/method equality and assumes that they are 
immutable, which implies they should be hashable.

I'll close this; Christian can reopen it if he thinks there is an actual bug 
lurking here.

--
resolution:  -> third party
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33395] TypeError: unhashable type: 'instancemethod'

2018-05-01 Thread Siming Yuan

Siming Yuan  added the comment:

i just discovered cython v0.28 no longer creates instancemethod, so this bug 
should technically no longer show up after upgrading cython.
(related cython bug https://github.com/cython/cython/pull/2105)

so the question remains - is it a good idea to assume all type(obj).__repr__ is 
hashable?

if so, we can close this bug.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Stephan Hohe

Stephan Hohe  added the comment:

Yes, I tried the Python 3.5 that comes with my system as well as the latest 
checkout from github. Both show source code lines in tracebacks for me.

I used a rather simple test setup, just two directories with .so and .pyx which 
I added to sys.path (any order seems to work). I haven't checked a proper 
install of an extension module via pip/...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Paul Moore

Paul Moore  added the comment:

> How does CPython display the source for tracebacks in Cython modules? It 
> seems to work there as long as the Cython .pyx files are somewhere in the 
> import path.

Is that in Python 3.x? The issue we're discussing is only in Python 3.3+

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Stephan Hohe

Stephan Hohe  added the comment:

How does CPython display the source for tracebacks in Cython modules? It seems 
to work there as long as the Cython .pyx files are somewhere in the import path.

--
nosy: +sth

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33377] add new triplets for mips r6 and riscv variants

2018-05-01 Thread Ned Deily

Change by Ned Deily :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33377] add new triplets for mips r6 and riscv variants

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:


New changeset 0596f319020ad34010cbf98608021080ba2a1d4b by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-33377: add triplets for mips-r6 and riscv (GH-6655) (GH-6660)
https://github.com/python/cpython/commit/0596f319020ad34010cbf98608021080ba2a1d4b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2018-05-01 Thread Ned Deily

Ned Deily  added the comment:

What's the status of this?  It looks like Serhiy has reviewed and approved 
Dakon's PR 6123.  Is everyone OK with merging it?  Anything more needed?

--
versions: +Python 3.8 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20104] expose posix_spawn(p)

2018-05-01 Thread miss-islington

miss-islington  added the comment:


New changeset 77fa7835da0cb49d30ac5d4c32bf6eb71eae0742 by Miss Islington (bot) 
in branch '3.7':
bpo-20104: Improve error handling and fix a reference leak in os.posix_spawn(). 
(GH-6332)
https://github.com/python/cpython/commit/77fa7835da0cb49d30ac5d4c32bf6eb71eae0742


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33395] TypeError: unhashable type: 'instancemethod'

2018-05-01 Thread R. David Murray

R. David Murray  added the comment:

Ah, in the absence of a traceback I think I misunderstood the problem (I failed 
to actually look at the code :)

Given what you say about the slotwrapper, I'm not sure, but I'm guessing that 
that means cython isn't using the PyInstanceMethod_Type as intended.  That 
doesn't mean it can't be fixed (though if true it makes it less likely that 
we'll fix it, unfortunately), but you'll have to figure out what the difference 
is between how it is used by cython and cpython.  I've nosied Christian, maybe 
he'll remember why the hash is commented out.

--
nosy: +christian.heimes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20104] expose posix_spawn(p)

2018-05-01 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6368

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20104] expose posix_spawn(p)

2018-05-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset ef347535f289baad22c0601e12a36b2dcd155c3a by Serhiy Storchaka in 
branch 'master':
bpo-20104: Improve error handling and fix a reference leak in os.posix_spawn(). 
(#6332)
https://github.com/python/cpython/commit/ef347535f289baad22c0601e12a36b2dcd155c3a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33398] From, To, Cc lines break when calling send_message()

2018-05-01 Thread Jens Troeger

New submission from Jens Troeger :

It looks like non-ascii characters in an Address()’s display_name parameter 
cause their lines in the header to get mangled when the message is being sent.  
For example, a case to reproduce:

>>> msg = EmailMessage()
>>> msg["To"] = Address(display_name="Jens Tröger", 
addr_spec="jens.troe...@gmail.com")
>>> msg["From"] = Address(display_name="Jens Troeger", 
addr_spec="jens.troe...@gmail.com")
>>> msg.set_content("Some content.")
>>> msg.as_string()
'To: Jens =?utf-8?q?Tr=C3=B6ger?= \nContent-Type: 
text/plain; charset="utf-8"\nContent-Transfer-Encoding: 7bit\nMIME-Version: 
1.0\nFrom: Jens Troeger \n\nSome content.\n'

Sending this email creates the following SMTP debug output:

>>> smtpsrv = smtplib.SMTP("smtp.gmail.com:587")
>>> …
>>> smtpsrv.send_message(msg)
send: 'mail FROM: size=220\r\n'
reply: b'250 2.1.0 OK z23sm16924622pfe.110 - gsmtp\r\n'
reply: retcode (250); Msg: b'2.1.0 OK z23sm16924622pfe.110 - gsmtp'
send: 'rcpt TO:\r\n'
reply: b'250 2.1.5 OK z23sm16924622pfe.110 - gsmtp\r\n'
reply: retcode (250); Msg: b'2.1.5 OK z23sm16924622pfe.110 - gsmtp'
send: 'data\r\n'
reply: b'354  Go ahead z23sm16924622pfe.110 - gsmtp\r\n'
reply: retcode (354); Msg: b'Go ahead z23sm16924622pfe.110 - gsmtp'
data: (354, b'Go ahead z23sm16924622pfe.110 - gsmtp')
send: b'To: Jens =?utf-8?q?Tr=C3=B6ger?= 
\r\r\r\r\r\nContent-Type: text/plain; 
charset="utf-8"\r\nContent-Transfer- 
Encoding: 7bit\r\nMIME-Version: 1.0\r\nFrom: Jens Troeger 
\r\n\r\nSome content.\r\n.\r\n'
reply: b'250 2.0.0 OK 1525174591 z23sm16924622pfe.110 - gsmtp\r\n'
reply: retcode (250); Msg: b'2.0.0 OK 1525174591 z23sm16924622pfe.110 - 
gsmtp'
data: (250, b'2.0.0 OK 1525174591 z23sm16924622pfe.110 - gsmtp')
{}

Notice the string of "\r\r\…" for the "To" field which consequently breaks off 
the remainder of the email’s header into a premature body:

[…]
Message-ID: <5ae8513e.17b9620a.eebf7.d...@mx.google.com>
 
Date: Tue, 01 May 2018 04:36:30 -0700 (PDT) 
 
From: jens.troe...@gmail.com
   
To: Jens Tröger 
 

 

 

 
Content-Type: text/plain; charset="utf-8"   
 
Content-Transfer-Encoding: 7bit 
 
MIME-Version: 1.0   
 
From: Jens Troeger  
 

 
Some content.   
 

Also notice the two From fields. The first one, I suspect, is supplied from the 
SMTP server’s login, the second one from them EmailMessage.  Without a From in 
the EmailMessage, I get the following error:

>>> smtpsrv.send_message(msg)
Traceback (most recent call last):
  File "", line 1, in 
  File "/…/lib/python3.6/smtplib.py", line 936, in send_message
from_addr = email.utils.getaddresses([from_addr])[0][1]
  File "/…/lib/python3.6/email/utils.py", line 112, in getaddresses
all = COMMASPACE.join(fieldvalues)
TypeError: sequence item 0: expected str instance, NoneType found

Similar breakage of the header into premature body can be achieved with the Cc 
header field.

--
components: email
messages: 315994
nosy: _savage, barry, r.david.murray
priority: normal
severity: normal
status: open
title: From, To, Cc lines break when calling send_message()
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20709] os.utime(path_to_directory): wrong documentation for Windows.

2018-05-01 Thread Julien Palard

Julien Palard  added the comment:


New changeset 7508a54c77e85235e07e344cf9440e5b4695e9cc by Julien Palard 
(Stéphane Wirtel) in branch 'master':
bpo-20709: os.utime(path_to_directory): wrong documentation for Windows. 
(GH-5469)
https://github.com/python/cpython/commit/7508a54c77e85235e07e344cf9440e5b4695e9cc


--
nosy: +mdk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33378] Add Korean to the language switcher

2018-05-01 Thread Julien Palard

Julien Palard  added the comment:

Backported to 3.6.

--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33378] Add Korean to the language switcher

2018-05-01 Thread miss-islington

miss-islington  added the comment:


New changeset dc5c92fcb2aafd7f133f9f6986d8d05ac6e5160f by Miss Islington (bot) 
in branch '3.6':
bpo-33378: Add Korean to the language switcher. (GH-6627)
https://github.com/python/cpython/commit/dc5c92fcb2aafd7f133f9f6986d8d05ac6e5160f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33391] leak in set_symmetric_difference?

2018-05-01 Thread lekma

Change by lekma :


--
pull_requests: +6367

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33391] leak in set_symmetric_difference?

2018-05-01 Thread lekma

Change by lekma :


--
pull_requests: +6366

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Jeroen Demeyer

Jeroen Demeyer  added the comment:

> But the standard library has no need to ever find source for extension modules
> So there's no need for the stdlib to be involved

The standard library is not a closed system. It's not meant to support only 
itself, it's supposed to be an API. If linecache.getlines() is the Python API 
to get source code, then Cython code should use that API. Having a different 
competing API for getting source code (for other projects like Cython) is 
really the worst possible solution: some tools will only use linecache, other 
tools will use the new API and this will be a mess.

> Note that I haven't said it shouldn't be fixed, merely that I'm not as
> convinced, having read this discussion, that having linecache do a path search
> if the loader returns None is *necessarily* the best solution here.

Do you have other proposals? Like I said, the only thing that I want is one 
officially supported way to have the loader answer to linecache "I don't know 
where the sources are but continue looking for them".

> Ideally, of course, there would be a CythonExtensionLoader that handled this 
> in get_source.

That would be ideal solution indeed and it's the first thing that we tried to 
fix this.

Unfortunately for Cython, PEP 302 (and in particular the get_source signature) 
was written with the assumption that a *single* module only has a *single* 
source file. This assumption doesn't hold for Cython code: like C, it supports 
include/declaration files which can contain code. So my conclusion is that 
loader.get_source() simply cannot work for Cython.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com