[issue20767] Some python extensions can't be compiled with clang 3.4

2018-01-30 Thread Kubilay Kocak

Kubilay Kocak  added the comment:

If the intent is to use this issue to track the resolution of the original 
issue (clang compilation broken) and cover the new PR (which just moves the 
code from os detection to compiler detection), then it can remain open. 

Otherwise it can be closed, as the original issue 'has' been fixed.

--

___
Python tracker 

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



[issue20767] Some python extensions can't be compiled with clang 3.4

2018-01-30 Thread Kubilay Kocak

Kubilay Kocak  added the comment:

The changeset(s) applied in this issue were/are fine (thus no response on the 
issue)

It is the *removal* of the changesets included in this issue (as proposed in 
https://github.com/python/cpython/pull/5233) that would re-break compilation of 
extensions with clang (requiring re-opening this issue)

The root cause of the current confusion is the special case added here was 
conditional on the OS ('freebsd'), whereas it should (arguably) have been for a 
specific compiler (clang). 

In order to do this, this leads to the compiler detection code requiring 
improvement, see: 
https://github.com/python/cpython/pull/5233#issuecomment-358906977 as it 
currently does not detect clang as the default compiler (cc), see: 
https://github.com/python/cpython/pull/5233#issuecomment-358948425

--

___
Python tracker 

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



Re: Package containing C sources

2018-01-30 Thread dieter
Victor Porton  writes:

> I am going to create a Python wrapper around a generally useful C library. 
> So the wrapper needs to contain some C code to glue them together.
>
> Can I upload a package containing C sources to PyPi?

You can.

This is documented in "https://docs.python.org/2/extending/building.html;
(for Python 2; likely, it works in the same way for Python 3).


Note: I use "setuptools" (a "distutils" extension)
rather than the base "distutils" -- essentially, because it facilitates
the inclusion of non Python files in a distribution.
I do not know whether the base "distutils" automatically includes
the sources of C extensions (likely it does); "setuptools" provides
a way to include everything under control of a versioning system
(which I rely upon to not miss important files).

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Package containing C sources (Posting On Python-List Prohibited)

2018-01-30 Thread Victor Porton
Lawrence D’Oliveiro wrote:

> On Wednesday, January 31, 2018 at 6:13:00 PM UTC+13, Victor Porton wrote:
>> I am going to create a Python wrapper around a generally useful C
>> library. So the wrapper needs to contain some C code to glue them
>> together.
> 
> Not necessarily. It’s often possible to implement such a wrapper entirely
> in Python, using ctypes .

But if I will find that I need C code, do I need to package it separately?

So I would get three packages: the C library, the C wrapper for Python, and 
the Python code.

Can this be done with just two packages: the C library and C wrapper and 
Python in one package?

-- 
Victor Porton - http://portonvictor.org
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32387] Disallow untagged C extension import on major platforms

2018-01-30 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Interesting use case Josh.  I don't know of a good way to deal with 
non-extension-module Python API using .so files.  I like your extension hack, 
but what is the problem with having the version embedded in the .so name?

--

___
Python tracker 

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



[issue32729] socket error handling needed

2018-01-30 Thread 양영일

New submission from 양영일 :

socket error handling needed

--
components: IO
messages: 311313
nosy: 양영일
priority: normal
severity: normal
status: open
title: socket error handling needed
type: crash
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-01-30 Thread Lisa Roach

Lisa Roach  added the comment:

I gave it a shot- looks like we need to ensure that we catch any errors that 
could be thrown by the warning itself.

I wasn't entirely sure how to create a test for this, if anyone knows how I'll 
definitely add it!

--

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-01-30 Thread Lisa Roach

Change by Lisa Roach :


--
pull_requests: +5284
stage:  -> patch review

___
Python tracker 

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



[issue25988] collections.abc.Indexable

2018-01-30 Thread Guido van Rossum

Guido van Rossum  added the comment:

> > But we should make some noise around this change in the 3.7 announcement.
>
> How about a paragraph in the Deprecation section of the "What's New in Python 
> 3.7"? document
>
> https://docs.python.org/dev/whatsnew/3.7.html#deprecated

You mean other than what's there? The text that's currently there begins with 
"In Python 3.8, ..." which almost sounds like it's misplaced or a typo.  Maybe 
you can amend it somehow to explain that in 3.7, using or importing the ABCs 
from "collections" instead of from "collections.abc" is deprecated, and in 3.8 
it will stop working.

--

___
Python tracker 

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



Package containing C sources

2018-01-30 Thread Victor Porton
I am going to create a Python wrapper around a generally useful C library. 
So the wrapper needs to contain some C code to glue them together.

Can I upload a package containing C sources to PyPi?

If not, what is the proper way to distribute it?

-- 
Victor Porton - http://portonvictor.org
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Automation query... Plz help

2018-01-30 Thread Prahallad Achar
Thank you.
Indeed I did a search but couldn't find a right approach.

Jython! Yes.. It supports to call jar file.

As you said... Application support team has to modify few things on
application side where object creation should be public rather protected

On 31 Jan 2018 7:12 am, "Steven D'Aprano" <
steve+comp.lang.pyt...@pearwood.info> wrote:

> On Tue, 30 Jan 2018 16:00:43 +0530, Prahallad Achar wrote:
>
> > Luckily application supports headless automation now question is how to
> > invoke those jar using python.
>
> I can see two approaches:
>
> (1) Calling the jar directly from Python.
>
> I don't think you can do that from CPython, but you might be able to do
> it from Jython. (Jython is Python implemented in Java, and is designed to
> allow Java and Python code to call each other). Or there might be some
> third-party library that runs under CPython which allows you to do so.
>
>
> (2) Call the jar as an external process, in whatever way you would call a
> jar from an external application.
>
> Have you tried googling?
>
> https://duckduckgo.com/html/?q=call%20a%20jar%20from%20python
>
>
> (I think this is the limit of any help I can give -- I know nothing about
> jars except that they are some sort of Java code.)
>
>
>
> --
> Steve
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25988] collections.abc.Indexable

2018-01-30 Thread Ned Deily

Ned Deily  added the comment:

Guido:
> But we should make some noise around this change in the 3.7 announcement.

How about a paragraph in the Deprecation section of the "What's New in Python 
3.7"? document

https://docs.python.org/dev/whatsnew/3.7.html#deprecated

--
nosy: +ned.deily

___
Python tracker 

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



[issue32637] Android: set sys.platform to android

2018-01-30 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue32623] Resize dict on del/pop

2018-01-30 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2018-01-30 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



Re: Automation query... Plz help

2018-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2018 16:00:43 +0530, Prahallad Achar wrote:

> Luckily application supports headless automation now question is how to
> invoke those jar using python.

I can see two approaches:

(1) Calling the jar directly from Python.

I don't think you can do that from CPython, but you might be able to do 
it from Jython. (Jython is Python implemented in Java, and is designed to 
allow Java and Python code to call each other). Or there might be some 
third-party library that runs under CPython which allows you to do so.


(2) Call the jar as an external process, in whatever way you would call a 
jar from an external application.

Have you tried googling?

https://duckduckgo.com/html/?q=call%20a%20jar%20from%20python


(I think this is the limit of any help I can give -- I know nothing about 
jars except that they are some sort of Java code.)



-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32694] Can no longer specify OpenSSL locations with CPPFLAGS / LDFLAGS ?

2018-01-30 Thread Josh Rosenberg

Change by Josh Rosenberg :


--
title: Can no longer specify OpenSLL locations with CPPFLAGS / LDFLAGS ? -> Can 
no longer specify OpenSSL locations with CPPFLAGS / LDFLAGS ?

