[issue34969] Add --fast, --best to the gzip CLI

2018-10-12 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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

___
Python tracker 

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



[issue34969] Add --fast, --best to the gzip CLI

2018-10-12 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

the gzip module has a CLI but this one does not allow to specify the 
compression method (slow, fast)

--
assignee: matrixise
messages: 327626
nosy: matrixise
priority: normal
severity: normal
status: open
title: Add --fast, --best to the gzip CLI
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



[issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault

2018-10-12 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

Sorry, after reading the original issue carefully, I realize that my issue is 
slightly different. In my case running test_idle only crashes, and it crashes 
before the first test in test_idle, not in test_writelines.

I copied the Arch Linux packaging script mentioned by Eli [2], modified it so 
that test_idle, test_tk and test_ttk_guionly are not skipped, and added a 
dependency ttf-font. With the modified PKGBUILD, the only failing test is 
test_ssl. I guess the issue has been fixed.

Erich Eckner, could you still reproduce the original crash?

[1] 
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/python2

--

___
Python tracker 

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



[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-12 Thread Ned Deily


Change by Ned Deily :


--
priority: normal -> deferred blocker

___
Python tracker 

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



[issue34909] StrEnum subclasses cannot be created

2018-10-12 Thread Ned Deily


Ned Deily  added the comment:

Can you please merge a NEWS item for this issue using blurb since it is a 
user-visible problem?  I'll cherry-pick it into the 3.7.1 final.

--
priority: release blocker -> deferred blocker
stage: resolved -> commit review
status: closed -> open

___
Python tracker 

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



[issue34521] Multiple tests (test_socket, test_multiprocessing_*) fail due to incorrect recvmsg(2) buffer lengths, causing failures on FreeBSD CURRENT

2018-10-12 Thread Ned Deily


Ned Deily  added the comment:

Shouldn't there be a NEWS entry for this change since the change seems to be to 
Lib/multiprocessing and not just its tests?

--
nosy: +ned.deily

___
Python tracker 

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



[issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline

2018-10-12 Thread Ned Deily


Ned Deily  added the comment:


New changeset 5d8ef8bc3f7307cd15f9d82ad4846e82b498ae88 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-34783:  Disable test_nonexisting_script for macOS framework builds 
(GH-9831) (GH-9832)
https://github.com/python/cpython/commit/5d8ef8bc3f7307cd15f9d82ad4846e82b498ae88


--

___
Python tracker 

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



[issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline

2018-10-12 Thread Ned Deily


Ned Deily  added the comment:

Re-opening. The new test_cmd_line_script fails on macOS framework builds 
because the test case assumes that the file name in sys.executable will appear 
in the error message.  For macOS framework builds, sys.executable is the file 
name of the stub launcher and its file name bears no relationship to the file 
name of the actual python executable:

$ python3.7 -c 'import sys;print(sys.executable)'
/usr/local/bin/python3.7
$ python3.7 -m test test_cmd_line_script
Run tests sequentially
0:00:00 load avg: 1.12 [1/1] test_cmd_line_script
test test_cmd_line_script failed -- Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/test_cmd_line_script.py",
 line 648, in test_nonexisting_script
self.assertIn(program, err)
AssertionError: 'python3.7' not found in 
"/Library/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python:
 can't open file 'nonexistingscript.py': [Errno 2] No such file or directory\n"

test_cmd_line_script failed

For now, I'm going to disable the test for macOS frameworks but the test should 
get fixed.

--
nosy: +ned.deily
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open
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



[issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline

2018-10-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9206

___
Python tracker 

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



[issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline

2018-10-12 Thread Ned Deily


Ned Deily  added the comment:


New changeset f6c29a65e2a6da5c0014c868cf963c975b74e72b by Ned Deily in branch 
'master':
bpo-34783:  Disable test_nonexisting_script for macOS framework builds (GH-9831)
https://github.com/python/cpython/commit/f6c29a65e2a6da5c0014c868cf963c975b74e72b


--

___
Python tracker 

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



[issue34922] hashlib segmentation fault

2018-10-12 Thread shuoz


shuoz  added the comment:

oh brother, maybe this worth open a cve.

--

___
Python tracker 

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



[issue34783] [3.7] segmentation-fault/core dump when try to run non-existing file specified on commandline

2018-10-12 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +9205

___
Python tracker 

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



[issue34920] PYTHONWARNINGS entries are escaped

2018-10-12 Thread Martin Panter


Change by Martin Panter :


--
resolution:  -> duplicate
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



[issue34968] loop.call_soon_threadsafe should be documented to be re-entrant-safe too

2018-10-12 Thread Nathaniel Smith


New submission from Nathaniel Smith :

Asyncio needs a way to schedule work from other threads; and it also needs a 
way to scheduler work from code that can run at arbitrary times in the same 
thread, such as signal handlers or object finalizers ("reentrant contexts").

Currently loop.call_soon_threadsafe is documented to be the way to schedule 
work from other threads, but there is no documented way to schedule work from 
reentrant contexts. These are not quite the same thing, because reentrant 
contexts block the main thread while they're running. Generally, making code 
safe to call from __del__ or signal handlers is strictly harder than making it 
safe to call from other threads. (See bpo-14976 for an example of stdlib code 
being thread-safe but not reentrant-safe.)

Technically speaking, this means that right now, if you need to call an asyncio 
API from a __del__ method, then the only officially supported way to do that is 
to write something like:

def __del__(self):
def actual_cleanup_code():
...
def thread_dispatcher():
loop.call_soon_threadsafe(actual_cleanup_code)
thread = threading.Thread(target=thread_dispatcher)
thread.start()

But this is kind of silly. There should be some equivalent of loop.call_soon 
that *is* safe to call from reentrant contexts, so we could just write:

def __del__(self):
def actual_cleanup_code():
...
loop.call_soon_reentrant_safe(actual_cleanup_code)

But... it doesn't really make sense to add a new method for this, since the 
desired semantics are strictly more powerful than the current 
loop.call_soon_threadsafe. Instead, we should tighten the guarantees on 
call_soon_threadsafe, by documenting that it's safe to use from reentrant 
contexts.

Also, AFAICT the stdlib's implementation of call_soon_threadsafe is already 
reentrant-safe, so this wouldn't require any changes to stdlib code, only to 
the docs. But it would provide an additional formal guarantee that user-level 
code could take advantage of, and impose an additional constraint on developers 
of third-party loops.

(I don't think the constraint is *too* onerous, fortunately. It's quite tricky 
to implement a version of call_soon that's thread-safe, reentrant-safe, *and* 
guarantees that the callback will eventually be invoked, even if call_soon 
races with loop shutdown. But in asyncio, all variants of call_soon are allowed 
to silently drop callbacks at loop shutdown, which makes this much easier.)

--
components: asyncio
messages: 327618
nosy: asvetlov, njs, yselivanov
priority: normal
severity: normal
status: open
title: loop.call_soon_threadsafe should be documented to be re-entrant-safe too
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



[issue23554] EchoServerClientProtocol class should be called EchoServerProtocol

2018-10-12 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Cool! Thanks!

--

___
Python tracker 

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



[issue23554] EchoServerClientProtocol class should be called EchoServerProtocol

2018-10-12 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Thanks @asvetlov.  I'm going to mark this as an Easy Documentation issue, good 
for a first-time contributor.

--
keywords: +easy
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

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



[issue11233] clarifying Availability: Unix

2018-10-12 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
pull_requests: +9204

___
Python tracker 

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



[issue23554] EchoServerClientProtocol class should be called EchoServerProtocol

2018-10-12 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Agree, EchoServer is the better name

--
nosy: +asvetlov

___
Python tracker 

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



[issue23554] EchoServerClientProtocol class should be called EchoServerProtocol

2018-10-12 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Here's a link to the example that the original OP is referring to:
https://docs.python.org/3/library/asyncio-protocol.html?highlight=echoserverclientprotocol#tcp-echo-server

Since this doc page was recently rewritten, I'm not sure if this should be 
considered a typo.

--
nosy: +cheryl.sabella, yselivanov
versions: +Python 3.8 -Python 3.4

___
Python tracker 

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



[issue32052] Provide access to buffer of asyncio.StreamReader

2018-10-12 Thread Yury Selivanov


Yury Selivanov  added the comment:

So we have BufferedProtocol in 3.7; now we need to re-implement asyncio streams 
on top of it.  But even after doing that I'm not that sure we want to expose 
the low-level buffer.

--
stage: needs patch -> 

___
Python tracker 

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



[issue32052] Provide access to buffer of asyncio.StreamReader

2018-10-12 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
dependencies: +Add asyncio.BufferedProtocol
stage:  -> needs patch
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



[issue34961] Global scoping when shadowing local names in class definitions

2018-10-12 Thread multun


multun  added the comment:

Closing, this is documented, and as such most likely intended.

"A class definition is an executable statement that may use and define names. 
These references follow the normal rules for name resolution with an exception 
that unbound local variables are looked up in the global namespace."
https://docs.python.org/3.7/reference/executionmodel.html#builtins-and-restricted-execution

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
versions: +Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There are disadvantages of using a callable class. First, creating a class is 
10-100 times slower than creating a function. Second, calling it is slower than 
calling a function.

sys._getframe() is already used in the typing module (and also in collections 
and enum).

--

___
Python tracker 

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



[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

2018-10-12 Thread Alexander Böhn

Alexander Böhn  added the comment:

The proposed solution in the PR replaces the identity-function return value of 
`NewType(…)` with a callable class instance that adds an explicit `__repr__` 
function – which that function cobbles together the string representations of 
the supplied type and the new types’ name into a sensible and stylistically 
consistent “repr” output. 

In this capacity the `__name__` vs. `__qualname__` consideration would appear 
to be an implementation detail – in this case, calculating a `__qualname__` 
value, á la PEP-3155, doesn’t seem to be possible nor advantageous, in this 
specific case.

On the other hand, adding `__module__` seems like it’d be a win – although I am 
wary about introducing a dependency on a function that starts with an 
underscore. How reliable and/or portable is `sys._getframe()` ?

--

___
Python tracker 

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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2018-10-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9203

___
Python tracker 

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



[issue34966] Pydoc: better support of method aliases

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The original function is present too.

 |  tkraise(self, aboveThis=None)
 |  Raise this widget in the stacking order.

--

___
Python tracker 

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



[issue34966] Pydoc: better support of method aliases

2018-10-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

What do you mean by 'does not work'.

Alias of function in same namespace.

|  itemconfig = itemconfigure(self, index, cnf=None, **kw)
|  
|  itemconfigure(self, index, cnf=None, **kw)
|  Configure resources of an ITEM.

Alias of function in inherited namespace.

|  lift = tkraise(self, aboveThis=None)
|  Raise this widget in the stacking order.

This is also marked as an alias.  The difference is the inclusions of the 
docstring of the original.  I think it should be, since it would not otherwise 
be present in the help output.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue34961] Global scoping when shadowing local names in class definitions

2018-10-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Questions about whether basic syntax behavior is correct should be asked 
elsewhere, such as python-list.  A proper answer requires a careful reading of 
the doc and a non-trivial answer.  Someone on python-list should do that.

Classes and scoping are known to have some non-intuitive corner cases.  Quite 
aside from the fact that the default assumption should be that the 
implementation of heavily used syntax is correct, my memory is that what you 
see is correct.  But I have not read the appropriate parts of the doc for a few 
years.

PS.  3.4 and 3.5 currently only get security fixes.  The same will be true of 
3.6 sometime next year.

--
nosy: +terry.reedy
versions:  -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue33381] Incorrect documentation for strftime()/strptime() format code %f

2018-10-12 Thread Fred L. Drake, Jr.


Change by Fred L. Drake, Jr. :


--
nosy: +fdrake

___
Python tracker 

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



[issue34967] Sphinx is deprecating add_description_unit

2018-10-12 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


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

___
Python tracker 

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



[issue34922] hashlib segmentation fault

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Since it is tagged as a release blocker, I think that only Ned can close it.

Personally I don't think that this issue is a security issue. digest() and 
hexdigest() argument usually is a constant. It is unlikely that the crash can 
be triggered by user data.

--
assignee: serhiy.storchaka -> ned.deily

___
Python tracker 

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



[issue34924] inspect.signature isn't aware that types.MethodType can wrap any callable

2018-10-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

What do you consider to be a bug?  The empty signature is correct, as your 
successful call shows, and the IDLE calltip is, correctly, '()'.

I also do not see how name completion is affected.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue34922] hashlib segmentation fault

2018-10-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Should this be closed as fixed?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue34919] Crash caused by certain characters in a string

2018-10-12 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The report is based on a crash running the otree plugin (proper term?) for the 
Django framework.  For a bug to be our responsibility, it must be present in 
the cpython repository, and should be reproducible without installing 3rd party 
modules.  For instance, while #34807 and #34241 reported crashes while using 
Django, the test added to the test suite involved a trivial expression:
   int/float/complex('\u3053\u3093\u306b\u3061\u306f')

The fix in #34807 was merged after 3.7.0 was released, hence the request to 
test with 3.7.1rc1 (or the upcoming soon 3.7.1rc2) or an updated clone.

The literal "¿" by itself 
does not cause a crash.  If the crash persists with 3.7.1, please  find the 
code that processes the label string and extract the minimal code that results 
in a crash.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.

2018-10-12 Thread Big Stone


Big Stone  added the comment:

Dear Mike Thompson,

I think your most reasonnable option this year is to use the IDLEX fork, that 
works on Python-3.6/3.7 now:

pip install IDLEX
python idlex.pyw # or python [directory of python.exe]\scripts\idlex.pyw

--

___
Python tracker 

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



[issue23892] Introduce sys.implementation.opt_levels

2018-10-12 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Brett, I know you're away this month, so please ignore this,

Eric, I hope the changes I made reflect your original intent in the code review 
for #23731.


This is my first change to the C code, so I hope it's close.  The tests passed, 
so it must be correct.  ;-)  [j/k]

--
nosy: +cheryl.sabella
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



[issue23892] Introduce sys.implementation.opt_levels

2018-10-12 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
keywords: +patch
pull_requests: +9201
stage: test needed -> patch review

___
Python tracker 

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



[issue34967] Sphinx is deprecating add_description_unit

2018-10-12 Thread Julien Palard


New submission from Julien Palard :

When running `make -C Doc/ autobuild-dev-html` with a recent Sphinx, I'm 
getting:

/.../site-packages/sphinx/application.py:927: RemovedInSphinx20Warning: 
app.add_description_unit() is now deprecated. Use app.add_object_type() instead.

Looks easy to fix.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 327600
nosy: docs@python, mdk
priority: normal
severity: normal
status: open
title: Sphinx is deprecating add_description_unit
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



[issue34918] Python 3 tkinter measurement problem

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is a Tk issue. Tkinter returns the same result as a plain Tk 
(unsurprisingly).

$ rlwrap wish
% winfo screenmmwidth .
1016
% winfo screenwidth .
3840
% puts [expr "25.4*[winfo screenwidth .]/[winfo screenmmwidth .]"]
96.0

--
resolution:  -> third party
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



[issue34918] Python 3 tkinter measurement problem

2018-10-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I cannot reproduce 'too large'.  My screen in 340 mm high.  It is reported as 
305 in console Python 3.7.1rc1 and in IDLE run normally and with -n (no 
subprocess) and in console Python 3.6.7.  The point of trying '-n' is to run 
the test code in the IDLE process, which now makes a DPIAwareness call.  I am 
fairly sure that my console does not. 

In any case, tkinter interfaces to tcl/tk via _tkinter.  Unless it can be shown 
that _tkinter distorts the value returned by tk, I think this should be closed 
as '3rd party'.

--
nosy: +serhiy.storchaka, terry.reedy
versions: +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



[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2018-10-12 Thread Anthony Sottile


Change by Anthony Sottile :


--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue23831] tkinter canvas lacks of moveto method.

2018-10-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue23831] tkinter canvas lacks of moveto method.

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset bf034715db9d6e1603ea432d40041e5577ed3332 by Serhiy Storchaka 
(Juliette Monsel) in branch 'master':
bpo-23831: Add moveto method to the tkinter.Canvas widget. (GH-9768)
https://github.com/python/cpython/commit/bf034715db9d6e1603ea432d40041e5577ed3332


--

___
Python tracker 

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



[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

You can determine the module of the caller by using sys._getframe().

--

___
Python tracker 

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



[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

For repr you need to set __qualname__, not just __name__. It may be worth to 
set also __module__ for pickleability and better help.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34948] Document __warningregistry__

2018-10-12 Thread Éric Araujo

Change by Éric Araujo :


--
title: Document __warningregister__ -> Document __warningregistry__

___
Python tracker 

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



[issue34912] Update overflow checks in resize_buffer

2018-10-12 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue34964] Make Tkinter sources more readable by adding blank lines

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset dc0d571b6401527f236b0513f29847e2b9b8a188 by Serhiy Storchaka in 
branch 'master':
bpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822)
https://github.com/python/cpython/commit/dc0d571b6401527f236b0513f29847e2b9b8a188


