[issue32206] Run modules with pdb

2018-01-05 Thread Nick Coghlan

Nick Coghlan  added the comment:

Thanks for the patch!

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

___
Python tracker 

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



[issue32206] Run modules with pdb

2018-01-05 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 9f1e5f1b7f074e026843a5d70834233a95a6bf9d by Nick Coghlan (Mario 
Corchero) in branch 'master':
bpo-32206: Pdb can now run modules (GH-4752)
https://github.com/python/cpython/commit/9f1e5f1b7f074e026843a5d70834233a95a6bf9d


--

___
Python tracker 

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



[issue29137] Fix fpectl-induced ABI breakage

2018-01-05 Thread Benjamin Peterson

Change by Benjamin Peterson :


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



[issue32443] Add Linux's signalfd() to the signal module

2018-01-05 Thread Nathaniel Smith

Change by Nathaniel Smith :


--
nosy: +njs

___
Python tracker 

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



[issue29137] Fix fpectl-induced ABI breakage

2018-01-05 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 735ae8d139a673b30b321dc10acfd3d14f0d633b by Benjamin Peterson 
(Nathaniel J. Smith) in branch 'master':
bpo-29137: Remove fpectl module (#4789)
https://github.com/python/cpython/commit/735ae8d139a673b30b321dc10acfd3d14f0d633b


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue32441] os.dup2 should return the new fd

2018-01-05 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I would just make a declaration a definition with a dummy value (0?) rather 
than complicating the branches.

--

___
Python tracker 

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



[issue32450] non-descriptive variable name

2018-01-05 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

I would accept a PR to rename the variable in ast.c to "level", but I'm not 
sure why it should matter to you.

--

___
Python tracker 

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



[issue32486] tail optimization for 'yield from'

2018-01-05 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

The original yield from implementation did something like this, but we dropped 
it because it caused debuggability problems. See #14230

--
nosy: +benjamin.peterson
resolution:  -> rejected
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



[issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR'

2018-01-05 Thread Jay Crotts

Jay Crotts  added the comment:

I can create a documentation patch and PR if this still needs doing.

--
nosy: +jcrotts

___
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-01-05 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


--
pull_requests: +4976

___
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-01-05 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


--
pull_requests: +4976, 4977

___
Python tracker 

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



Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread Richard Damon

On 1/5/18 3:11 PM, Kim of K. wrote:

let me tell you...

Once you're done with that school crap, you realize it was the pefect waste of 
time.

At work or in life you need less than 2% of that school crap they funnelled 
into your head.


My experience is that while I found little use for much of the 'facts' 
that I learned in school, there has been a lot of use for the basic 
methods that were learned while processing those facts in school.


--
Richard Damon

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


[issue32500] PySequence_Length() raises TypeError on dict type

2018-01-05 Thread Michał Górny

New submission from Michał Górny :

While debugging PyPy test failure on backports.lzma [1], I've noticed that 
PySequence_Check() on a dict type raises TypeError, e.g.:

  Traceback (most recent call last):
File "test/test_lzma.py", line 273, in test_bad_args
  b"", format=lzma.FORMAT_RAW, filters={})
File 
"/home/mgorny/git/backports.lzma/build/lib.linux-x86_64-3.6/backports/lzma/__init__.py",
 line 463, in decompress
  decomp = LZMADecompressor(format, memlimit, filters)
  TypeError: object of type 'dict' has no len()

The relevant C code is:

  static int
  parse_filter_chain_spec(lzma_filter filters[], PyObject *filterspecs)
  {
Py_ssize_t i, num_filters;

num_filters = PySequence_Length(filterspecs);
...

where filterspecs is the object corresponding to the {} dict in Python snippet.

According to the documentation [2], PySequence_Length() should be 'equivalent 
to the Python expression len(o).' The Python expression obviously does not 
raise TypeError:

  >>> len({})
  0

Therefore, I think that the behavior of PySequence_Length() is a bug, and the 
function should successfully return the dict length instead.

[1]:https://github.com/peterjc/backports.lzma
[2]:https://docs.python.org/3/c-api/sequence.html#c.PySequence_Length

--
components: Extension Modules
messages: 309534
nosy: mgorny
priority: normal
severity: normal
status: open
title: PySequence_Length() raises TypeError on dict type
type: behavior
versions: Python 2.7, Python 3.4, 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



Re: Python Inheritance Terminology

2018-01-05 Thread Ben Finney
Irv Kalb  writes:

> I'm doing some writing for an upcoming course on OOP using Python.  

Welcome, and congratulations for using Python in this work.

> I'd like to know if there are "official" or even standard terms that
> are used to describe a class that is inherited from, and the class
> that is doing the inheriting. From my reading (especially the PSF
> docs.python.org ), it looks like the terms
> would be "base class" and "subclass".

Standard (“official”) terms are most likely to be had from the language
reference . I would recommend
the glossary , but with the
caveat that many flaws have been found in recent years.

> However, in books about Python and other languages, I have also seen the 
> terms:
>
> base class & derived class
> parent class & child class
> superclass & subclass

The only term I take issue with there is “superclass”. In a
multiple-inheritance system, such as provided by Python, the superclass
is *not* necessarily the base class. See this article from 2011
.

> So, are base class & subclass the proper terms?

In my opinion you will be correct to use those terms. Which is not to
say that other terms aren't also good.

-- 
 \“The greatest tragedy in mankind's entire history may be the |
  `\   hijacking of morality by religion.” —Arthur C. Clarke, 1991 |
_o__)  |
Ben Finney

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


Re: Native object exposing buffer protocol

2018-01-05 Thread Ben Finney via Python-list
Rob Gaddi  writes:

> I'd like to create a native Python object that exposes the buffer
> protocol.  Basically, something with a ._data member which is a
> bytearray that I can still readinto, make directly into a numpy array,
> etc.

The “etc.” seems pretty important, there. You want the behaviour of
‘bytearray’ without actually inheriting that behaviour from the
‘bytearray’ type.

So, it seems your options are:

* Enumerate all the things, specifically, that you do want your new type
  to do. Don't hide anything in “etc.”, so that you know exactly what
  behaviours need to be implemented. Implement all those behaviours,
  without benefit of inheriting from ‘bytearray’.

* Inherit from ‘bytearray’, but ameliorate the problems you want to
  avoid. This will require enumerating all those problems, so that you
  can know whether you have avoided them. Don't hide any of them in an
  “etc.”.

> Not the end of the world (the file's less than 2KB), but it seems like
> something that should be doable easily without having to throw around
> a lot of extraneous copies.

I look forward to your report from having tried it :-)

-- 
 \  “A lie can be told in a few words. Debunking that lie can take |
  `\   pages. That is why my book… is five hundred pages long.” —Chris |
_o__)Rodda, 2011-05-05 |
Ben Finney

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