___
Python tracker 

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



[issue32387] Disallow untagged C extension import on major platforms

2018-01-30 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

So, just for clarity, is there another approved mechanism for distributing an 
extension that just happens to act as a (Python version specific) C support 
library? I've wanted to be able to build a library (static or dynamic) that is 
installed to lib/pythonX.Y/site-packages so it can be found by other extensions 
that use it without them having to ship a copy themselves.

The best solution I found was building and installing untagged extensions with 
pip; the extension features weren't actually used for anything but unittesting 
the library, but making it an extension meant it got installed to the Python 
version specific site-packages.

If untagged extensions aren't just old-fashioned, but banned, my use case is 
broken, and I've been completely unable to find a decent, non-Cython based, 
setup.py based pattern for building a C library that provides wrappers for 
Python API calls (and therefore must target specific Python versions).

--
nosy: +josh.r

___
Python tracker 

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



Re: [OT] Dutch Reach [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2018 09:39:26 -0700, Ian Kelly wrote:

> Also, I just wanted to add that if you're going to use the side mirror
> then you need to watch it for a couple of seconds rather than a quick
> glance. Most people's mirrors are not particularly well adjusted to
> capture the car's blind spot, which is exactly where an oncoming cyclist
> would be. A blind spot that can fit an entire car inside of it is
> enormous compared to the size of a bicycle.

How slow is the bike travelling that it takes a couple of seconds to 
cross the length of a car? If they're travelling that slowly, they're not 
so much going to collide with the door as gently nudge it.

Of course you should do more than a quick glance, it should be a proper 
look[1], but surely in a couple of seconds a cyclist could easily travel 
three or four car lengths.




[1] You're not just looking out for cyclists, but traffic, since you're 
stepping out into traffic yourself and presumably would prefer not to 
have some wayward car take your door off, and you with it.



-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32723] codecs.open silently ignores argument errors

2018-01-30 Thread Josh Rosenberg

Change by Josh Rosenberg :


--
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



[issue32723] codecs.open silently ignores argument errors

2018-01-30 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

On rereading the docs for Python 3 codecs.open, it doesn't seem to document the 
whole "no encoding means no codecs.StreamReaderWriter wrapping behavior" at all.

First off, any fix would only apply to Python 3 (I've removed 2.7 from the 
versions). Both Python 2 and Python 3 have the behavior of calling the plain 
builtin open function with just filename, mode, and buffering when no encoding 
is provided. On Python 2, it's impossible to use the errors keyword (because 
plain built-in open doesn't do decoding, it doesn't accept an errors 
parameter); on Python 3, you could, but you'd be adding to the behavioral 
discrepancies with Python 2.

The docs (just above codecs.open) already state:

"the builtin open() and the associated io module are the recommended approach 
for working with encoded text files"; personally, I'm inclined to just wash my 
hands of codecs.open (perhaps moving the note about builtin open down inside 
codecs.open's docs, so people who get a direct link don't have to scroll up to 
notice the note).