--

___
Python tracker 

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



[issue34964] Make Tkinter sources more readable by adding blank lines

2018-10-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue34966] Pydoc: better support of method aliases

2018-10-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue34966] Pydoc: better support of method aliases

2018-10-12 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Pydoc supports aliases. If the alias is defined in the same class

class A:
def foo(self, x=42): pass
bar = foo

it will render the docstring only for the original function. For the alias it 
will output just "bar = foo(self, x=42)".

But this doesn't work if the original function or alias are inherited. It often 
happened in the tkinter and turtle modules which have a hierarchy of classes, 
and aliases defined in parent classes. Compare for example the rendering for 
methods itemconfig and lift in help(tkinter.Listbox).

The proposed PR makes pydoc detecting aliases for inherited methods.

--
components: Library (Lib)
messages: 327593
nosy: serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Pydoc: better support of method aliases
type: behavior
versions: Python 2.7, 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



[issue29341] Missing accepting path-like object in docstrings of os module functions

2018-10-12 Thread Mayank Asthana


Change by Mayank Asthana :


--
nosy: +masthana

___
Python tracker 

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



[issue11233] clarifying Availability: Unix

2018-10-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2d6097d027e0dd3debbabc702aa9c98d94ba32a3 by Victor Stinner 
(Cheryl Sabella) in branch 'master':
bpo-11233: Create availability directive for documentation (GH-9692)
https://github.com/python/cpython/commit/2d6097d027e0dd3debbabc702aa9c98d94ba32a3