Re: Native object exposing buffer protocol

2018-01-05 Thread breamoreboy
On Saturday, January 6, 2018 at 12:02:18 AM UTC, Rob Gaddi wrote:
> I'd like to create a native Python object that exposes the buffer 
> protocol.  Basically, something with a ._data member which is a 
> bytearray that I can still readinto, make directly into a numpy array, etc.
> 
> I can do it by inheriting the entire thing from bytearray directly, but 
> that gives me a whole lot of methods that are unsuitable for what I'm 
> doing with it, which is reading the contents of a binary file, allowing 
> them to be lightly malleable in memory, and then sending them on to a 
> device.
> 
> Not the end of the world (the file's less than 2KB), but it seems like 
> something that should be doable easily without having to throw around a 
> lot of extraneous copies.
> 
> -- 
> Rob Gaddi, Highland Technology -- www.highlandtechnology.com
> Email address domain is currently out of order.  See above to fix.

Could you use memoryviews instead of making the copies?

--
Kindest regards.

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


[issue30579] Allow traceback objects to be instantiated/mutated/annotated

2018-01-05 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Ping -- anyone up for reviewing PR 4793?

https://github.com/python/cpython/pull/4793

It's pretty straightforward, and I figure better to ping now and beat the 
end-of-month rush :-)

--

___
Python tracker 

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



[issue29137] Fix fpectl-induced ABI breakage

2018-01-05 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Ping -- anyone up for reviewing PR 4789?

https://github.com/python/cpython/pull/4789

It's pretty straightforward, and I figure better to ping now and beat the 
end-of-month rush :-). Also, it has an autoconf refresh in it, so it's likely 
to develop spurious conflicts at some point.

--

___
Python tracker 

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



Python Inheritance Terminology

2018-01-05 Thread Irv Kalb
I'm doing some writing for an upcoming course on OOP using Python.  

I have been doing OOP programming for many years in many different languages, 
and I want make sure that I'm using the appropriate terminology in Python.  I'd 
like to know if there are "official" or even standard terms that are used to 
describe a class that is inherited from, and the class that is doing the 
inheriting.  From my reading (especially the PSF docs.python.org 
), it looks like the terms would be "base class" and 
"subclass".

However, in books about Python and other languages, I have also seen the terms:

base class & derived class
parent class & child class
superclass & subclass

So, are base class & subclass the proper terms?

Thanks,

Irv




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


Native object exposing buffer protocol

2018-01-05 Thread Rob Gaddi
I'd like to create a native Python object that exposes the buffer 
protocol.  Basically, something with a ._data member which is a 
bytearray that I can still readinto, make directly into a numpy array, etc.


I can do it by inheriting the entire thing from bytearray directly, but 
that gives me a whole lot of methods that are unsuitable for what I'm 
doing with it, which is reading the contents of a binary file, allowing 
them to be lightly malleable in memory, and then sending them on to a 
device.