codecs.open was and is underspecified, never worked right (e.g. #8260, which 
despite the status, is not really fixed 
https://stackoverflow.com/a/46438434/364696 ), and the code which uses it is 
likely already working around its quirks, making fixes difficult.

--

___
Python tracker 

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



[issue32723] codecs.open silently ignores argument errors

2018-01-30 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

Ah, my mistake. That said, when you're not passing an encoding, you're still 
just calling regular open, it's not doing any special codecs.open wrapping (on 
Python 2, this meant you weren't decoding the input at all, on Python 3 it 
means you're decoding with the default encoding); you may as well just call 
open (codecs.open is pointless as soon as io.open exists, since codecs.open 
it's slower and has so many weird quirks).

While I acknowledge codecs.open is misbehaving here, I'm not sure fixing it is 
a great idea, since the function is effectively a legacy function (especially 
when used without an encoding argument), and io.open works correctly.

--

___
Python tracker 

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



[issue31912] PyMem_Malloc() should guarantee alignof(max_align_t)

2018-01-30 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
nosy: +gregory.p.smith, twouters

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2018-01-30 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
nosy: +gregory.p.smith, twouters

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5283

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:


New changeset 8d83e4ba7823827bcbc119db887004d5c3a63dc6 by R. David Murray 
(Stéphane Wirtel) in branch 'master':
bpo-32727: smtplib's SMTP.send_message behaves differently with from_addr and 
to_addrs (#5451)
https://github.com/python/cpython/commit/8d83e4ba7823827bcbc119db887004d5c3a63dc6


--

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-01-30 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> (PyErr_WarnEx might error out; please update the code to handle that)

Lisa, would you like to take a crack at fixing this one?

--

___
Python tracker 

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



[issue32722] Mislabeling of a dict comprehension as a generator expression in the tutorial

2018-01-30 Thread Soothsayer

Soothsayer  added the comment:

I agree that 2.7 is incorrect also, 2.7 has dict comprehensions also so there's 
no reason to pass a generator expression to dict().

I add 3.4 and 3.8 because they also have the problem.

--
versions: +Python 3.4, Python 3.8

___
Python tracker 

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



[issue32045] Does json.dumps have a memory leak?

2018-01-30 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
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



Re: [OT] Dutch Reach [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Grant Edwards
On 2018-01-30, Ian Kelly  wrote:
>
>> Unless the bike lane is between the "parallel parking lane" and the
>> curb[*], in which case it's the passenger side doors that are used to
>> catch bicycles rather than the driver's side doors.
>>
>> [*] This seems to be increasingly common here in the Minneapolis /
>> St. Paul area
>
> This seems like it would tend to make the "dooring" problem worse,
> since people are not generally accustomed to using caution when
> opening their door toward the curb rather than the street.

That may be mitigated by the high percentage of cars in US cities that
have no passengers.

-- 
Grant Edwards   grant.b.edwardsYow! Hello.  Just walk
  at   along and try NOT to think
  gmail.comabout your INTESTINES being
   almost FORTY YARDS LONG!!

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2018-01-30 Thread Ned Deily

Ned Deily  added the comment:

I don't know what the right answer here is.  But since there don't seem to be 
strong opinions one way or the other with regard to 3.7, I am not going to hold 
3.7.0b1 for a resolution.

--
priority: release blocker -> deferred blocker

___
Python tracker 

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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-30 Thread Gregory Ewing

On Mon, 29 Jan 2018 22:41:36 + (UTC), Steven D'Aprano
 declaimed the following:

Its the component of the router that actually handles the 
telecommunications side of things. Legend has it that once upon a time 
they were a stand alone device.


Even more distant legend suggests that modems existed before
the concept of a router was even thought of. Hard to imagine,
I know!

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Re: PyPy support breaking CPython compatibility?

2018-01-30 Thread Ned Batchelder

On 1/30/18 4:08 PM, Chris Angelico wrote:

On Wed, Jan 31, 2018 at 7:58 AM, Etienne Robillard  wrote:

Hi Ned,


Le 2018-01-30 à 15:14, Ned Batchelder a écrit :

I'm curious what you had to change for PyPy? (Unless it's a Py2/Py3 thing
as Chris mentions.)

Please take a look at the changesets:

https://bitbucket.org/tkadm30/libschevo/commits/745d1aeab5c6ee0d336790cf13d16f327e10c2f8
https://bitbucket.org/tkadm30/libdurus/commits/875636e9b6caa840fd50ca87d69217d87fc06f43

In short, it seems PyPy automagically adds a __weakref__ attribute to
__slots__, causing the CPython interpreter to raise a TypeError...


I'm confused by this:

-if os.environ.get('SCHEVO_OPTIMIZE', '1') == '1':
+if os.environ.get('SCHEVO_OPTIMIZE', '1') == True:

I was also curious about this: when does os.environ.get return anything 
but a string?


--Ned.
--
https://mail.python.org/mailman/listinfo/python-list


[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

The new test crashes without my fix but once we use the fix, all the
tests pass. I have modified the SimSMTPServer.process_manage method

--

___
Python tracker 

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



Re: PyPy support breaking CPython compatibility?

2018-01-30 Thread Chris Angelico
On Wed, Jan 31, 2018 at 7:58 AM, Etienne Robillard  wrote:
> Hi Ned,
>
>
> Le 2018-01-30 à 15:14, Ned Batchelder a écrit :
>>
>> I'm curious what you had to change for PyPy? (Unless it's a Py2/Py3 thing
>> as Chris mentions.)
>
>
> Please take a look at the changesets:
>
> https://bitbucket.org/tkadm30/libschevo/commits/745d1aeab5c6ee0d336790cf13d16f327e10c2f8
> https://bitbucket.org/tkadm30/libdurus/commits/875636e9b6caa840fd50ca87d69217d87fc06f43
>
> In short, it seems PyPy automagically adds a __weakref__ attribute to
> __slots__, causing the CPython interpreter to raise a TypeError...
>

I'm confused by this:

-if os.environ.get('SCHEVO_OPTIMIZE', '1') == '1':
+if os.environ.get('SCHEVO_OPTIMIZE', '1') == True:

BTW, this part you should probably consider doing differently:

-except schevo.error.SchemaFileIOError:
+except schevo.error.SchemaFileIOError, ex:
+print ex

The comma version is only needed on really old versions of Python
(2.4? something like that), and won't work on Python 3. Unless support
for ancient Pythons is important to you, I recommend using the "except
type as name:" syntax, which works on 2.7 and on 3.x.

But the weakref situation is curious. Can you show a minimal test-case
for the difference? Might be something that one interpreter or the
other needs to update.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: PyPy support breaking CPython compatibility?

2018-01-30 Thread Etienne Robillard

Hi Ned,


Le 2018-01-30 à 15:14, Ned Batchelder a écrit :
I'm curious what you had to change for PyPy? (Unless it's a Py2/Py3 
thing as Chris mentions.) 


Please take a look at the changesets:

https://bitbucket.org/tkadm30/libschevo/commits/745d1aeab5c6ee0d336790cf13d16f327e10c2f8
https://bitbucket.org/tkadm30/libdurus/commits/875636e9b6caa840fd50ca87d69217d87fc06f43

In short, it seems PyPy automagically adds a __weakref__ attribute to 
__slots__, causing the CPython interpreter to raise a TypeError...



Cheers,

Etienne

--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
https://mail.python.org/mailman/listinfo/python-list


[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

We need a test that will fail without your fix.

--

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-01-30 Thread Yury Selivanov

Yury Selivanov  added the comment:

A bug found by coverity:

(PyErr_WarnEx might error out; please update the code to handle that)



 *** CID 1428756: Error handling issues (CHECKED_RETURN)
/Modules/gcmodule.c: 1071 in gc_enable_impl()
1065
1066 static PyObject *
1067 gc_enable_impl(PyObject *module)
1068 /*[clinic end generated code: output=45a427e9dce9155c 
input=81ac4940ca579707]*/
1069 {
1070 if(_PyRuntime.gc.disabled_threads){
1071 PyErr_WarnEx(PyExc_RuntimeWarning, "Garbage collector enabled while 
another "
1072 "thread is inside gc.ensure_enabled",1);
1073 }
1074 _PyRuntime.gc.enabled = 1;
1075 Py_RETURN_NONE;
1076 }

--
nosy: +yselivanov

___
Python tracker 

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



[issue31356] Add context manager to temporarily disable GC

2018-01-30 Thread Yury Selivanov

Change by Yury Selivanov :


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

___
Python tracker 

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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-01-30 Thread Yury Selivanov

Yury Selivanov  added the comment:

A couple defects reported by coverity:



** CID 1428758: Integer handling issues (CONSTANT_EXPRESSION_RESULT) 
/Modules/_xxsubinterpretersmodule.c: 45 in _coerce_id()

 *** CID 1428758: Integer handling issues (CONSTANT_EXPRESSION_RESULT) 
/Modules/_xxsubinterpretersmodule.c: 45 in _coerce_id()
39 }
40 if (cid < 0) {
41 PyErr_SetString(PyExc_ValueError, 42 "'id' must be a non-negative int"); 43 
return -1;
44 }
45 if (cid > INT64_MAX) {
46 PyErr_SetString(PyExc_ValueError, 47 "'id' too large (must be 64-bit int)"); 
48 return -1;
49 }
50 return cid;
** CID 1428757: Integer handling issues (CONSTANT_EXPRESSION_RESULT) 
/Modules/_xxsubinterpretersmodule.c: 1215 in channelid_richcompare()

 *** CID 1428757: Integer handling issues (CONSTANT_EXPRESSION_RESULT) 
/Modules/_xxsubinterpretersmodule.c: 1215 in channelid_richcompare()
1209 }
1210 int64_t othercid = PyLong_AsLongLong(other); 1211 // XXX decref other here?
1212 if (othercid == -1 && PyErr_Occurred() != NULL) { 1213 return NULL;
1214 }
1215 if (othercid < 0 || othercid > INT64_MAX) { 1216 equal = 0;
 
1217 }
1218 else {
1219 equal = (cid->id == othercid); 1220 }
** CID 1428756: Error handling issues (CHECKED_RETURN) /Modules/gcmodule.c: 
1071 in gc_enable_impl()

--

___
Python tracker 

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



[issue32722] Mislabeling of a dict comprehension as a generator expression in the tutorial

2018-01-30 Thread Brett Cannon

Change by Brett Cannon :


--
title: Classes -> Mislabeling of a dict comprehension as a generator expression 
in the tutorial

___
Python tracker 

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



[issue29708] support reproducible Python builds

2018-01-30 Thread Brett Cannon

Change by Brett Cannon :


--
assignee: brett.cannon -> 
stage: resolved -> 

___
Python tracker 

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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-30 Thread Jugurtha Hadjar

On 01/29/2018 03:48 PM, alister via Python-list wrote:

On Mon, 29 Jan 2018 15:20:06 +0100, Jugurtha Hadjar wrote:


On 01/28/2018 04:43 PM, Skip Montanaro wrote:

I've never been a Windows user, but at my current job, Windows is core
to just about everything, so I am forced to use it for a lot of stuff
(Outlook, SQL Server, Excel, etc).

I was hired at a startup which made a good impression on me and I was
eager to start working. I checked in for my first day, signed the
paperwork, then the CTO showed me around and told me "Here's your
laptop, you can install Windows and I'll check in with you later". Life
started draining out of my body and my mind was racing in all directions
before he even finished his sentence. I felt tricked: I was hired based
on a test and the file I've received was a *.tar.gz* and it made me
happy because I assumed they were a NIX shop..

I was considering how I should go about quitting gracefully. I have
stopped using Windows in 2008 for psychological reasons for it made me
really anxious, irritable, angry, and tense to the point of abusing
hardware with low kicks and punches which was not very healthy or sane.
It was only when I switched OS that this behavior stopped. There was no
way I would be going back to my bully.

The CTO then said "Sorry.. I meant Ubuntu." and seeing my pale face, he
said in a reassuring tone "Don't be afraid, there are no Windows
machines here." which brought me back to life.

I hope to be as brave as you some day.

Any Vacancies
whatever they do I am sure I can learn :-)