--

___
Python tracker 

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



[issue34965] Python on Docker container using flask is going down after sometime

2018-10-12 Thread Srikanth


Srikanth  added the comment:

@Windson Yang
The container is neither crashing nor responding for requests. Is there a way I 
can pull any dumps or tracelog, so I can gather and give it to you

--

___
Python tracker 

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



[issue34965] Python on Docker container using flask is going down after sometime

2018-10-12 Thread Windson Yang


Windson Yang  added the comment:

Hello, Srikanth, We can't fix/find the bug by the info you give, Would you mind 
provide the traceback log after crashing?

--
nosy: +Windson Yang

___
Python tracker 

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



[issue23794] http package should support HTTP/2

2018-10-12 Thread Mayank Asthana


Change by Mayank Asthana :


--
nosy: +masthana

___
Python tracker 

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



[issue34965] Python on Docker container using flask is going down after sometime

2018-10-12 Thread Srikanth


Srikanth  added the comment:

@anton.barkovsky
Thank you so much for quick response. I am not pretty sure, but below are the 
findings so far.

The same docker container is used by 30+ applications. All applications are 
working fine until last week and all of a sudden all apps are going down one by 
one. Our preliminary analysis is all projects using flask are going down where 
as apps not using flask are good.
We use Kubernetes service layer, so we are checking if there is anything 
suspicious upgrade happened there as well.
I am trying to explore more to see if anybody faced such issues with flask
Eg: 
https://stackoverflow.com/questions/24884901/python-flask-webserver-stop-responding