Not the end of the world (the file's less than 2KB), but it seems like 
something that should be doable easily without having to throw around a 
lot of extraneous copies.


--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list


[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-05 Thread Brett Cannon

Change by Brett Cannon :


--
pull_requests: +4975

___
Python tracker 

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



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2018-01-05 Thread STINNER Victor

STINNER Victor  added the comment:

Awesome, thanks!

--

___
Python tracker 

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



[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Martin Panter

Martin Panter  added the comment:

Thanks, although the fact that “Content-Length: 0” doesn’t work kills my theory 
about the proxy.

The “close_connection” flag is also a documented public API of Python: 
.
 According to the rules for framing the message body in 
, the presence of 
“Connection: close” is not important. The server actually shutting down the 
connection is the key. That is why I prefer to explicitly set the flag (if it 
works).

Anyway, your current proposal makes the server send a valid full HTTP response.

--

___
Python tracker 

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



Re: is comp.lang.python still the pinnacle of the py community ?

2018-01-05 Thread Gene Heskett
On Friday 05 January 2018 16:06:34 Kim of K. wrote:

> post frequency is down to a precarious level

Thats because the huge majority of us who are here to learn a tidbit here 
and there, shove that stuff off to a spamassassin training directory, 
where its studied by sa-learn --spam for a second or two, and deleted 
the next day.
.
And your posts are about to be added to that.

Say something helpfull to the python knowledge base, or STFU, this is not 
intended to be your private podium to call the rest of the world 
un-enlightened or names.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32486] tail optimization for 'yield from'

2018-01-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I think this should have been first floated on python-ideas list.  One 
objection is the same as for eliminating tail calls in general: it collapses 
tracebacks.

def g1():
yield from g2()
def g2():
yield 1/0
for i in g1(): pass

Traceback (most recent call last):
  File "F:\Python\a\tem.py", line 7, in 
for i in g1(): pass
  File "F:\Python\a\tem.py", line 2, in g1
yield from g2()
  File "F:\Python\a\tem.py", line 5, in g2
yield 1/0
ZeroDivisionError: division by zero

There was at least some discussion of making 'yield from' internally more 
efficient without actual replacement.  I don't know what the current CPython 
implementation does.

--
nosy: +terry.reedy

___
Python tracker 

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



Re: is comp.lang.python still the pinnacle of the py community ?

2018-01-05 Thread Ian Kelly
On Fri, Jan 5, 2018 at 2:06 PM, Kim of K.  wrote:
>
> post frequency is down to a precarious level

It's true that compared to ten years ago, the quantity of posts here
has diminished by a significant fraction, maybe even by an order of
magnitude. This is still a great place for discussion however, as long
as that discussion is about Python.

If this post is (as it appears to be) just a backhanded way of
complaining that not many are responding to your excessive and
trollish posts, then try making higher-quality posts that are actually
on topic.
-- 
https://mail.python.org/mailman/listinfo/python-list


[OT] Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread Michael Torrie
On 01/05/2018 10:56 AM, Kim of K. wrote:
> wow! 

Yup that's what I said when I read your ramblings.

> even you are defensive about publishing non-working garbage.

Absolutely. You have absolutely no right to make demands of any of the
folks who toss their half-baked personal projects up on sourceforge or
github. What makes you think you do?  This entitlement mentality is
probably the biggest threat to open source software.

Look I can publish non-working garbage if I want. Who are you to say
otherwise?

> btw., I'm trying to fix emojis for so one can use emoji in this group, using a
> python newsreader, of course.

Please, no!  We don't need emoji in this group. Fortunately the vast
majority of posters use plain text (as is the etiquette) and so we don't
have to worry about that kind of nonsense.

Anyway, it sounds like the software you are trying to get running is
defective. Better ask for a refund.

Anyway, time to plonk.

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


[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread William Pickard

William Pickard  added the comment:

I have tried value 0 for "Content-Length" (along with "text/plain" for 
"Content-Type"), it was when I said I tried both "Content-Length" and 
"Content-Type", while I haven't tried directly setting "close_connection" in 
the handler, my solution is based on how "send_error()" works internally, not 
only that, but send_header is public API (by convention) and the "Connection" 
header is part of HTTP 1.1 so it should be documented ( reference: 
https://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html ), so I don't really 
understand why my initial solution is consider "undocumented logic"

--

___
Python tracker 

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



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2018-01-05 Thread Zachary Ware

Zachary Ware  added the comment:

I think so :)

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



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2018-01-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you Zachary! Can this issue be closed now?

--

___
Python tracker 

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



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2018-01-05 Thread Zachary Ware

Zachary Ware  added the comment:

I manually cleared `externals\tcltk64` on that bot some time ago, and it 
appears to be happy now.

--

___
Python tracker 

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



[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-05 Thread R. David Murray

R. David Murray  added the comment:

If you read the traceback the message is "correct" for some definition of 
correct: the right hand side controls the type of the expression, so it is 
objecting to trying to look for the string '%' in a bytes object.

There are probably ways this could be improved, but I'm not sure it is worth 
it, since this is just a general behavior of the 'in' operator.

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



[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Martin Panter

Martin Panter  added the comment:

Sorry William, I forgot the client was waiting to read. But I don’t understand 
why your Connection field (which comes after the status line) allows the Python 
client to read the status line. Perhaps there is some malware scanner, 
firewall, or other proxy that intercepts the HTTP protocol? (I encountered 
something similar at work recently.)

You said “my suggestion will never work”, but did you try setting 
“close_connection” on its own:

def do_GET(self):
self.send_response(HTTPStatus.OK)
self.end_headers()
self.close_connection = True  # Terminate response body to proxy

You tried adding Content-Length, but did you try “Content-Length: 0”:

def do_GET(self):
self.send_response(HTTPStatus.OK)
self.send_header("Content-Length", "0")  # Stop proxy reading body
self.end_headers()

--

___
Python tracker 

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



[issue32499] Add dataclasses.is_dataclass(obj)

2018-01-05 Thread Eric V. Smith

New submission from Eric V. Smith :

See https://mail.python.org/pipermail/python-dev/2018-January/151628.html and 
prior for the discussion.

Add dataclasses.is_dataclass(obj) that returns True if obj is a dataclass class 
or instance, else returns False.

--
assignee: eric.smith
components: Library (Lib)
messages: 309523
nosy: eric.smith
priority: normal
severity: normal
status: open
title: Add dataclasses.is_dataclass(obj)
type: enhancement
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



[issue32458] test_asyncio failures on Windows

2018-01-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

After fresh update and debug rebuild on master(3.7), with Win10 patched last 
night, I got
==
FAIL: test_call_later (test.test_asyncio.test_events.ProactorEventLoopTests)
--
Traceback (most recent call last):
  File "F:\dev\3x\lib\test\test_asyncio\test_events.py", line 290, in 
test_call_later
self.assertTrue(0.08 <= t1-t0 <= 0.8, t1-t0)
AssertionError: False is not true : 0.078861473

I have not seen this before.  Four subsequent runs passed.

--
nosy: +terry.reedy

___
Python tracker 

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



Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread Igor Korot
Hi,

On Fri, Jan 5, 2018 at 2:11 PM, Kim of K.  wrote:
> Igor Korot wrote:
>
>> Hi,
>>
>> On Fri, Jan 5, 2018 at 12:58 PM, John Gordon  wrote:
>>> In <15151695.348096.18338899180412170014@welt.netz> "Kim of K." 
>>>  writes:
>>>
>>>
 In other words: most sites like SF and github offer tons of crap.
 download and break is the overwhelming theme here.
>>>
 why is no one complaining ?
>>>
>>> 90% of everything is crap.  Why should software be any different?
>>
>> Moreover, most of the time life sucks.
>> Every morning you have to go to school/work instead of staying home
>> and enjoying the life.
>> And you are lucky if the school/work is in the same city where you family 
>> is...
>>
>> Thank you.
>
>
> let me tell you...
>
> Once you're done with that school crap, you realize it was the pefect waste 
> of time.
>
> At work or in life you need less than 2% of that school crap they funnelled 
> into your head.

I seriously doubt you had the same opinion when you were 7 y.o.
I meant school as "junior/middle/high school/university/college"
school, because you still have to wake up early in the morning and go
to school.

So yes, life sucks most of the time anyway...

Thank you.

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


[issue32450] non-descriptive variable name

2018-01-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

'ndots' is an internal name in the import-from branch of the import statement 
handler.  It seems reasonable in that context.  'level' is part of the public 
api for the ImportFrom node class, and cannot be changed as such.  It is also 
the parameter that receives the ndot value in the ImportFrom call, to be 
assigned to the level attribute.  Making the name switch in the call is at 
least as reasonable as in the assignment.  I am not the expert here, but I 
would be inclined to rejected this as not worth the code churn.

--
nosy: +benjamin.peterson, brett.cannon, ncoghlan, terry.reedy, yselivanov

___
Python tracker 

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



[issue17607] missed peephole optimization (unnecessary jump at end of function after yield)

2018-01-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This optimization already is implemented in 3.5+. Actually it is implemented as 
a part of code generation, not a peepholer.

--
nosy: +serhiy.storchaka
resolution:  -> out of date
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



[issue32448] subscriptable

2018-01-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I agree that a better message would be nice.  But compiling 'a.b[c]' breaks the 
expression apart into the equivalent of 't=a.b; t[c]', where 't' is an 
anonymous reference, so as David notes, there is no 'name' left to display.  We 
don't have a 'not possible resoluton, so "won't fix (because not possible)" 
seems closest.

--
nosy: +terry.reedy
resolution:  -> wont fix
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: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread Igor Korot
Hi,

On Fri, Jan 5, 2018 at 12:58 PM, John Gordon  wrote:
> In <15151695.348096.18338899180412170014@welt.netz> "Kim of K." 
>  writes:
>
>
>> In other words: most sites like SF and github offer tons of crap.
>> download and break is the overwhelming theme here.
>
>> why is no one complaining ?
>
> 90% of everything is crap.  Why should software be any different?

Moreover, most of the time life sucks.
Every morning you have to go to school/work instead of staying home
and enjoying the life.
And you are lucky if the school/work is in the same city where you family is...

Thank you.

>
> --
> John Gordon   A is for Amy, who fell down the stairs
> gor...@panix.com  B is for Basil, assaulted by bears
> -- Edward Gorey, "The Gashlycrumb Tinies"
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread Chris Angelico
On Sat, Jan 6, 2018 at 6:02 AM, John Gordon  wrote:
> In <151517608506.368831.5093080329614058603@welt.netz> "Kim of K." 
>  writes:
>
>> print(emo('now you see emos'))
>> OF COURSE THIS SHIT DOES NOT WORK.
>
> What device did you run this on?  Your average terminal window isn't
> going to support emojis...
>

I dunno about yours. Mine does. It's the default XFCE terminal on
Debian GNU/Linux. It doesn't respect the Unicode colour designations
(since it does colour in other ways and it would conflict), but AFAIK
it supports everything else.

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


[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-05 Thread stein-k

New submission from stein-k :

urllib.parse.unquote(b'abc%20def')
...
TypeError: a bytes-like object is required, not 'str'

--
components: Library (Lib)
messages: 309517
nosy: stein-k
priority: normal
severity: normal
status: open
title: urllib.parse.unquote raises incorrect errormessage when string parameter 
is bytes
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread John Gordon
In <151517608506.368831.5093080329614058603@welt.netz> "Kim of K." 
 writes:

> print(emo('now you see emos'))
> OF COURSE THIS SHIT DOES NOT WORK.

What device did you run this on?  Your average terminal window isn't
going to support emojis...

-- 
John Gordon   A is for Amy, who fell down the stairs
gor...@panix.com  B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

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


[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread William Pickard

William Pickard  added the comment:

It hangs for me on Windows 10 Professional running on a MSI gaming laptop for 
debug and PGO builds (Python 3.6)

--

___
Python tracker 

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



[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Today, at least, python -m test -v  test_httpservers does not hang for me on 
any of 3.5, 3.6, or  3.7, installed or repository debug.  I don't know if the 
offending test was just disabled or somehow fixed.

--

___
Python tracker 

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



Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread John Gordon
In <15151695.348096.18338899180412170014@welt.netz> "Kim of K." 
 writes:


> In other words: most sites like SF and github offer tons of crap.
> download and break is the overwhelming theme here.

> why is no one complaining ?

90% of everything is crap.  Why should software be any different?

-- 
John Gordon   A is for Amy, who fell down the stairs
gor...@panix.com  B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

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


[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread David Edelsohn

David Edelsohn  added the comment:

The AIX buildbots has been exhibiting testsuite failures, but not build 
(compile) failures. The buildbots do not visibly distinguish between the two 
cases in a strong manner.

We can disable / expect failure for the few, additional testcases on AIX so 
that the buildbots will report "success" to make new failures more obvious.

--

___
Python tracker 

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



[issue32495] Adding Timer to multiprocessing

2018-01-05 Thread Jay Crotts

Jay Crotts  added the comment:

I think your three reasons make sense, I've only found threading.Timer helpful 
in pretty trivial cases.

Do you think a more flexible or efficient Timer class would be useful?

--

___
Python tracker 

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



[issue30541] Add restricted mocks to the python unittest mocking framework

2018-01-05 Thread Paul Ganssle

Change by Paul Ganssle :


--
pull_requests: +4974

___
Python tracker 

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



[issue28416] defining persistent_id in _pickle.Pickler subclass causes reference cycle

2018-01-05 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread Grant Edwards
On 2018-01-05, Kim of K.  wrote:

> In other words: most sites like SF and github offer tons of crap.
> download and break is the overwhelming theme here.
>
> why is no one complaining ?

Because complaining doesn't have any effect?  If you care, shut up and
fix something.

-- 
Grant Edwards   grant.b.edwardsYow! !  I'm in a very
  at   clever and adorable INSANE
  gmail.comASYLUM!!

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


Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread Larry Martell
On Fri, Jan 5, 2018 at 11:27 AM, Kim of K.  wrote:
>
> "Background
>
> We feel that the world still produces way too much software that is
> frankly substandard. The reasons for this are pretty simple: software
> producers do not pay enough attention [...]"
>
>
> quote from http://texttest.sourceforge.net/index.php?page=about
>
>
> In other words: most sites like SF and github offer tons of crap.
> download and break is the overwhelming theme here.
>
> why is no one complaining ?

You want to complain? Look at these shoes. I've only had them three
weeks and the heels are worn right through.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Paul Ganssle

Paul Ganssle  added the comment:

Sorry, forgot to include the link to the dateutil implementation of the 
fold-resolution code: https://github.com/dateutil/dateutil/pull/517/files

--

___
Python tracker 

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



[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Paul Ganssle

Paul Ganssle  added the comment:

By the way, one possibly significant problem with this interface is that it 
would tend to encourage the use of static timezone offsets rather than rule 
sets as intended by `tzinfo`. The main problem is that a simple mapping between 
tzname and tzinfo (whether done with a Mapping or a callable) will actually 
lose information about the fold that is encoded in the chosen tzname.

In dateutil, I solved this problem by attaching the timezone object and 
checking whether the `.tzname()` of the created datetime matches the string it 
was parsed from, and if not, set fold=1 and check again - if that one matches, 
use fold=1, otherwise just return it with fold=0. This is obviously a heuristic 
metric that will not always work.

Two possible more general solutions to this problem:

1. have a variant of `strptime` that returns a `datetime` and the contents of 
`%Z` and let users or third party libraries handle converting the string into a 
timezone and attaching it to the datetime.
2. have `tzinfos` take a callable like `handle_tzinfo(dt, tzstr)` which returns 
the localized datetime.
3. have separate `tzinfos` and `apply_tzinfo` arguments, the first generating 
the `tzinfo` object, the second of the format `apply_tzinfo(dt, tz)` - if the 
second one doesn't exist, the default implementation is just `lambda dt, tz: 
dt.replace(tzinfo=tz)` (or equivalent)

#1 is a pretty significant (and possibly awkward) change to the interface, and 
#2 makes the implementation of these mappings less convenient for the 
downstream users, but is probably the most elegant from an API perspective. #3 
is a somewhat reasonable marriage of #1 and #2, but it's ugly and I'm fairly 
certain it would lead to a lot of buggy code out there from people who don't 
realize why you would need to implement the apply function.

--

___
Python tracker 

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



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

The compilation error occurs only on the master branch, issue 32143 is the 
enhancement that is the  initial cause of this problem. This went unnoticed 
when issue 32143 was resolved because the AIX buildbots were already failing at 
that time for another reason.

--

___
Python tracker 

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



[issue32471] Add an UML class diagram to the collections.abc module documentation

2018-01-05 Thread Ivan Levkivskyi

Change by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue32473] Readibility of ABCMeta._dump_registry()

2018-01-05 Thread Ivan Levkivskyi

Change by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Paul Ganssle

Paul Ganssle  added the comment:

This is essentially what the `tzinfos` argument to `dateutil.parser.parse` 
does. I do think something *like* this is the only reasonable way to handle 
%Z->tzinfo mappings.

In `dateutil` 
(https://dateutil.readthedocs.io/en/latest/parser.html#dateutil.parser.parse), 
you can either pass a mapping or callable. Most of the problems we have in 
dateutil relate to the fact that we're both inferring what should or should not 
be interpreted as a time zone *and* passing it to the mapping or callable. 
Given that the first problem is solved by the format specifier already having 
an option for %Z, the implementation of this would be much easier.

I think the options for how this could be implemented are:

1. Mapping only
2. Callable only
3. Mapping or callable

Callable-only will probably lead to plenty of problems, since there's *already* 
a problem in this bug report, which is that `pytz.timezone` evidently doesn't 
do what Arjan thinks it does, because that function only *happens* to work. It 
would not work with, say, `CST` or `PST`. That said, callable is the most 
versatile way to do it, and if we don't include it, then people will probably 
end up having to work around it by creating mappings whose `.get` calls 
arbitrary functions.

#1 is probably the least convenient and #3 is the most convenient. Either way, 
I'd say that the primary documented interface should be mappings, since that's 
least error-prone (these mappings could be curated by third party libraries for 
a given local context). An advantage of using mappings is that if we ever have 
a C implementation of strptime, it can have a fast evalution path for when the 
mapping is a `Dict`.

--
nosy: +belopolsky, p-ganssle

___
Python tracker 

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



Re: has sourceforge exposed the dirty little secret ?

2018-01-05 Thread Ian Kelly
On Fri, Jan 5, 2018 at 9:27 AM, Kim of K.  wrote:
>
> "Background
>
> We feel that the world still produces way too much software that is
> frankly substandard. The reasons for this are pretty simple: software
> producers do not pay enough attention [...]"
>
>
> quote from http://texttest.sourceforge.net/index.php?page=about
>
>
> In other words: most sites like SF and github offer tons of crap.
> download and break is the overwhelming theme here.
>
> why is no one complaining ?

It is what it is. What would be the utility of complaining about it?
That's not going to fix anything.

And what does this have to do with Python?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Re: Progress migrating cffi and pycparser to libclang

2018-01-05 Thread Armin Rigo
Hi Etienne,

On 5 January 2018 at 10:15, Etienne Robillard  wrote:

> Forwarding  this thread to the CFFI developers...
>
If you're asking whether we could add libclang as a dependency to CFFI, the
answer is no, sorry.

I feel that I've already explained exactly this to you several times in
private e-mails, so I'm writing down this fact here on the public
python-cffi mailing list.  Please stop asking the same question.

For reference, here's my answer again.  CFFI is meant to be used in a
certain way.  I know from experience that a few people keep thinking about
it in a different way---sometimes for good reasons: it is tedious to wrap a
very large library even if it is easy to copy-paste-tweak individual
function definitions.  So to automate the process these people usually want
to parse real .h files, using libclang or better pycparser integration or
something else; and that's cool.  As I said there are already third-party
projects that try to do something similar.  Usually it is never completely
general, but more focused on a particular style of .h files coming from a
particular large project.  Maybe you'll run into similar issues and make
something that works in your case but not in others.  Or maybe you'll
manage to make it general enough.  In all cases this won't be included
inside CFFI, but could nevertheless be a successful separate project.
Please think about it as a project *above* CFFI, maybe something you'll
import and use inside a CFFI build script in order to provide content to
ffi.cdef().


A bientôt,

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


[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread STINNER Victor

STINNER Victor  added the comment:

A compilation error is a blocking bug. It is short and short, it can be
backported to 2.7 and 3.6 no? Is ALL_SOURCE defined vy default?

--

___
Python tracker 

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



[issue17972] inspect module docs omits many functions

2018-01-05 Thread R. David Murray

R. David Murray  added the comment:

Just warnings, no docs.  We've done this before for other helper functions, but 
it is always a judgement call whether it is worth the churn.  I defer to those 
people who have actually done work on the module for the answer to that 
question.

--

___
Python tracker 

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



Re: Linux/Windows GUI programming: GUI-fy a CLI using pyInstaller

2018-01-05 Thread Kevin Walzer

On 1/1/18 11:45 AM, X. wrote:

Ulli Horlacher:

I have to transfer a python 2.7 CLI programm into one with a (simple) GUI.
The program must run on Linux and Windows and must be compilable with
pyinstall, because I have to ship a standalone windows.exe
Any kind of installer is not acceptable.

Reading https://github.com/pyinstaller/pyinstaller/wiki/Supported-Packages
supported GUI packages are PyGTK, PyQt4, PyQt5, wxPython
I have tested tkinter by myself and it works, too.
I do not like GTK and Qt, because they are too complex.

I want to do VERY simple things and I prefer a simple GUI toolkit :-)



me too !



Try easygui:

https://pypi.python.org/pypi/easygui


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


[ANN] iPOPO 0.7.0

2018-01-05 Thread Thomas Calmant
Hello, 

I'm happy to announce that iPOPO v0.7.0 has just been released!


What is iPOPO
=

iPOPO is a Service-Oriented Component Model (SOCM) based on Pelix,
a dynamic service platform. Both are inspired on two popular Java
technologies for the development of long-lived applications:
the iPOJO component model and the OSGi Service Platform.
iPOPO enables to conceive long-running and modular IT services.

It is based on the concepts specified by OSGi:
  - Bundle: a Python module imported using Pelix and associated to a
  context. A bundle has a life-cycle (install, start, updated, stop,
  uninstall)
  - Service: a Python object registered in a service registry,
  associated to a specification and to properties.
  - Component: the instance of a class described/manipulated by iPOPO
  decorators

Components are bound together by the specification(s) of the service(s)
they provide. The required services are injected into components by iPOPO.

For more information about those concepts, see
https://ipopo.readthedocs.io/en/latest/refcards/index.html#refcards


iPOPO provides many services out-of-the-box, like an HTTP server,
local and remote shell, remote services...


iPOPO is released under the terms of Apache Software License 2.0


What's new in 0.7.0
===

This version mainly adds:
* Prototype Service Factories
* Automatic release of consumed services when a bundle stops.
This will avoid some stale references when using service
factories.
   
WARNING: This is an important change in behavior, which might
break some projects which use stale references to pass
information from one bundle version to another during an
update (which is a bad way to do it).

* Deprecation handling of the imp package
* Added a Framework.delete() method to avoid the need to know
  about the FrameworkFactory class.

This release also removes some Python 2.6 compatibility code that was
remaining and which is not necessary anymore, as this version of
Python is not supported anymore by iPOPO.

Due to the behavior change caused by the automatic release of
consumed services, this release is version 0.7.0 instead of 0.6.6,
as it could break some existing code.


What's coming in 2018
=

2018 will be the year when iPOPO will get its Web Console. It will be
developed as a separate project (in fact, the project already exists
but is staled).

This might also be the year when Remote Service Admin will be added
to iPOPO, thanks to Scott Lewis!
See https://github.com/tcalmant/ipopo/issues/60 for more information.


You can take a look at the documentation at https://ipopo.readthedocs.io/
iPOPO is available on PyPI: https://pypi.python.org/pypi/iPOPO
Source is available on GitHub: https://github.com/tcalmant/ipopo
Feel free to send feedback on your experience of Pelix/iPOPO, via the mailing 
lists:

User list : http://groups.google.com/group/ipopo-users
Development list : http://groups.google.com/group/ipopo-dev


Have fun! and Happy New Year!
Thomas
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


ANN: Pandas v0.22.0 released

2018-01-05 Thread Tom Augspurger
Hi all,

I'm happy to announce pandas 0.22.0 has been released.

This is a major release from 0.21.1 and includes a single, API-breaking
change. We recommend that all users upgrade to this version after carefully
reading the release note.

The only changes are:

   - The sum of an empty or all-*NA* Series is now 0
   - The product of an empty or all-*NA* Series is now 1
   - We’ve added a min_count parameter to .sum() and .prod() controlling
   the minimum number of valid values for the result to be valid. If fewer
   than min_count non-*NA* values are present, the result is *NA*. The
   default is 0. To return NaN, the 0.21 behavior, use min_count=1.

See the pandas 0.22.0 whatsnew

overview for further explanation of all the places in the library this
affects.

- Tom

---

*What is it:*

pandas is a Python package providing fast, flexible, and expressive data
structures designed to make working with “relational” or “labeled” data
both easy and intuitive. It aims to be the fundamental high-level building
block for doing practical, real world data analysis in Python.
Additionally, it has the broader goal of becoming the most powerful and
flexible open source data analysis / manipulation tool available in any
language.

*How to get it:*

Source tarballs and windows/mac/linux wheels are available on PyPI (thanks
to Christoph Gohlke for the Windows wheels, and to Matthew Brett for
setting up the Mac / Linux wheels).
Conda packages are available on the default and conda-forge channels.

*Issues:*

Please report any issues on our issue tracker: https://github.com/py
data/pandas/issues
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


pytest 3.3.2

2018-01-05 Thread Bruno Oliveira
pytest 3.3.2 has just been released to PyPI.

This is a bug-fix release, being a drop-in replacement. To upgrade::

  pip install --upgrade pytest

The full changelog is available at
http://doc.pytest.org/en/latest/changelog.html.

Thanks to all who contributed to this release, among them:

* Anthony Sottile
* Antony Lee
* Austin
* Bruno Oliveira
* Florian Bruhin
* Floris Bruynooghe
* Henk-Jaap Wagenaar
* Jurko Gospodnetić
* Ronny Pfannschmidt
* Srinivas Reddy Thatiparthy
* Thomas Hisch


Happy testing,
The pytest Development Team
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


tkinter toolbox version 2 posted

2018-01-05 Thread John Oakey
Big Daddy's Python tkinter Journeyman Reference, version JR2, has been posted 
on www.wikipython.com.
When version 1 was posted we knew there was stuff left out but we had made a 
committment to just 8 pages – 4 pages front and back. It turns out there is a 
physics problem involved here – you just can’t stuff 10 pounds of poop in a 5 
pound sack. 
So version JR2 has expanded to 10 pages and now includes a small number of 
corrections – but a massively reformated attributes table with the additon of a 
notes column, a completely reformated methods table, almost 2 pages of 
operational commands that were missing completely, lots more vetted examples, 
almost a page on adding tkk, plus several more helpful filler items. If you 
think that sounds like a LOT more than just 2 additional pages, well, just take 
a look. As always, no registration, no fees, no charges, no cookies, no email 
list, no contribution accepted and no ads (for now). Toolboxes download from 
GitHub - for safety and larger file sizes. Comments and suggestions 
appreciated; I prefer email at oakey.j...@yahoo.com.
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


ANN: psutil 5.4.3 released

2018-01-05 Thread Giampaolo Rodola'
Hello all,
I'm glad to announce the release of psutil 5.4.3:
https://github.com/giampaolo/psutil

About
=

psutil (process and system utilities) is a cross-platform library for
retrieving information on running processes and system utilization (CPU,
memory, disks, network) in Python. It is useful mainly for system
monitoring, profiling and limiting process resources and management of
running processes. It implements many functionalities offered by command
line tools such as: ps, top, lsof, netstat, ifconfig, who, df, kill, free,
nice, ionice, iostat, iotop, uptime, pidof, tty, taskset, pmap. It
currently supports Linux, Windows, OSX, Sun Solaris, FreeBSD, OpenBSD,
NetBSD and AIX, both 32-bit and 64-bit architectures, with Python versions
from 2.6 to 3.6. PyPy is also known to work.

What's new
==

*2018-01-01*

**Enhancements**

- #775: disk_partitions() on Windows return mount points.

**Bug fixes**

- #1193: pids() may return False on OSX.

Links
=

- Home page: https://github.com/giampaolo/psutil
- Download: https://pypi.python.org/pypi/psutil
- Documentation: http://psutil.readthedocs.io
- What's new: https://github.com/giampaolo/psutil/blob/master/HISTORY.rst

--

Giampaolo - http://grodola.blogspot.com
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


ANN: SfePy 2017.4

2018-01-05 Thread Robert Cimrman

I am pleased to announce release 2017.4 of SfePy.

Description
---

SfePy (simple finite elements in Python) is a software for solving systems of
coupled partial differential equations by the finite element method or by the
isogeometric analysis (limited support). It is distributed under the new BSD
license.

Home page: http://sfepy.org
Mailing list: https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
Git (source) repository, issue tracker: https://github.com/sfepy/sfepy

Highlights of this release
--

- basic support for penalty-based contacts
- support for user-defined contexts in all solvers and preconditioners
- new example: dispersion analysis of heterogeneous periodic materials

For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1
(rather long and technical).

Cheers,
Robert Cimrman

---

Contributors to this release in alphabetical order:

Robert Cimrman
Jan Heczko
Lubos Kejzlar
Jan Kopacka
Vladimir Lukes
Matyas Novak
--
https://mail.python.org/mailman/listinfo/python-announce-list

   Support the Python Software Foundation:
   http://www.python.org/psf/donations/


PyScripter 3.1.0 released

2018-01-05 Thread pyscripter
PyScripter is a free and open-source Python Integrated Development 
Environment (IDE) created with the ambition to become competitive in 
functionality with commercial Windows-based IDEs available for other 
languages.  It is feature-rich, but also light-weight. 

The major new feature of this release is code-folding support.

See: 
Announcement: 
https://pyscripter.blogspot.gr/2017/12/pyscripter-version-310-released.html 
Features: https://github.com/pyscripter/pyscripter/wiki/Features 
Downloads: https://sourceforge.net/projects/pyscripter/files
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[issue32493] UUID Module - FreeBSD build failure

2018-01-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Michael, does AIX have uint32_t?  If so, we could happily drop the unsigned32 
reference.

--

___
Python tracker 

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



[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Arjan Keeman

Change by Arjan Keeman :


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

___
Python tracker 

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



[issue32493] UUID Module - FreeBSD build failure

2018-01-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The AIX-specific code was contributed by Michael Felt in issue32399.

--
nosy: +Michael.Felt, pitrou

___
Python tracker 

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



[issue31699] Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error

2018-01-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This non-trivial issue has been fixed now, thanks to Thomas' patch.  Thank you 
Thomas!

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

___
Python tracker 

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



[issue32441] os.dup2 should return the new fd

2018-01-05 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

gcc is a little bit lost and prints now the following (false) warning:

gcc -pthread -Wno-unused-result -Wsign-compare -g -Og -Wall -Wstrict-prototypes 
   -std=c99 -Wextra
-Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration   -I. -I./Include-DPy_BUILD_CORE  -c 
./Modules/posixmodule.c -o Modules/posixmodule.o./Modules/posixmodule.c: In 
function ‘os_dup2_impl’:
./Modules/posixmodule.c:7785:9: warning: ‘res’ may be used uninitialized in 
this function [-Wmaybe-uninitialized]
 int res;
 ^~~


The following change fools gcc that does not print anymore the warning:

diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 47b79fcc79..90d73daf97 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -7845,7 +7845,7 @@ os_dup2_impl(PyObject *module, int fd, int fd2, int 
inheritable)
 }
 }
 
-if (inheritable || dup3_works == 0)
+if (inheritable || (!inheritable && dup3_works == 0))
 {
 #endif
 Py_BEGIN_ALLOW_THREADS


The change does not modify the behavior:
* dup3_works == 0 is equivalent to ((inheritable && dup3_works == 0) || 
(!inheritable && dup3_works == 0))
* (inheritable && dup3_works == 0) is always false
* hence dup3_works == 0 is equivalent to (!inheritable && dup3_works == 0)

--
nosy: +xdegaye

___
Python tracker 

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



[issue32497] datetime.strptime creates tz naive object from value containing a tzname

2018-01-05 Thread Arjan Keeman

New submission from Arjan Keeman :

Consider the following:

tz_naive_object = datetime.strptime("2018-01-05 13:10:00 CET", "%Y-%m-%d 
%H:%M:%S %Z")

Python's standard library is not capable of converting the timezone name CET to 
a tzinfo object. Therefore the case made above returns a timezone naive 
datetime object.

I propose to add an extra optional argument to _strptime.py's 
_strptime_datetime function, and to datetime.strptime: 
tzname_to_tzinfo:Optional[Callable[[str],Optional[tzinfo]]]=None. This 
parameter can be set with a function that accepts the timezone name and returns 
a tzinfo object or None (like pytz.timezone). None will mean that a timezone 
naive object will be created.

Usage:
tz_aware_object = datetime.strptime("2018-01-05 13:10:00 CET", "%Y-%m-%d 
%H:%M:%S %Z", pytz.timezone)

--
components: Library (Lib)
messages: 309502
nosy: akeeman
priority: normal
severity: normal
status: open
title: datetime.strptime creates tz naive object from value containing a tzname
type: enhancement
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



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Thanks Michael for your contribution in fixing this issue.

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



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset 502d551c6d782963d26957a9e5ff1588946f233f by xdegaye (Michael 
Felt) in branch 'master':
bpo-32390: Fix compilation failure on AIX after f_fsid was added to 
os.statvfs() (#4972)
https://github.com/python/cpython/commit/502d551c6d782963d26957a9e5ff1588946f233f


--

___
Python tracker 

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



[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread William Pickard

William Pickard  added the comment:

Martin, your suggestion will never work as if you look at the trace back posted 
terry.reedy and my test print statements, both the client and server get stuck 
waiting to read data their respective socket, hence the deadlock. Adding the 
header "Connection" with value of "close" is logic taken from the method 
"send_error()" which is what test_err executes (same test class), that header 
along with send_error() adding the Content-Type and Content-Length headers, 
those headers are what is different between do_ERROR and do_GET, I've already 
tried locally having do_GET set both Content-Type and Content-Length headers 
without the Connection header, no difference (deadlock continued).

--

___
Python tracker 

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



[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Martin Panter

Martin Panter  added the comment:

In the server, the send_header("Connection", "close") call sets the 
“close_connection” flag. This shuts down the connection once “do_GET” returns. 
Without the flag set, the server will wait and read another request.

If you want the server to shut the connection down, I suggest to be explicit in 
setting “close_connection”. It should work even if no “Connection: close” 
appears in the HTTP protocol. The special behaviour of “send_header” I think 
you are relying on is not documented.

On my Linux computer with the original code, I think the client shuts the 
connection down. This causes the server to see an empty “raw_requestline” and 
return from “handle_one_request”. It returns to “serve_forever” where it polls 
the “__shutdown_request” flag and sees that it should stop.

The client shuts down the connection only because of subtleties in how the HTTP 
client manages the socket and how sockets are garbage collected. The response 
does not have Content-Length nor Transfer-Encoding fields, and would be 
terminated by the server shutting the connection down. So the HTTPConnection 
object cannot reuse the TCP connection and hands ownership to the HTTPResponse 
object returned by “getresponse”. Since this object is not saved anywhere, it 
gets garbage collected, which closes the socket and shuts the connection down. 
But perhaps on Windows the shutdown doesn’t happen, or perhaps the garbage 
collector is too slow.

If I am right, closing the HTTPResponse object would also fix the deadlock. It 
is good practice to close the underlying socket anyway:

with support.captured_stderr() as err:
self.con.request('GET', '/')
res = self.con.getresponse()

# Shut down connection to stop the server reading from it
res.close()
self.con.close()

--

___
Python tracker 

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



[issue31699] Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error

2018-01-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 94459fd7dc25ce19096f2080eb7339497d319eb0 by Antoine Pitrou 
(Thomas Moreau) in branch 'master':
bpo-31699 Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling 
error (#3895)
https://github.com/python/cpython/commit/94459fd7dc25ce19096f2080eb7339497d319eb0


--
nosy: +pitrou

___
Python tracker 

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



sendline buffer

2018-01-05 Thread Iranna Mathapati
Hi Team,

I have faced fallowing issue::

 dev.sendline("*show version*")  <<< its printing "show version output"
 dev.sendline("*show module*")   <<< its printing "shoe module output"

*Runing again*

 dev.sendline("show veriosn")   <<< its runing 2nd time again

 dev.before  *output is not consistence means some time it printing
"shoe version output" or some time its printing only "show module output"*

can you please let me know , how to resolve the issue.


Thanks,
Iranna M
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue17972] inspect module docs omits many functions

2018-01-05 Thread Paul Rudin

Paul Rudin  added the comment:

Documenting and generating a deprecation warning also makes them part of the 
documented public api. Or are you suggesting just the warning without including 
in the documentation?

Incidentally, there are also the classes BlockFinder and EndOfBlock, which are 
helpers for getblock and presumably not intended for public consumption.

--

___
Python tracker 

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



[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2018-01-05 Thread Eryk Sun

Eryk Sun  added the comment:

For extra measure, you may want to normalize `prefix` prior to calculating its 
length n in gotlandmark(). Then it would be reliable to truncate it via 
`prefix[n] = '\0'` after joining with `landmark`. Or at least add a comment 
there or in the calling function, search_for_prefix(), that gotlandmark assumes 
the current value of `prefix` is a canonical, normalized path.

--

___
Python tracker 

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



Fwd: Re: Progress migrating cffi and pycparser to libclang

2018-01-05 Thread Etienne Robillard

Forwarding  this thread to the CFFI developers...

Re Paul: Thanks for your feedback.

My intended audience are developers who can use hg to fetch/build source 
code without pip.


Best regards,

Etienne


 Message transféré 
Sujet : Re: Progress migrating cffi and pycparser to libclang
Date :  Thu, 4 Jan 2018 21:25:27 +
De :Paul Moore 
Pour :  Etienne Robillard 
Copie à :   Python 



On 4 January 2018 at 21:02, Etienne Robillard  wrote:

As a fork/extension for cffi, I have no particular opinion (I'm
unlikely to ever use it). But the advantage of pycparser is that it's
cross-platform and pure Python, so I doubt this will be acceptable for
inclusion into CFFI itself.


CFFI/pycparser definitely need to be patched to support parsing standard C
directives like #define and #include in the ffi.cdef() function.

The easiest solution is to migrate the internal parsing code to libclang, a
state-of-the art C/C++ compiler based on LLVM.


I would strongly object to adding a dependency to cffi that couldn't
be automatically installed by pip as part of standard dependency
resolution (i.e., a PyPI hosted Python project with wheels available
for all common platforms - Linux, Mac OS and Windows). But ultimately
if you're proposing this as a change to cffi, you should be getting
the opinions of the cffi devs, not just asking on this list. (I notice
you have posted to the cffi mailing list, but haven't had any response
yet).

Paul

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


[issue32495] Adding Timer to multiprocessing

2018-01-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The threading.Timer class is in my experience little used, for two reasons:
1) it's not very flexible (no periodic calls, no restart...)
2) it's not efficient (as it creates a new thread for each timer)
3) (third optional reason) many applications needing time management actually 
use an event loop of some kind, as the need for time management is often 
coupled with the requirement to do network I/O

A hypothetical multiprocessing.Timer would have the same drawbacks as 
threading.Timer, the inefficiency being of course much worse.

--

___
Python tracker 

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