We're hiring all the good (technical and human side) people we can 
find/afford. It's a small startup that helps its clients improve 
business using machine learning. We're in Algiers, Algeria and Paris, 
France.



--
~ Jugurtha Hadjar,

--
https://mail.python.org/mailman/listinfo/python-list


[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

yep, you can take a look but all the tests are green on Travis, maybe you will 
understand why I don't see the interest of my new test. you are the master for 
the email part ;-)

--

___
Python tracker 

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



Re: PyPy support breaking CPython compatibility?

2018-01-30 Thread Ned Batchelder

On 1/30/18 2:35 PM, Etienne Robillard wrote:

Hi,

I managed to patch Schevo and Durus to run under PyPy 5.9. However, 
I'm afraid the changes is breaking Python 2.7 compatibility.


I'm curious what you had to change for PyPy? (Unless it's a Py2/Py3 
thing as Chris mentions.)


I'm not sure how I should distribute my changes to the respective 
projects.


You should make pull requests to the projects so they can incorporate 
the changes.


--Ned.


Since I decided to use more PyPy in my Django projects, should I drop 
Python 2.7 support and release the experimental code on PyPi ?



What do you think?

Etienne




--
https://mail.python.org/mailman/listinfo/python-list


[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

The current test suite had better work fine without your new test, otherwise 
your fix broke something :)  I will take a look.

--

___
Python tracker 

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



Re: PyPy support breaking CPython compatibility?

2018-01-30 Thread Etienne Robillard

Hi Chris,


Le 2018-01-30 à 14:53, Chris Angelico a écrit :

If you're supporting Python 3, I don't think there's any problem with
saying "Python 2.7 support ceases as of Schevo v4.0, so if you need Py
2.7 use Schevo 3.x". (It's not as if the old versions will suddenly
cease working or anything.)


Fair enough. I'll gladly release libschevo and libdurus 4.0 very soon. :)

Thank you,

Etienne

--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
https://mail.python.org/mailman/listinfo/python-list


[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@r.david.murray I just updated the PR with a test, but I am not sure about it, 
could you give me your opinion because the current test suite works fine 
without my new test.

--

___
Python tracker 

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



[issue19495] context manager for measuring duration of blocks of code

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

FWIW, we just ran in to the need for this on our project, and used 'Time' from 
the contexttimer package on pypi.  In our use case we want the number so we can 
log it, and what we care about is the actual elapsed time, not a precise 
measurement of the code block, because it for system monitoring and metrics, 
not hardcore performance analysis.  

Having this always print would indeed be sub-optimal :)

--
nosy: +r.david.murray
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



Re: PyPy support breaking CPython compatibility?

2018-01-30 Thread Chris Angelico
On Wed, Jan 31, 2018 at 6:35 AM, Etienne Robillard  wrote:
> Hi,
>
> I managed to patch Schevo and Durus to run under PyPy 5.9. However, I'm
> afraid the changes is breaking Python 2.7 compatibility.
>
> I'm not sure how I should distribute my changes to the respective projects.
>
> Since I decided to use more PyPy in my Django projects, should I drop Python
> 2.7 support and release the experimental code on PyPi ?
>
>
> What do you think?

First off, what's your status on Python 3? When you say "PyPy 5.9",
are you referring to the one that's compatible with Python 3.5 or the
one that's compatible with Python 2.7?

If you're supporting Python 3, I don't think there's any problem with
saying "Python 2.7 support ceases as of Schevo v4.0, so if you need Py
2.7 use Schevo 3.x". (It's not as if the old versions will suddenly
cease working or anything.)

On the other hand, if you're looking at two different Python 2.7
interpreters, you'll be narrowing your potential userbase
significantly by dropping CPython support. Maybe that's not an issue
for you (hey, I've "released" code that depends on features in
unreleased versions of Python - the intended userbase is basically
just me, even though the code's open source and published), but it's
definitely a consideration.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue19495] context manager for measuring duration of blocks of code

2018-01-30 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Hello everyone,

I was interested in similar functionality for timeit and found this discussion. 
 I know it's too late for 3.7, but I was wondering if it would be worth putting 
this on python-ideas or python-dev to try to get some consensus for a PEP or a 
patch?  With Barry's addition of breakpoint(), I would find something similar 
for timeit (that is, a simpler way to invoke it) would be quite helpful.

Thanks!

--
nosy: +csabella

___
Python tracker 

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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-30 Thread Peter Pearson
On Mon, 29 Jan 2018 14:46:59 -0500, Dennis Lee Bieber wrote:
> On 29 Jan 2018 17:26:32 GMT, Peter Pearson 
> declaimed the following:
>
>>
>>In 1964, the IBM exhibit at the World's Fair in New York demonstrated
>>a system that read dates that visitors wrote by hand.  (You were
>>supposed to write your date of birth, and the system then printed
>>the New York Times's headline for that date.)
>
>   Was it somehow scanning dates from paper or cards, or was it using some
> sort of touch sensor input (pressure tablet, or a pen in a harness with
> position sensors).
>
>   The first would be OCR proper, while the second is what many PDAs (and
> some tablets) rely upon. The second provides actually stroke vector
> information on how the characters are formed, which is more reliable than
> just seeing pixel transitions and trying to match characters to them.

We wrote our dates of birth on paper or punch cards (I forget which)
with an ordinary pen.  We handed the papers (or cards) to someone who
fed them into a machine, which printed slips of paper that were handed
to us as we exited.  According to the promotional displays, our writing
was examined optically; one poster showed a scan path that resembled
an extremely prolate cycloid following along the handwritten line.

-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list


[UDEMY] complete python course 13 hour long course

2018-01-30 Thread Muhammad Waqas
link as follow:
https://www.udemy.com/complete-package-of-python-course-mastery-in-python-course/?couponCode=PYTHONFORUM
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] Dutch Reach [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Ian Kelly
On Tue, Jan 30, 2018 at 9:24 AM, Grant Edwards
 wrote:
> On 2018-01-30, Steven D'Aprano  wrote:
>> On Tue, 30 Jan 2018 15:48:29 +, Matt Wheeler wrote:
>>
>>> Checking the side mirrors isn't particularly helpful advice if you're
>>> sitting in any seat other than the driver's seat, however.
>>
>> That's a fair point.
>>
>> But it really only applies to those sitting on the driver's side in the
>> back seat. On the passenger's side, you open the door towards the curb,
>> out of the way of both cyclists and on-coming traffic.
>
> Unless the bike lane is between the "parallel parking lane" and the
> curb[*], in which case it's the passenger side doors that are used to
> catch bicycles rather than the driver's side doors.
>
> [*] This seems to be increasingly common here in the Minneapolis /
> St. Paul area

This seems like it would tend to make the "dooring" problem worse,
since people are not generally accustomed to using caution when
opening their door toward the curb rather than the street.

Also, I just wanted to add that if you're going to use the side mirror
then you need to watch it for a couple of seconds rather than a quick
glance. Most people's mirrors are not particularly well adjusted to
capture the car's blind spot, which is exactly where an oncoming
cyclist would be. A blind spot that can fit an entire car inside of it
is enormous compared to the size of a bicycle.
-- 
https://mail.python.org/mailman/listinfo/python-list


PyPy support breaking CPython compatibility?

2018-01-30 Thread Etienne Robillard

Hi,

I managed to patch Schevo and Durus to run under PyPy 5.9. However, I'm 
afraid the changes is breaking Python 2.7 compatibility.


I'm not sure how I should distribute my changes to the respective projects.

Since I decided to use more PyPy in my Django projects, should I drop 
Python 2.7 support and release the experimental code on PyPi ?



What do you think?

Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

--
https://mail.python.org/mailman/listinfo/python-list


[issue32690] Return function locals() in order of creation?

2018-01-30 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thank Nick.

--

___
Python tracker 

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



Re: checksum problem

2018-01-30 Thread Chris Angelico
On Wed, Jan 31, 2018 at 6:21 AM, Peter Pearson
 wrote:
> On Tue, 30 Jan 2018 11:24:07 +0100, jak  wrote:
>>  with open(fname, "rb") as fh:
>>  for data in fh.read(m.block_size * blocks):
>>  m.update(data)
>>  return m.hexdigest()
>>
>
> I believe your "for data in fh.read" loop just reads the first block of
> the file and loops over the bytes in that block (calling m.update once
> for each byte, probably the least efficient approach imaginable),
> omitting the remainder of the file.  That's why you start getting the
> right answer when the first block is big enough to encompass the whole
> file.

Correct analysis.

Generally, if you want to read a file in chunks, the easiest way is this:

while "moar data":
data = fh.read(block_size)
if not data: break
m.update(data)

That should get you the correct result regardless of your block size,
and then you can tweak the block size to toy with performance.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32045] Does json.dumps have a memory leak?