Thanks much for taking time

--

___
Python tracker 

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



[issue34961] Global scoping when shadowing local names in class definitions

2018-10-12 Thread Antoine Pietri


Antoine Pietri  added the comment:

Tracking down the issue a bit further:

a = 10


def main():
a = 42

class wtf():
print(a)

class wtf2():
print(a)
a = 2


main()

prints:

42
10


It seems that when there is an assignation in the class body, prior usages of 
the variables in the class body are done by loading the variable using 
LOAD_NAME instead of LOAD_CLASSDEREF:


Disassembly of :
[...]

  8   8 LOAD_NAME3 (print)
 10 LOAD_CLASSDEREF  0 (a)
 12 CALL_FUNCTION1
 14 POP_TOP
 16 LOAD_CONST   1 (None)
 18 RETURN_VALUE

Disassembly of :
[...]

 11   8 LOAD_NAME3 (print)
 10 LOAD_NAME4 (a)
 12 CALL_FUNCTION1
 14 POP_TOP

 12  16 LOAD_CONST   1 (2)
 18 STORE_NAME   4 (a)
 20 LOAD_CONST   2 (None)
 22 RETURN_VALUE

--
nosy: +antoine.pietri

___
Python tracker 

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



[issue34965] Python on Docker container using flask is going down after sometime

2018-10-12 Thread Anton Barkovsky


Anton Barkovsky  added the comment:

Do you have any evidence to believe that this is caused by a bug in CPython 
itself or its stdlib? If not, it's probably an issue with your code, libraries, 
or environment, and so out of scope in this tracker.

--
nosy: +anton.barkovsky

___
Python tracker 

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



[issue34965] Python on Docker container using flask is going down after sometime

2018-10-12 Thread Srikanth


New submission from Srikanth :

We are have created Python 3.5 image on docker container.

All applications which are running on non-flask are working fine, but 
applications which are running on flask 0.12.2 are failing after prolonged 
usage of the application (Approx after 12 hours).
Note: We have enabled heart beat check for python to make sure the container is 
up which hits every 10 seconds.
After approx 12 hours, the application is stopping to respond to heart beat.

Any expert suggestion plz.

--
components: Tests
messages: 327586
nosy: sri_spl
priority: normal
severity: normal
status: open
title: Python on Docker container using flask is going down after sometime
type: crash
versions: Python 3.5

___
Python tracker 

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



[issue34964] Make Tkinter sources more readable by adding blank lines

2018-10-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue34964] Make Tkinter sources more readable by adding blank lines

2018-10-12 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Tkinter sources are old and don't conform PEP 8. Usually we don't reformat 
existing sources for avoiding problems with backporting and breaking the 
history of lines. But I think that we can make some refinements in Tkinter 
sources.