2018-01-30 Thread Rohan D'Sa

Rohan D'Sa  added the comment:

Yes. Thanks.

On 30 Jan 2018 8:31 PM, "Cheryl Sabella"  wrote:

>
> Cheryl Sabella  added the comment:
>
> Can this be closed as 'Not a Bug'?
>
> --
> nosy: +csabella
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue27428] Document WindowsRegistryFinder inherits from MetaPathFinder

2018-01-30 Thread Brett Cannon

Brett Cannon  added the comment:

Docs should still be correct.

--

___
Python tracker 

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



[issue32045] Does json.dumps have a memory leak?

2018-01-30 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Can this be closed as 'Not a Bug'?

--
nosy: +csabella

___
Python tracker 

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



Re: Import statements and multiprocessing

2018-01-30 Thread Terry Reedy

On 1/30/2018 10:54 AM, Nicholas Cole wrote:


I have a strange problem on python 3.6.1

[involving multiprocessing]

I think the first thing you should do is upgrade to 3.6.4 to get all the 
bugfixes since 3.6.4. I am pretty sure there have been some for 
multiprocessing itself. *Then* see if you still have a problem.


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


[issue25095] test_httpservers hangs since Python 3.5

2018-01-30 Thread William Pickard

Change by William Pickard :


--
versions: +Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



Re: checksum problem

2018-01-30 Thread Peter Pearson
On Tue, 30 Jan 2018 11:24:07 +0100, jak  wrote:
> Hello everybody,
> I'm using python 2.7.14 and calculating the checksum with the sha1 
> algorithm and this happens: the checksum is wrong until I read the whole 
> file in one shot. Here is a test program:
>
> import hashlib
>
> def Checksum(fname, blocks):
>  m = hashlib.sha1()
>  print "sha1 block size: " + str(m.block_size * blocks)
>  with open(fname, "rb") as fh:
>  for data in fh.read(m.block_size * blocks):
>  m.update(data)
>  return m.hexdigest()
>
> def main():
>  for b in range(10, 260, 10):
>  print str(b) + ': ' + 
> Checksum("d:/upload_688df390ea0bd728fdbeb8972ae5f7be.zip", b)
>
> if __name__ == '__main__':
>  main()
>
> and this is the result output:
>
> sha1 block size: 640
> 10: bf09de3479b2861695fb8b7cb18133729ef00205
> sha1 block size: 1280
> 20: 71a5499e4034fdcf0eb0c5d960c8765a8b1f032d
> .
> .
> .
> sha1 block size: 12160
> 190: 956d017b7ed734a7b4bfdb02519662830dab4fbe
> sha1 block size: 12800
> 200: 1b2febe05b70f58350cbb87df67024ace43b76e5
> sha1 block size: 13440
> 210: 93832713edb40cf4216bbfec3c659842fbec6ae4
> sha1 block size: 14080
> 220: 93832713edb40cf4216bbfec3c659842fbec6ae4
> .
> .
> .
>
> the file size is 13038 bytes and its checksum is 
> 93832713edb40cf4216bbfec3c659842fbec6ae4
>
> Why do I get these results? What am I doing wrong?
>
> Thanks to everyone in advance.

I believe your "for data in fh.read" loop just reads the first block of
the file and loops over the bytes in that block (calling m.update once
for each byte, probably the least efficient approach imaginable),
omitting the remainder of the file.  That's why you start getting the
right answer when the first block is big enough to encompass the whole
file.

-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2018-01-30 Thread Nitish

Change by Nitish :


--
nosy: +nitishch

___
Python tracker 

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



[issue27428] Document WindowsRegistryFinder inherits from MetaPathFinder

2018-01-30 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Since WindowsRegistryFinder was deprecated in 3.6, should this be closed or 
should the documentation still be corrected?

--
nosy: +csabella
versions: +Python 3.7 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2018-01-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset a23a2c555c4187f349276fe2f2ceffa953d0afe9 by Benjamin Peterson in 
branch '3.6':
[3.6] closes bpo-30117: fix lib2to3 ParserIdempotency test (GH-1242) (GH-5443)
https://github.com/python/cpython/commit/a23a2c555c4187f349276fe2f2ceffa953d0afe9


--

___
Python tracker 

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