The tkinter module contains a lot of small methods (often just 1 or 2 lines of 
code), but with large multiline docstrings. Currently methods are not separated 
by blank lines. As result, the code of the method is visually closer to the 
header of the following method that to the header of its method.

The proposed patch adds empty lines between methods and double empty lines 
between class (and removes few redundant empty lines). Most changes are made 
automatically:

autopep8 --select E301,E303,E305 --in-place --recursive Lib/tkinter/

and edited after this (added missed empty lines and removed few unwanted 
changes).

Since it affects only empty lines, it doesn't break the lines history. And I 
think this will not make backporting more difficult.

--
components: Library (Lib), Tkinter
messages: 327585
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Make Tkinter sources more readable by adding blank lines
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



[issue20304] Argument Clinic: char convertor should use default values of type bytes

2018-10-12 Thread Tal Einat


Tal Einat  added the comment:

This was fixed in PR GH-8039.

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2018-10-12 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +9198

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2018-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset 6198976ec807cf3b658e902fd63db88a3ac99b8c by Miss Islington (bot) 
in branch '2.7':
bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796)
https://github.com/python/cpython/commit/6198976ec807cf3b658e902fd63db88a3ac99b8c


--

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2018-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset 86cfac47cf736fae90a617959288ccade18fd07e by Miss Islington (bot) 
in branch '3.6':
bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796)
https://github.com/python/cpython/commit/86cfac47cf736fae90a617959288ccade18fd07e


--

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2018-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset d4ed8809ddfaa23fe5edf2987c03afc32f5576c0 by Miss Islington (bot) 
in branch '3.7':
bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796)
https://github.com/python/cpython/commit/d4ed8809ddfaa23fe5edf2987c03afc32f5576c0


--
nosy: +miss-islington

___
Python tracker 

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



[issue34961] Global scoping when shadowing local names in class definitions

2018-10-12 Thread Anton Barkovsky


Change by Anton Barkovsky :


--
nosy: +anton.barkovsky

___
Python tracker 

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



[issue34900] unittest subTests() fails when called from debug()

2018-10-12 Thread Berker Peksag


Change by Berker Peksag :


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



[issue23794] http package should support HTTP/2

2018-10-12 Thread Anton Barkovsky


Change by Anton Barkovsky :


--
nosy: +anton.barkovsky

___
Python tracker 

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



[issue34900] unittest subTests() fails when called from debug()

2018-10-12 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset c1fe49c01f3850aaa32a7d75e47f90eb5c5f7efe by Berker Peksag (Miss 
Islington (bot)) in branch '3.6':
bpo-34900: Make TestCase.debug() work with subtests (GH-9707)
https://github.com/python/cpython/commit/c1fe49c01f3850aaa32a7d75e47f90eb5c5f7efe


--

___
Python tracker 

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



[issue34900] unittest subTests() fails when called from debug()

2018-10-12 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 7a98e302c37781f9c6448a28bc70bff18b7e2862 by Berker Peksag (Miss 
Islington (bot)) in branch '3.7':
bpo-34900: Make TestCase.debug() work with subtests (GH-9707)
https://github.com/python/cpython/commit/7a98e302c37781f9c6448a28bc70bff18b7e2862


--

___
Python tracker 

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



[issue27261] io.BytesIO.truncate does not work as advertised

2018-10-12 Thread Anton Barkovsky


Anton Barkovsky  added the comment:

I'm willing to try to fix this behavior.

I just want to check that this would not be considered breaking backwards 
compatibility. I can imagine in theory some code relying on it, but I would say 
that it would be relying on a bug. If some code is passed BytesIO in place of a 
file, then the current behavior is clearly undesirable. If some code 
specifically uses BytesIO and relies on this... I guess this can happen, but 
should be very rare and contrary to widely documented behavior. So it seems ok 
to just fix this, but I'm not very familiar with how such changes are usually 
handled in cPython, so I'd like to get approval from someone experienced.