Re: [OT] Dutch Reach [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread MRAB

On 2018-01-30 15:39, Steven D'Aprano wrote:

On Tue, 30 Jan 2018 05:48:15 -0800, Rustom Mody wrote:

[...]

Ah, yes, the Dutch Reach. That would be like the French Pox (which
isn't French), the Spanish Flu (that didn't start in Spain), the
Jerusalem artichoke (which is neither an artichoke nor from Jerusalem),
and the turkey (the bird, which has nothing to do with Turkey, the
country).

This technique is neither taught nor commonly used used by the Dutch:
apparently some Americans decided that because the Netherlands has a
lot of cyclists, they'll say its Dutch.


reference please


The onus should be on those who claim that the technique actually is used
by the Dutch. Anecdotally, the Dutch people I've spoken to on the
Internet had no idea that this technique even existed.


Do we know of anyone who's Dutch and frequents a Python newsgroup? :-)

[snip]
--
https://mail.python.org/mailman/listinfo/python-list


[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2018-01-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

1e17d4aaff5c7ca972bab437949d2bb51c5b30f7. I don't think you can pin 
test_subprocess on this change, though.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



Re: Where has the practice of sending screen shots as source code come from?

2018-01-30 Thread Rhodri James

On 30/01/18 16:47, alister via Python-list wrote:

The British TV show QI seemed to think this is actually part of the Dutch
driving test although they have been known to make mistakes


It has to be noted that the QI Elves did not do particularly well in 
Only Connect...


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

Yes, you'll have to write a test.  Add a test after 
test_send_unicode_without_SMTPUTF8, but put the unicode in the name field of 
the 'from' address and test that it is accepted.  You should be able to figure 
out how to check for success from the other tests in that class (I hope ;)

--

___
Python tracker 

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



[issue32611] Tkinter taskbar icon (Windows)

2018-01-30 Thread Minion Jim

Minion Jim  added the comment:

Sorry for posting this as a bug :-( When I reupdated (again) it sorted itself 
out (for whatever reason). So once again sorry for wasting your time.

--

___
Python tracker 

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



[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2018-01-30 Thread Tamás Bajusz

Change by Tamás Bajusz :


--
nosy: +gbtami

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2018-01-30 Thread Tamás Bajusz

Change by Tamás Bajusz :


--
nosy: +gbtami

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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

___
Python tracker 

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



Re: 2.6.7: Does socket.gethostbyaddr truncate?

2018-01-30 Thread Dan Stromberg
dig -x should return a single PTR in all cases, shouldn't it?

What IP are you using?

2.6 is very old.  You probably should move to at Least 2.7, and plan a
move to 3.x.

On Tue, Jan 30, 2018 at 4:05 AM, Antoon Pardon  wrote:
> I am using python 2.6.7 to do a little network programming, but it seems I 
> don't
> get all the results.
>
> When I call socket.gethostbyaddr(IP) entry [1] of the result is a list of 34 
> addresses.
>
> However when I use: dig -x IP I get a list of 46 addresses.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] Text as digitization [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Grant Edwards
On 2018-01-30, Steven D'Aprano  wrote:

> We're talking about *programmers* here -- if they can't cope with the 
> highly stylised textual medium in which they work, they're going to 
> really struggle to, you know, actually program.

Well, to be fair, many of them do (struggle to actually program, that
is).

Spend any time at all reading PHP forums and you'll despair for
humanity.  Not only are they trying to build airports and radios out
of bamboo and twine, they don't even know how to split cane or tie a
knot.

-- 
Grant Edwards   grant.b.edwardsYow! WHO sees a BEACH BUNNY
  at   sobbing on a SHAG RUG?!
  gmail.com

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-30 Thread alister via Python-list
On Tue, 30 Jan 2018 07:28:58 +, Steven D'Aprano wrote:

> On Mon, 29 Jan 2018 21:32:11 -0800, Rustom Mody wrote:
> 
>> On Sunday, January 28, 2018 at 8:37:11 PM UTC+5:30, Steven D'Aprano
>> wrote:
>>> I'm seeing this annoying practice more and more often. Even for
>>> trivial pieces of text, a few lines, people post screenshots instead
>>> of copying the code.
>>> 
>>> Where has this meme come from? It seems to be one which inconveniences
>>> *everyone* involved:
>> 
>> Have you heard of the “Dutch Reach¨?
>> http://www.telegraph.co.uk/travel/news/the-dutch-reach-how-opening-car-
> door-like-the-dutch-could-save-lives-cycling/
> 
> Ah, yes, the Dutch Reach. That would be like the French Pox (which isn't
> French), the Spanish Flu (that didn't start in Spain), the Jerusalem
> artichoke (which is neither an artichoke nor from Jerusalem), and the
> turkey (the bird, which has nothing to do with Turkey, the country).
> 
> This technique is neither taught nor commonly used used by the Dutch:
> apparently some Americans decided that because the Netherlands has a lot
> of cyclists, they'll say its Dutch.
> 
The British TV show QI seemed to think this is actually part of the Dutch 
driving test although they have been known to make mistakes

> https://en.wikipedia.org/wiki/Dooring
> 
> So let me see if I understand the logic...
> 
> Rather than teach people to *explicitly* check their mirror to make sure
> it is safe before opening the car door, teach them a difficult, awkward
> maneuver which they're guaranteed to stop using the second the driving
> test is over, that merely points their head more-or-less vaguely in the
> right direction to *maybe* notice on-coming cyclists *if and only if*
> they're actually paying attention.
> 
> I can see this falls under the problem solving technique, "We must do
> something, this is something, therefore we must do it!"
> 
on this I can agree with you.
Personally I tend to "crack" the door a little & then look down the road 
Before opening fully. i am pretty sure I also (at least subconsciously) 
check the mirror.
Then again many* cyclists tend to be in the blind spot, dressed in dark 
clothing & have no lights & ride with zero regard to the rules of the 
road.

> The sorts of people who can't remember to check their mirror before
> opening the car door aren't the sort who will remember to use this
> awkward technique. And for those who can remember to do so, it is
> simpler and more effective to explicitly check your mirror (as the Dutch
> actually do).
> 
> 
>> Presumably it goes beyond the 'inconvenience' of images-instead-of-text
>> to the saving-of-lives…
> 
> I have no idea what connection you think is between this and emailing
> pictures of source code in place of source code.

* not all, some do appear have a desire to live.



-- 
The pollution's at that awkward stage.  Too thick to navigate and too
thin to cultivate.
-- Doug Sneyd
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@r.david.murray I am interested with your opinion about a test for this PR, if 
you have an idea, because all the tests pass on my laptop

--

___
Python tracker 

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



[issue32728] Extend zipfile's compression level support to LZMA

2018-01-30 Thread bbayles

New submission from bbayles :

In [1] (issue 21417), support for setting an archive (or its files) compression 
level was added to the zipfile module.

That currently works for the ZIP_DEFLATED and ZIP_BZIP2 compression methods, 
but not for ZIP_LZMA. This is because zipfile includes its own implementation 
of LZMACompressor that hard-codes the default preset's parameters (see also 
[2]).

It should be possible to extend compression level settings to ZIP_LZMA by 
making zipfile.LZMACompressor more flexible, i.e. able to accept an LZMA 
preset. I think this would involve porting the function that translates presets 
to options (lzma_lzma_preset, see [3]) and passing in those options to 
lzma.LZMACompressor .

[1] https://bugs.python.org/issue21417
[2] https://github.com/python/cpython/pull/5385
[3] 
https://git.tukaani.org/?p=xz.git;a=blob;f=src/liblzma/lzma/lzma_encoder_presets.c;hb=HEAD

--
components: Library (Lib)
messages: 311283
nosy: bbayles
priority: normal
severity: normal
status: open
title: Extend zipfile's compression level support  to LZMA
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



Re: Import statements and multiprocessing

2018-01-30 Thread Nicholas Cole
On Tue, Jan 30, 2018 at 4:33 PM, Nicholas Cole  wrote:
> On Tue, Jan 30, 2018 at 4:23 PM, Steven D'Aprano
>  wrote:
>> On Tue, 30 Jan 2018 15:54:30 +, Nicholas Cole wrote:
>
>> I would say you're probably misinterpreting the nature of the problem.
>> Import * isn't a directive that can be ignored.
>>
>> Can you show us a *simplified* demonstration? A minimal sample program
>> which we can run that demonstrates the issue?
>
> [snip]

Ah! Looking at our code, I was wrong.  The from .this_package import *

directive is not importing a single file but a subpackage __init__ file.

That __init__ file does not have its own __all__ statement, but seems
to just be relying on importing from different files in the
subpackage.

Could that be the problem?  Even so, I'm unsure why it is showing up
only when used in multiprocessing and works fine everywhere else.

N.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@r.david.murray I started to work on a fix.

--

___
Python tracker 

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



Re: Import statements and multiprocessing

2018-01-30 Thread Nicholas Cole
On Tue, Jan 30, 2018 at 4:23 PM, Steven D'Aprano
 wrote:
> On Tue, 30 Jan 2018 15:54:30 +, Nicholas Cole wrote:

> I would say you're probably misinterpreting the nature of the problem.
> Import * isn't a directive that can be ignored.
>
> Can you show us a *simplified* demonstration? A minimal sample program
> which we can run that demonstrates the issue?

[snip]

I find it extremely odd.

File A:

the multiprocessing code and the map function.

file B: a set of library functions called by the function called in file A.

file C: included in file B by use of a from .C import * statement.


But none of the functions in B can see the objects defined in C unless
an explicit relative import is included in their functions.

In single process code this seems to work perfectly.

Producing a simplified version is not trivial. But I shall see what I
can do.  At any rate, in our current code, the import * directive *is*
ineffective in subprocesses.

N.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue28494] is_zipfile false positives

2018-01-30 Thread John Jolly

Change by John Jolly :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue28494] is_zipfile false positives

2018-01-30 Thread John Jolly

John Jolly  added the comment:

Is there any chance that this will make it into 3.7 or is my reminder too late?

--

___
Python tracker 

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



Re: [OT] Dutch Reach [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Grant Edwards
On 2018-01-30, Steven D'Aprano  wrote:
> On Tue, 30 Jan 2018 15:48:29 +, Matt Wheeler wrote:
>
>> Checking the side mirrors isn't particularly helpful advice if you're
>> sitting in any seat other than the driver's seat, however.
>
> That's a fair point.
>
> But it really only applies to those sitting on the driver's side in the 
> back seat. On the passenger's side, you open the door towards the curb, 
> out of the way of both cyclists and on-coming traffic.

Unless the bike lane is between the "parallel parking lane" and the
curb[*], in which case it's the passenger side doors that are used to
catch bicycles rather than the driver's side doors.

[*] This seems to be increasingly common here in the Minneapolis /
St. Paul area

-- 
Grant Edwards   grant.b.edwardsYow! People humiliating
  at   a salami!
  gmail.com

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Import statements and multiprocessing

2018-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2018 15:54:30 +, Nicholas Cole wrote:

[...]
> The function I am passing to map calls a function in another file within
> the same model.  And that file has a
> 
> from .some_file_in_the_package import *
> 
> line at the top.
> 
> However, in each function called in that file, I seem to need to put an
> explicit important statement buried within the function in order for the
> code to work:
> 
> def some_function():
> from .some_file_in_the_package import ThisObject
> 
> It is as if in the worker processes created by Pool.map() the from .
> import * directive is being completely ignored.

[...]
> What could be going wrong?

I would say you're probably misinterpreting the nature of the problem. 
Import * isn't a directive that can be ignored.

Can you show us a *simplified* demonstration? A minimal sample program 
which we can run that demonstrates the issue?

Here's an expensive function for you to call:


import time

def process(value):
time.sleep(3)
return value+1



And a data set to process:

data = [1, 2, 3, 4]


Can you put them in a minimal package, show us how you would import them, 
and call worker processes with them? We ought to be able to copy the code 
and run it ourselves to see the issue first hand. See 

http://sscce.org/

for further details.


-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Michaël Lemaire

Michaël Lemaire  added the comment:

Oups @r.david.murray, just saw I posted over your message, and removed you from 
the nozy list, sorry.

--
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



Re: [OT] Text as digitization [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Chris Angelico
On Wed, Jan 31, 2018 at 3:09 AM, Steven D'Aprano
 wrote:
> On Tue, 30 Jan 2018 05:48:15 -0800, Rustom Mody wrote:
>
>> Text is a highly stylized unnatural medium
> [chomp]
>
>> That people who have not been cultured in a certain way can do
>> aggravating things like talking with pics instead of text — I wont
>> dispute That people who have gone from the nature to nurture process
>> conveniently forget this process is more aggravating
>
> I'm sorry, I don't understand this paragraph.

I think that paragraph is his demonstration that text can, if properly
crafted, be as useless as an image.

*ducking for cover*

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] Dutch Reach [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2018 15:48:29 +, Matt Wheeler wrote:

> Checking the side mirrors isn't particularly helpful advice if you're
> sitting in any seat other than the driver's seat, however.

That's a fair point.

But it really only applies to those sitting on the driver's side in the 
back seat. On the passenger's side, you open the door towards the curb, 
out of the way of both cyclists and on-coming traffic.

For the minority of passengers sitting in the rear on the driver's side, 
you just have to be extra careful about opening the door and stepping out 
into the road, not just for the sake of cyclists, but also for the sake 
of not being side-swiped by a car or truck as you step into the road.



-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


[OT] Text as digitization [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2018 05:48:15 -0800, Rustom Mody wrote:

> Text is a highly stylized unnatural medium

Hmmm. I think it is no more "unnatural" than whale songs or the extremely 
formalised dancing rituals of birds or any other animal communication.

Our species just takes this communication to a higher level of 
information content -- but that's a matter of degree, not kind.

But okay, for the sake of the argument, it's highly stylised (like formal 
logic, mathematical reasoning, filling in your tax return, and Kabuki 
theatre). How is that relevant?

We're talking about *programmers* here -- if they can't cope with the 
highly stylised textual medium in which they work, they're going to 
really struggle to, you know, actually program.

And as for being unnatural -- that would be like electric lights, 
antibiotics, eyeglasses, and dentistry. Still not seeing the downside 
here. The natural state of humanity is to spend the majority of your life 
being cold and hungry, hot and hungry, or terrified, before dying young.


> Its an extreme digitization
> of something (do you remember?) called handwriting… 

Of course I remember handwriting. I still use handwriting.

Typed text has evolved from handwriting, via printing. What's your point?


> That people who have not been cultured in a certain way can do
> aggravating things like talking with pics instead of text — I wont
> dispute That people who have gone from the nature to nurture process
> conveniently forget this process is more aggravating

I'm sorry, I don't understand this paragraph.


-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


Import statements and multiprocessing

2018-01-30 Thread Nicholas Cole
Dear List,

I have a strange problem on python 3.6.1

I am using the multiprocessing function to parallelize an expensive
operation, using the multiprocessing.Pool() and Pool.map() functions.

The function I am passing to map calls a function in another file
within the same model.  And that file has a

from .some_file_in_the_package import *

line at the top.

However, in each function called in that file, I seem to need to put
an explicit important statement buried within the function in order
for the code to work:

def some_function():
from .some_file_in_the_package import ThisObject

It is as if in the worker processes created by Pool.map() the from .
import * directive is being completely ignored.

With the explicit import statements everything works as expected.

What could be going wrong?

Best wishes,

Nicholas
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] Dutch Reach [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Matt Wheeler
On Tue, 30 Jan 2018 at 15:39 Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:

> This effectively and completely undermines the supposed claim that this
> technique makes it *automatic* to look behind you for on-coming cyclists.
> That simply isn't the case. Whether you use the arm closest or furthest
> from the door, you still need to make a conscious effort to either look
> over your shoulder (where your view will be obstructed by the car pillar
> by the door), or consciously check your side mirror.
>

Checking the side mirrors isn't particularly helpful advice if you're
sitting in any seat other than the driver's seat, however.
-- 

--
Matt Wheeler
http://funkyh.at
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Michaël Lemaire

Michaël Lemaire  added the comment:

Sure :

#coding: utf-8
import email.utils
from email.message import EmailMessage
from smtplib import SMTP
m = EmailMessage()
m['From'] = email.utils.formataddr(("Michaël", "mich...@example.com"))
m['To'] = email.utils.formataddr(("René", "bou...@rodacom.fr"))
with SMTP('localhost') as smtp:
smtp.set_debuglevel(2)
smtp.send_message(m)
#END

On a server without SMTPUTF8, this outputs:

---
16:39:26.351302 send: 'ehlo localhost\r\n'
16:39:26.351391 reply: b'250-localhost\r\n'
16:39:26.351414 reply: b'250-PIPELINING\r\n'
16:39:26.351427 reply: b'250-SIZE 1024\r\n'
16:39:26.351437 reply: b'250-VRFY\r\n'
16:39:26.351448 reply: b'250-ETRN\r\n'
16:39:26.351458 reply: b'250-ENHANCEDSTATUSCODES\r\n'
16:39:26.351468 reply: b'250-8BITMIME\r\n'
16:39:26.351477 reply: b'250 DSN\r\n'
16:39:26.351490 reply: retcode (250); Msg: b'localhost\nPIPELINING\nSIZE 
1024\nVRFY\nETRN\nENHANCEDSTATUSCODES\n8BITMIME\nDSN'
16:39:26.351832 send: 'QUIT\r\n'
16:39:26.351901 reply: b'221 2.0.0 Bye\r\n'
16:39:26.351923 reply: retcode (221); Msg: b'2.0.0 Bye'
Traceback (most recent call last):
  File "/usr/lib/python3.5/smtplib.py", line 943, in send_message
''.join([from_addr, *to_addrs]).encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xeb' in position 5: 
ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "testsmtp.py", line 12, in 
smtp.send_message(m)
  File "/usr/lib/python3.5/smtplib.py", line 947, in send_message
"One or more source or delivery addresses require"
smtplib.SMTPNotSupportedError: One or more source or delivery addresses require 
internationalized email support, but the server does not advertise the required 
SMTPUTF8 capability
---


With removing the accented character in the sender name :
m['From'] = email.utils.formataddr(("Michael", "mich...@example.com"))

It works :

---
16:42:49.882358 send: 'ehlo localhost\r\n'
16:42:49.882437 reply: b'250-localhost\r\n'
16:42:49.882460 reply: b'250-PIPELINING\r\n'
16:42:49.882474 reply: b'250-SIZE 1024\r\n'
16:42:49.882486 reply: b'250-VRFY\r\n'
16:42:49.882498 reply: b'250-ETRN\r\n'
16:42:49.882509 reply: b'250-ENHANCEDSTATUSCODES\r\n'
16:42:49.882520 reply: b'250-8BITMIME\r\n'
16:42:49.882530 reply: b'250 DSN\r\n'
16:42:49.882543 reply: retcode (250); Msg: b'localhost\nPIPELINING\nSIZE 
1024\nVRFY\nETRN\nENHANCEDSTATUSCODES\n8BITMIME\nDSN'
16:42:49.883439 send: 'mail FROM: size=86\r\n'
16:42:49.886567 reply: b'250 2.1.0 Ok\r\n'
16:42:49.886603 reply: retcode (250); Msg: b'2.1.0 Ok'
16:42:49.88 send: 'rcpt TO:\r\n'
16:42:49.889642 reply: b'250 2.1.5 Ok\r\n'
16:42:49.889676 reply: retcode (250); Msg: b'2.1.5 Ok'
16:42:49.889694 send: 'data\r\n'
16:42:49.889769 reply: b'354 End data with .\r\n'
16:42:49.889827 reply: retcode (354); Msg: b'End data with .'
16:42:49.889843 data: (354, b'End data with .')
16:42:49.889939 send: b'From: Michael \r\nTo: 
=?utf-8?q?Ren=C3=A9?= \r\n\r\n.\r\n'
16:42:49.892726 reply: b'250 2.0.0 Ok: queued as D92C540105\r\n'
16:42:49.892752 reply: retcode (250); Msg: b'2.0.0 Ok: queued as D92C540105'
16:42:49.892764 data: (250, b'2.0.0 Ok: queued as D92C540105')
16:42:49.892786 send: 'QUIT\r\n'
16:42:49.892862 reply: b'221 2.0.0 Bye\r\n'
16:42:49.892896 reply: retcode (221); Msg: b'2.0.0 Bye'
---

As you can see, the sender and recipients names are not sent in SMTP command, 
except in the MIME body, so they should not be used to determine whether 
SMTPUTF8 is required or not.

--
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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread R. David Murray

R. David Murray  added the comment:

Yes, that looks like a bug.  Should be a one line bug fix, plus tests and news 
item if someone wants to make a PR...

--
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



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I think (but not sure) that your feature will be included in 3.8 because 3.7 
has been frozen today :/

@ned do you think you could integrate this functionality in 3.7 or 3.8 ?

--
nosy: +ned.deily

___
Python tracker 

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



[OT] Dutch Reach [was Re: Where has the practice of sending screen shots as source code come from?]

2018-01-30 Thread Steven D'Aprano
On Tue, 30 Jan 2018 05:48:15 -0800, Rustom Mody wrote:

[...]
>> Ah, yes, the Dutch Reach. That would be like the French Pox (which
>> isn't French), the Spanish Flu (that didn't start in Spain), the
>> Jerusalem artichoke (which is neither an artichoke nor from Jerusalem),
>> and the turkey (the bird, which has nothing to do with Turkey, the
>> country).
>> 
>> This technique is neither taught nor commonly used used by the Dutch:
>> apparently some Americans decided that because the Netherlands has a
>> lot of cyclists, they'll say its Dutch.
> 
> reference please

The onus should be on those who claim that the technique actually is used 
by the Dutch. Anecdotally, the Dutch people I've spoken to on the 
Internet had no idea that this technique even existed.

(I happened to know about this because this week's "QI" on the BBC 
happened to mention it, and that show is very popular among the Dutch. 
There's been quite a number of comments on Reddit from Dutch people 
complaining about the QI Elves' lack of fact checking regarding this, as 
well as machine vision.)

Even the organisation who invented the term acknowledge that lots of 
people, *especially* Dutch people, take issue with their claim that the 
technique is required by Dutch law, is taught in Dutch schools, and is 
routinely practiced by the Dutch.

Their answer? To paraphrase their rambling explanation here:

https://www.dutchreach.org/is-the-dutch-reach-really-dutch/

Trust us, it was required by NL law decades ago but isn't
any longer now, it was never given a name and so even though
it is really commonplace and everyone in NL does it, nobody
remembers doing it. And besides, its only young Dutch people
who say that nobody uses this technique there, what do they
know? Old people use it all the time.

(Not a direct quote.)

Yeah, colour me skeptical that this actually ever was a commonplace 
practice in the NL, or anywhere else for that matter.

There's an easy way to find out whether this is commonplace in the NLs. 
Look at Dutch movies and television. How do the characters open their car 
doors?

By the way, anyone who actually has a car: I encourage you to sit in 
driver's seat of your car and try out this "Dutch Reach" maneuver for 
yourself. If you do, you will probably have the same experience that I 
did when I tried it:

It is awkward and clumsy to reach across and open the door with your 
opposite hand, but most importantly, doing so does NOT cause your upper 
body to twist around enough to automatically look behind the car for on-
coming cyclists. I estimate that my head and upper torso rotated no more 
than about 30 degree from "straight ahead".

This effectively and completely undermines the supposed claim that this 
technique makes it *automatic* to look behind you for on-coming cyclists. 
That simply isn't the case. Whether you use the arm closest or furthest 
from the door, you still need to make a conscious effort to either look 
over your shoulder (where your view will be obstructed by the car pillar 
by the door), or consciously check your side mirror.

Guess which one is both easier and more effective?


-- 
Steve

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
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



[issue32476] Add concat functionality to ElementTree xpath find

2018-01-30 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Do you have an example with a test?

Thank you

--
nosy: +matrixise

___
Python tracker 

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



[issue25942] Do not immediately SIGKILL subprocess child processes upon ^C

2018-01-30 Thread Stuart Berg

Change by Stuart Berg :


--
nosy: +stuarteberg

___
Python tracker 

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



  1   2   >