--

___
Python tracker 

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



[issue34900] unittest subTests() fails when called from debug()

2018-10-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9197

___
Python tracker 

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



[issue34900] unittest subTests() fails when called from debug()

2018-10-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9196

___
Python tracker 

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



[issue34900] unittest subTests() fails when called from debug()

2018-10-12 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset da2bf9f66d0c95b988c5d87646d168f65499b316 by Berker Peksag (Bruno 
Oliveira) in branch 'master':
bpo-34900: Make TestCase.debug() work with subtests (GH-9707)
https://github.com/python/cpython/commit/da2bf9f66d0c95b988c5d87646d168f65499b316


--

___
Python tracker 

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



[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

2018-10-12 Thread Alexander Böhn

Change by Alexander Böhn :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue27261] io.BytesIO.truncate does not work as advertised

2018-10-12 Thread Anton Barkovsky


Change by Anton Barkovsky :


--
nosy: +anton.barkovsky

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2018-10-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9193

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2018-10-12 Thread Tal Einat


Tal Einat  added the comment:


New changeset 4505f65ae7807f2420ed14d4f060e7cd5c4039d3 by Tal Einat (Gus 
Goulart) in branch 'master':
bpo-34203: FAQ now recommends python 3.x over 2.x (GH-9796)
https://github.com/python/cpython/commit/4505f65ae7807f2420ed14d4f060e7cd5c4039d3


--

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2018-10-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9194

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2018-10-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9195

___
Python tracker 

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



[issue31516] current_thread() becomes "dummy" thread during shutdown

2018-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset d918e98056b7ef8d90d71805531cec3e67b5450e by Miss Islington (bot) 
in branch '3.6':
bpo-31516: Skip test_main_thread_during_shutdown() with COUNT_ALLOCS builds. 
(GH-8052)
https://github.com/python/cpython/commit/d918e98056b7ef8d90d71805531cec3e67b5450e


--

___
Python tracker 

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



[issue27741] datetime.datetime.strptime functionality description incorrect

2018-10-12 Thread Tal Einat


Tal Einat  added the comment:

At least with Python 3.7.0, the equivalence is not complete: 
datetime.strptime() is better, since it retains both microseconds and timezone 
data. See examples below.

>>> from datetime import datetime, timezone
>>> import time
>>> s = datetime.strftime(datetime.now(), '%a %b %d %H:%M:%S %f')
>>> s
'Fri Oct 12 11:33:32 999810'
>>> datetime.strptime(s, '%a %b %d %H:%M:%S %f')
datetime.datetime(1900, 10, 12, 11, 33, 32, 999810)
>>> datetime(*time.strptime(s, '%a %b %d %H:%M:%S %f')[:6])
datetime.datetime(1900, 10, 12, 11, 33, 32)
>>> s2 = datetime.strftime(datetime.now(timezone(timedelta(hours=1))), '%a %b 
>>> %d %H:%M:%S %f%z')
>>> s2
'Fri Oct 12 09:48:40 347076+0100'
>>> datetime.strptime(s2, '%a %b %d %H:%M:%S %f%z')
datetime.datetime(1900, 10, 12, 9, 48, 40, 347076, 
tzinfo=datetime.timezone(datetime.timedelta(seconds=3600)))
>>> datetime(*time.strptime(s2, '%a %b %d %H:%M:%S %f%z')[:6])
datetime.datetime(1900, 10, 12, 9, 48, 40)

--

___
Python tracker 

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



[issue31516] current_thread() becomes "dummy" thread during shutdown

2018-10-12 Thread miss-islington


miss-islington  added the comment:


New changeset c327a5499fa823f627366c17e20687065fd70449 by Miss Islington (bot) 
in branch '3.7':
bpo-31516: Skip test_main_thread_during_shutdown() with COUNT_ALLOCS builds. 
(GH-8052)
https://github.com/python/cpython/commit/c327a5499fa823f627366c17e20687065fd70449


--
nosy: +miss-islington

___
Python tracker 

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



[issue31516] current_thread() becomes "dummy" thread during shutdown

2018-10-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9192

___
Python tracker 

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



[issue31516] current_thread() becomes "dummy" thread during shutdown

2018-10-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9191

___
Python tracker 

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



[issue31516] current_thread() becomes "dummy" thread during shutdown

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 65d2f8c044bf597685ba72f66cbcc6b3f7a3ee9c by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-31516: Skip test_main_thread_during_shutdown() with COUNT_ALLOCS builds. 
(GH-8052)
https://github.com/python/cpython/commit/65d2f8c044bf597685ba72f66cbcc6b3f7a3ee9c


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27682] wsgiref: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2018-10-12 Thread Petter S


Petter S  added the comment:

The Github pull request https://github.com/python/cpython/pull/9713 addresses 
this.

--
nosy: +Petter S

___
Python tracker 

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



[issue34940] Possible assertion failure due to _check_for_legacy_statements()

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Seems failure is not possible here, but it is safer to always check for errors.

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



[issue34940] Possible assertion failure due to _check_for_legacy_statements()

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset a4b48f194a131bad6fe1fcfb1f90ae2029304735 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-34940: Fix the error handling in _check_for_legacy_statements(). (GH-9764)
https://github.com/python/cpython/commit/a4b48f194a131bad6fe1fcfb1f90ae2029304735


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34962] make doctest does not pass :/

2018-10-12 Thread Julien Palard


Change by Julien Palard :


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



[issue34962] make doctest does not pass :/

2018-10-12 Thread Julien Palard

Julien Palard  added the comment:


New changeset 859c068e52a31e13e2b9bb6a3f861fa8c290cb0e by Julien Palard 
(Stéphane Wirtel) in branch 'master':
bpo-34962: make doctest in Doc/ now passes, and is enforced in CI (GH-9806)
https://github.com/python/cpython/commit/859c068e52a31e13e2b9bb6a3f861fa8c290cb0e


--
nosy: +mdk

___
Python tracker 

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



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

`exec(compile(open("fn", "rb").read(), "fn", 'exec'))` will emit a resource 
warning because the open file is not closed explicitly.

But this is a different issue.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34926] Allow querying a Path's mime-type

2018-10-12 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

No, I simply forgot to close it. Thank you!

--

___
Python tracker 

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



[issue34926] Allow querying a Path's mime-type

2018-10-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

As part of triaging, I am closing this since this was merged with doc changes 
and there was no back port done since it's an enhancement. Antoine, feel free 
to reopen this if there are any changes left.

Thanks everybody for the feedback and review.

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



[issue27682] wsgiref: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2018-10-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I think this is an issue with wsgiref handling client closure rather than a 
Windows/Django bug. I saw this sporadically but not consistently while running 
`make serve` to serve the docs which uses wsgiref simple server to serve docs 
on my Mac OS. Related issue34547 with a PR that catches ConnectionAbortedError 
and returns.

PR link : https://github.com/python/cpython/pull/9713/

Sample traceback while serving docs locally with `make serve` on Mac OS: 

127.0.0.1 - - [12/Oct/2018 10:56:57] "GET 
/_sources/library/asyncio-eventloop.rst.txt HTTP/1.1" 500 59

Exception happened during processing of request from ('127.0.0.1', 50436)
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 138, in run
self.finish_response()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 180, in finish_response
self.write(data)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 274, in write
self.send_headers()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 332, in send_headers
self.send_preamble()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 453, in _write
result = self.stdout.write(data)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py",
 line 796, in write
self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 141, in run
self.handle_error()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 368, in handle_error
self.finish_response()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 180, in finish_response
self.write(data)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 274, in write
self.send_headers()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 331, in send_headers
if not self.origin_server or self.client_is_modern():
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py",
 line 313, in _handle_request_noblock
self.process_request(request, client_address)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py",
 line 344, in process_request
self.finish_request(request, client_address)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py",
 line 357, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py",
 line 717, in __init__
self.handle()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/simple_server.py",
 line 133, in handle
handler.run(self.server.get_app())
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py",
 line 144, in run
self.close()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/simple_server.py",
 line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'


Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue34547] Wsgiref server does not handle closed connections gracefully

2018-10-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report and PR. I think this is the same as issue27682. I noticed 
the same during running `make serve` locally for documentation and it's worth 
fixing. I am just wondering if it makes sense to fix the TypeError and 
AttributeError too. Also I couldn't see any tests for this and I don't know if 
it's possible to test this scenario.

I will leave it to the reviewer to close this and raise PR against issue27682 
or continue discussion here.

Thanks again!

--

___
Python tracker 

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



[issue34696] PyByteArray_FromObject() has undocumented (and untested) behavior

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See also issue26759.

--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34547] Wsgiref server does not handle closed connections gracefully

2018-10-12 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



  1   2   >