[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -10622

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -10623

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10621

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10621, 10622, 10623

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10621, 10622

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset c465682718f15cd3deb6b37db5fb607718ac64ed by Terry Jan Reedy in 
branch 'master':
bpo-35591: IDLE Find Selection now works when selection not found (GH-11339)
https://github.com/python/cpython/commit/c465682718f15cd3deb6b37db5fb607718ac64ed


--

___
Python tracker 

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



[issue35600] Expose siphash

2018-12-27 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

> Steven, my requirement calls for same hash on multiple machines. 
> Python's hash (for strings) is keyed with a random value.

Ah, of course it does, I forgot about that.

The only problem with exposing siphash is that we are exposing a private 
implementation detail (the specific hash function used) as a public 
interface. That means that we'd need to keep siphash forever, even if we 
want to use a different hash function in the future.

Now maybe we're willing to do that, perhaps exposing it through the 
hashlib module, with no guarantee that it is related in any way to what 
hash() calls. But I think now we're moving in Python-Ideas mailing list 
territory, and as Benjamin points out, there is a third-party library.

--

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I expect that people have run into this.  But since callback exceptions do not 
crash IDLE, the only symptom when not running from a terminal is the lack of 
the 'bell' sound.

--

___
Python tracker 

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



[issue35587] Python 3.7.2 Embed - zipimport.ZipImportError (Cannot load python37.zip)

2018-12-27 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Fatal Python error: initfsencoding: unable to load the file 
system codec zipimport.ZipImportError: can't find module 'encodings'

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -10619

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -10620

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch, patch
pull_requests: +10618, 10619
stage: commit review -> patch review

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch, patch, patch
pull_requests: +10618, 10619, 10620
stage: commit review -> patch review

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +10618
stage: commit review -> patch review

___
Python tracker 

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



[issue35600] Expose siphash

2018-12-27 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

How about using one of these modules? https://pypi.org/search/?q=siphash

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue35591] IDLE: Traceback on Find Selection

2018-12-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thanks for reporting this.  It is easy to trigger.  And after a bit of 
analysis, easy to fix.

self.bell is set as top.bell in searchbase.SearchDialogBase.create_widgets().  
The latter is called by SDB.open(), which is called for Find, Find-again if 
there is no previously defined pattern, and Find-in-files.  It is not called by 
Find-selection as it uses the selection as the pattern.

The bell only sounds if the selection is not found anywhere else in the editor.
if selfirst == first and sellast == last:
self.bell()
If the selection is found elsewhere, the copy is then tagged with the selection 
tag, so when the original is found, the condition is not true.  I consider it a 
bug that the selection tag is used instead of the 'found' tag, but the above 
depends on it being moved.

The purpose of creating and calling self.bell instead of top.bell is so bell 
can be mocked when testing, both to detect the call and suppress noise when 
testing.  Binding self.bell to root.bell in __init__ instead of to top.bell in 
create_widgets should work fine.

--
stage:  -> commit review
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



[issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests

2018-12-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch, patch, patch
pull_requests: +10615, 10616, 10617
stage:  -> patch review

___
Python tracker 

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



[issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests

2018-12-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch, patch
pull_requests: +10615, 10616
stage:  -> patch review

___
Python tracker 

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



[issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests

2018-12-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue35602] cleanup code may fail in test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests

2018-12-27 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

According to this buildbot:

https://buildbot.python.org/all/#/builders/170/builds/218/steps/4/logs/stdio

there is some cleanup failure in test_sock_sendfile_os_error_first_call:

test_sock_sendfile_os_error_first_call 
(test.test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests) ... 
/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/asyncio/selector_events.py:655:
 ResourceWarning: unclosed transport <_SelectorSocketTransport fd=10>
  source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
ok

The code that is supposed to clean up the resource is:

def cleanup():
if proto.transport is not None:
# can be None if the task was cancelled before
# connection_made callback
proto.transport.close()
self.run_loop(proto.wait_closed())

apparently, proto.transport may be None and then it fails to be closed even if 
the test succeeds (I assume because the condition in the comment happens or 
something else) and then the transport is not properly closed.

--
components: Tests, asyncio
messages: 332642
nosy: asvetlov, pablogsal, yselivanov
priority: normal
severity: normal
status: open
title: cleanup code may fail in 
test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue28097] IDLE: document all key bindings, add menu items for more.

2018-12-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Response to history issues raised in PR:
1. Not erasing output/history is a feature: some shells save and restore recent 
history when close and open.  Shell restart is an alternative to that.  I 
fairly often replay statements after restart.
2. I think turning off cycling is feature bloat.  (I never do so for search.)
3. The one history feature that multiple people have asked for, on another 
issue, is retrieval with up/down arrow, as seems to be standard.  I now agree.

For items going under edit, which is already 'full', submenus will be needed.  
Since history is Shell only, separate entries are ok, at least for now, instead 
of 'History' and a submenu with 'previous' and 'next'.

--

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -10610

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread miss-islington


miss-islington  added the comment:


New changeset 4c7f34f73d2d16303798fc4a7043e641cee58e51 by Miss Islington (bot) 
in branch '3.7':
bpo-35598: IDLE: Update config_key.py with PEP8 names (GH-11330)
https://github.com/python/cpython/commit/4c7f34f73d2d16303798fc4a7043e641cee58e51


--
nosy: +miss-islington

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -10611

___
Python tracker 

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



[issue35600] Expose siphash

2018-12-27 Thread Dima Tisnek


Dima Tisnek  added the comment:

Steven, my requirement calls for same hash on multiple machines. Python's hash 
(for strings) is keyed with a random value.

You are correct that `hash(tuple(map(ord, str(something` is stable.

In the worst case, I could override `PYTHONHASHSEED` globally.

I suppose this relegates my suggestion to "why not" or "because we can" 
category.

--

___
Python tracker 

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



[issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75

2018-12-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch, patch, patch
pull_requests: +10612, 10613, 10614
stage:  -> patch review

___
Python tracker 

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



[issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75

2018-12-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch, patch
pull_requests: +10612, 10613
stage:  -> patch review

___
Python tracker 

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



[issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75

2018-12-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10609, 10610, 10611
stage:  -> patch review

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 55698cc39549523cafc13cc8dd47960d8f73a59f by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
bpo-35598: IDLE: Update config_key.py with PEP8 names (GH-11330)
https://github.com/python/cpython/commit/55698cc39549523cafc13cc8dd47960d8f73a59f


--

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10609, 10610
stage:  -> patch review

___
Python tracker 

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



[issue35601] Race condition in test_signal_handling_args x86-64 High Sierra 3.75

2018-12-27 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

There is a race condition in FAIL: test_signal_handling_args 
(test.test_asyncio.test_events.KqueueEventLoopTests) in macOS:

https://buildbot.python.org/all/#/builders/147/builds/546/steps/4/logs/stdio

==
FAIL: test_signal_handling_args 
(test.test_asyncio.test_events.KqueueEventLoopTests)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.7.billenstein-sierra/build/Lib/test/test_asyncio/test_events.py",
 line 595, in test_signal_handling_args
self.assertEqual(caught, 1)
AssertionError: 0 != 1

It seems that SIGALRM is never received in the 0.5 seconds of timeout:

def test_signal_handling_args(self):
some_args = (42,)
caught = 0

def my_handler(*args):
nonlocal caught
caught += 1
self.assertEqual(args, some_args)

self.loop.add_signal_handler(signal.SIGALRM, my_handler, *some_args)

signal.setitimer(signal.ITIMER_REAL, 0.1, 0)  # Send SIGALRM once.
self.loop.call_later(0.5, self.loop.stop)
self.loop.run_forever()
self.assertEqual(caught, 1)

Maybe we should set up a much bigger timeout and make the handle stop the event 
loop.

--
components: Tests, asyncio, macOS
messages: 332637
nosy: asvetlov, ned.deily, pablogsal, ronaldoussoren, yselivanov
priority: normal
severity: normal
status: open
title: Race condition in test_signal_handling_args x86-64 High Sierra 3.75
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue35568] Expose the C raise() function in the signal module, for use on Windows

2018-12-27 Thread Vladimir Matveev


Change by Vladimir Matveev :


--
keywords: +patch, patch
pull_requests: +10606, 10607
stage:  -> patch review

___
Python tracker 

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



[issue35568] Expose the C raise() function in the signal module, for use on Windows

2018-12-27 Thread Vladimir Matveev


Change by Vladimir Matveev :


--
keywords: +patch, patch, patch
pull_requests: +10606, 10607, 10608
stage:  -> patch review

___
Python tracker 

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



[issue35568] Expose the C raise() function in the signal module, for use on Windows

2018-12-27 Thread Vladimir Matveev


Change by Vladimir Matveev :


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

___
Python tracker 

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



[issue35600] Expose siphash

2018-12-27 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

> In the old days I'd just `hash(some_variable)` but of course now I cannot.

I'm sorry, I don't understand... why can't you?

py> text = "NOBODY expects the Spanish Inquisition!"
py> hash(text)
1245575277


There's also this:

py> hashlib.md5(text.encode('utf-8')).digest()
b'@\xfb[&\t]\x9c\xc0\xc5\xfcvH\xe8:\x1b]'


although it might be a bit expensive if you don't care about security and too 
weak if you do. Can you explain why hash() isn't suitable?

For what's its worth, I wouldn't use sum() to generate a hash since it may be 
unbounded and may not be "mixed up" enough. If you can't hash a string, perhaps 
you can hash a tuple of ints?

py> hash(tuple(map(ord, text)))
-816773268
py> hash(tuple(map(ord, text+"\0")))
667761418

--
nosy: +steven.daprano

___
Python tracker 

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



[issue28097] IDLE: document all key bindings, add menu items for more.

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -10589

___
Python tracker 

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



[issue28097] IDLE: document all key bindings, add menu items for more.

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -10590

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If you submit further PRs for this issue, the blurb will need to be changed as 
blurbs are for issues, not PRs.

--

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am going to merge on the presumption that you will follow through at least 
with more tests.  Currently missing other than mac-code, according to coverage 
output: switch from 'advanced to basic and calls to final_key_selected, 
build_key_string, get_modifiers, and translate_key.  The last should become a 
standalone function.

I believe I have encountered a bug.  Change a key binding.  Cancel. Re-open 
config dialog.  Try to change back.  It says original binding is in use -- 
which it is if one closes IDLE and reopens, or opens a different instance.  It 
seems that cancel is not properly undoing the temporary change.

--

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue35600] Expose siphash

2018-12-27 Thread Dima Tisnek


New submission from Dima Tisnek :

Just recently, i found rolling my own simple hash for strings.
(task was to distribute tests across executors, stably across invocations, no 
external input, no security)

In the old days I'd just `hash(some_variable)` but of course now I cannot. 
`hashlib.sha*` seemed too complex and I ended up with something like 
`sum(map(ord, str(some_variable)))`.

How much easier this would be is `siphash` implementation that cpython uses 
internally was available to me!

--
components: Extension Modules
messages: 332633
nosy: Dima.Tisnek
priority: normal
severity: normal
status: open
title: Expose siphash
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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -10599

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -10598

___
Python tracker 

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



[issue28097] IDLE: document all key bindings, add menu items for more.

2018-12-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue35599] asyncio windows_events.py IocpProactor bug

2018-12-27 Thread Jeff Robbins


New submission from Jeff Robbins :

The close() method of IocpProactor in windows_events.py has this code in its 
close() method:

while self._cache:
if not self._poll(1):
logger.debug('taking long time to close proactor')

The bug is that self._poll() has *no* return statements in it, and so returns 
None no matter what.  Which makes the "if not" part confusing, at best.  At 
worst, it might reflect a disconnect with the author's intent.

I added a bit more logging and re-ran my test:

while self._cache:
logger.debug('before self._poll(1)')
if not self._poll(1):
logger.debug('taking long time to close proactor')
logger.debug(f'{self._cache}')


logger output:

20:16:30.247 (D)   MainThread  asyncio: before self._poll(1)
20:16:30.248 (D)   MainThread  asyncio: taking long time to 
close proactor
20:16:30.249 (D)   MainThread  asyncio: {}


Obviously 1 millisecond isn't "taking a long time to close proactor".  Also of 
interest, the _cache is now empty.  

I think the intent of the author must have been to check if the call to 
._poll() cleared out any possible pending futures, or waited the full 1 second. 
 Since ._poll() doesn't return any value to differentiate if it waited the full 
wait period or not, the "if" is wrong, and, I think, the intent of the author 
isn't met by this code.

But, separate from speculating on "intent", the debug output of "taking a long 
time to close proactor" seems wrong, and the .close() code seems disassociated 
with the implementation of ._poll() in the same class IocpProactor in 
windows_events.py.

--
components: asyncio
messages: 332632
nosy: asvetlov, je...@livedata.com, yselivanov
priority: normal
severity: normal
status: open
title: asyncio windows_events.py IocpProactor bug
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



[issue35587] Python 3.7.2 Embed - zipimport.ZipImportError (Cannot load python37.zip)

2018-12-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This seems to be related to issue35596.

--
nosy: +serhiy.storchaka, steve.dower, xtreak

___
Python tracker 

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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread miss-islington


miss-islington  added the comment:


New changeset bbf695441af9def8a121ff3e245415d9fc0bab9a by Miss Islington (bot) 
in branch '3.7':
bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple 
times. (GH-11329)
https://github.com/python/cpython/commit/bbf695441af9def8a121ff3e245415d9fc0bab9a


--

___
Python tracker 

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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-27 Thread Ned Deily


Ned Deily  added the comment:

See discussion in Issue35485. Regressions were found on macOS with Tk 8.6.9.1 
and with the more recent Tk 8.6 maintenance branch top of trunk.  So for 
python.org macOS installers, we have reverted to Tcl/Tk 8.6.8.  Windows builds 
will continue to use 8.6.9 unless problems are found.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Mac: tkinter windows turn black while resized

___
Python tracker 

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



[issue8538] Add FlagAction to argparse

2018-12-27 Thread Ken Williams


Ken Williams  added the comment:

Thanks, Paul and Eric, for your very quick replies.

You're quite correct, the original question in 
https://stackoverflow.com/a/15008806/169947 is indeed hoping for `--foo TRUE` 
and `--foo False` etc. to work.  Personally I don't like that as much as the 
GNU-style `--foo` and `--no-foo` technique, because when you let people type 
`TRUE` or `True` or `T` or `1`, etc., it gets a bit confusing about exactly 
what is accepted as a true value, what's false, is a zero interpreted as 0 or 
"0", whether a failure to parse the value as True or False will be reported as 
an error or not, and so on.  The user typically can't really know these answers 
without reading the actual code, or running it to see what generates an error 
(or triggers whatever behavior they're looking for), which is certainly not 
ideal.

By contrast, with `--foo` and `--no-foo`, the options are strict and clear.  
And supplying an argument will trigger a parse failure.

For @mgilson's proposal, I think the main thing I find unsatisfactory (besides 
the fact that it takes 3 lines to define, and I'll have to come back to that SO 
answer every time to make sure I get them right...) is that the `--help` output 
can't be made clear.  With the following specification:

parser.add_argument('--foo', dest='foo', help="Do foo", action='store_true')
parser.add_argument('--no-foo', dest='foo', help="Don't foo", 
action='store_false')
parser.set_defaults(foo=True)

we get the following --help text (when using ArgumentDefaultsHelpFormatter):

--foo   Do foo (default: True)
--no-fooDon't foo (default: True)

and that last line seems to be a contradiction, or at least very confusing.  
The only alternative I see is to turn off ArgumentDefaultsHelpFormatter, but I 
think the defaults are generally helpful information for the user.

To fix that --help issue seems to require quite a bit more complicated 
registration of arguments, so it's probably not going to happen in most 
people's scripts.

I should be clear: I haven't vetted the `argparse_bool.py` proposal in detail 
either, so I'm not specifically asking for it to be adopted.  Just hoping for a 
nice resolution to the `--foo` `--no-foo` issue that codifies best-practices in 
a way that makes it trivial to get nice behavior in scripts.


As for documentation - I had poked around in the code a bit and seen the 
`register` method, but I thought since it wasn't documented, I'd better not use 
it.  Is it for public consumption?  If so, I'd say it's better documented than 
undocumented, even if it provides more info than most people need.  My guess is 
that enough people are probably using it to make it impossible to eliminate, 
which is a good test for whether something should be documented too.

--

___
Python tracker 

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



[issue31440] wrong default module search path in help message

2018-12-27 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue8538] Add FlagAction to argparse

2018-12-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

Yes, this is the correct bug tracker.

And note that this code isn't mine, I just posted it here so it wouldn't be 
lost. It looks like the original message was from 
https://mail.python.org/pipermail/python-dev/2010-April/099704.html

--

___
Python tracker 

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



[issue21524] Allowing to pass pathlib.Path object in mimetypes.guess_type function

2018-12-27 Thread Cheryl Sabella


New submission from Cheryl Sabella :

This was implemented in #34926.

--
nosy: +cheryl.sabella
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Allow querying a Path's mime-type
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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread Eryk Sun


Change by Eryk Sun :


--
nosy: +serhiy.storchaka
stage: patch review -> test needed
type:  -> crash

___
Python tracker 

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



[issue8538] Add FlagAction to argparse

2018-12-27 Thread paul j3


paul j3  added the comment:

Let me highlight something about

https://stackoverflow.com/a/15008806/169947

The original question was how to implement an Action that accepts 'True' or 
'False' as an argument.  Users often try `type=bool`, which doesn't work 
because of the normal behavior of the Python bool(astr) function.  That's been 
the subject of several other bug/issues.

https://bugs.python.org/issue14392
https://bugs.python.org/issue26994
https://bugs.python.org/issue24754
https://bugs.python.org/issue21208

My answer in that SO question is

https://stackoverflow.com/a/19233287/901925



@mgilson's answer proposes a '--foo', '--no-foo' alternative.  That is in line 
with this bug/issue.

parser.add_argument('--feature', dest='feature', action='store_true')
parser.add_argument('--no-feature', dest='feature', action='store_false')
parser.set_defaults(feature=True)

So the question here is whether mgilson's simple answer is enough, or do we 
need to add Eric's ConfigureAction class?  

On a casual reading the patch proposed here shouldn't have backward 
compatibility issues, since it is an addon class, and doesn't modify existing 
classes.  But it lacks tests and documentation.  

Documentation for argparse is a tough issue.  While advanced users want more 
features and more documented details, most of the SO questions come from 
beginners, who's eyes glaze over when they read the existing documentation.

--

___
Python tracker 

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



[issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR)

2018-12-27 Thread Michael Felt


Michael Felt  added the comment:

On 27/12/2018 15:48, Michael Felt wrote:
> Michael Felt  added the comment:
>
> The "improved" output after getting back to "latest" commit:
>
> == CPython 3.8.0a0 (heads/master-dirty:34ae04f74d, Dec 27 2018, 14:05:08) [C]
> == AIX-1-00C291F54C00-powerpc-32bit big-endian
> == cwd: /data/prj/python/python3-3.8/build/test_python_13566116
> == CPU count: 8
> == encodings: locale=ISO8859-1, FS=iso8859-1
> Run tests sequentially
> 0:00:00 [1/1] test_eintr
> test_all (test.test_eintr.EINTRTests) ...
> --- run eintr_tester.py ---
> test_flock (__main__.FNTLEINTRTest) ... ok
> test_lockf (__main__.FNTLEINTRTest) ... ERROR
> test_read (__main__.OSEINTRTest) ... ok
> test_wait (__main__.OSEINTRTest) ... ok
> test_wait3 (__main__.OSEINTRTest) ... ok
> test_wait4 (__main__.OSEINTRTest) ... ok
> test_waitpid (__main__.OSEINTRTest) ... ok
> test_write (__main__.OSEINTRTest) ... ok
> test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll'
> test_epoll (__main__.SelectEINTRTest) ... skipped 'need select.epoll'
> test_kqueue (__main__.SelectEINTRTest) ... skipped 'need select.kqueue'
> test_poll (__main__.SelectEINTRTest) ... ok
> test_select (__main__.SelectEINTRTest) ... ok
> test_sigtimedwait (__main__.SignalEINTRTest) ... ok
> test_sigwaitinfo (__main__.SignalEINTRTest) ... ok
> test_accept (__main__.SocketEINTRTest) ... ok
> test_open (__main__.SocketEINTRTest) ... ok
> test_os_open (__main__.SocketEINTRTest) ... ok
> test_recv (__main__.SocketEINTRTest) ... ok
> test_recvmsg (__main__.SocketEINTRTest) ... ok
> test_send (__main__.SocketEINTRTest) ... ok
> test_sendall (__main__.SocketEINTRTest) ... ok
> test_sendmsg (__main__.SocketEINTRTest) ... ok
> test_sleep (__main__.TimeEINTRTest) ... ok
>
> ==
> ERROR: test_lockf (__main__.FNTLEINTRTest)
> --
> Traceback (most recent call last):
>   File "/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py", 
> line 522, in test_lockf
> self._lock(fcntl.lockf, "lockf")
>   File "/data/prj/python/git/python3-3.8/Lib/test/eintrdata/eintr_tester.py", 
> line 507, in _lock
> lock_func(f, fcntl.LOCK_EX | fcntl.LOCK_NB)
> PermissionError: [Errno 13] Permission denied
>
> --
> Ran 24 tests in 8.822s
>
> FAILED (errors=1, skipped=3)
> --- eintr_tester.py completed: exit code 1 ---
> FAIL
>
> ==
> FAIL: test_all (test.test_eintr.EINTRTests)
> --
> Traceback (most recent call last):
>   File "/data/prj/python/git/python3-3.8/Lib/test/test_eintr.py", line 31, in 
> test_all
> self.fail("eintr_tester.py failed")
> AssertionError: eintr_tester.py failed
>
> --
>
> Ran 1 test in 9.392s
>
> FAILED (failures=1)
> test test_eintr failed
> test_eintr failed
>
> == Tests result: FAILURE ==
>
> 1 test failed:
> test_eintr
>
> Total duration: 9 sec 609 ms
> Tests result: FAILURE
>
> --
>
> ___
> Python tracker 
> 
> ___
>
I have been doing reading and debugging.

Question: does mode "wb" imply also open for reading? Both Freebsd and
AIX man pages specify that a file needs to be open for a shared lock to
even be considered.

Further, AIX talks about "enforced" and "advisory" locks, as well as
"read" and "write" locks. In much older documentation I recall the names
"simple" and "complex" locks. From memory, advisory (aka simple) locks
tend to be exclusive in nature. Shared is only for reading, writing is
always exclusive. I'll have to dig for how "wait" is actually handled -
and work to not confuse "in memory" locks (for multi-threaded locking of
variables) with "file-locking".

Regards,

Michael

--

___
Python tracker 

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



[issue35597] Bug in Python's compiler

2018-12-27 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

For future reference, please don't give screen shots when reporting bugs. Code 
is text, and we don't edit code with Photoshop.

Copy and paste the text, don't take a screen shot. Screen shots make it 
impossible to run the code, and they are difficult for the blind and visually 
impaired who are using a screen-reader.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue35595] Add sys flag to always show full paths in stack traces (instead of relative paths)

2018-12-27 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Python 2.7 is (almost) end of life and well beyond feature-freeze, so this can 
only go into 3.8 or better.

Since the paths logged are relative to the current working directory, perhaps 
you could just have your script log the working directory?

--
nosy: +steven.daprano
type:  -> enhancement
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



[issue8538] Add FlagAction to argparse

2018-12-27 Thread Yaniv Aknin


Change by Yaniv Aknin :


--
nosy:  -Yaniv.Aknin

___
Python tracker 

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



[issue8538] Add FlagAction to argparse

2018-12-27 Thread Ken Williams


Ken Williams  added the comment:

@vstinner - I don't think that conclusion is correct, here is a very 
highly-upvoted answer on SO that indicates a lot of people are still looking 
for this:

https://stackoverflow.com/a/15008806/169947

I myself asked a related (more focused?) question where I was directed here:

https://stackoverflow.com/q/53937481/169947

I'm guessing the right thing to do now would be refocus the merge request in a 
new ticket - is this still the right tracker?

--
nosy: +Ken Williams

___
Python tracker 

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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-27 Thread miss-islington


miss-islington  added the comment:


New changeset a936639b22ca548c00690de6a2964f223f6787cb by Miss Islington (bot) 
(Ned Deily) in branch 'master':
Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 
(GH-11101)" (GH-11332)
https://github.com/python/cpython/commit/a936639b22ca548c00690de6a2964f223f6787cb


--

___
Python tracker 

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



[issue35594] Python script generating Segmentation Fault

2018-12-27 Thread Daugeras


Daugeras  added the comment:

File Attached. To replicate the bug, you have to create directories for files 
to load (CF config data at the start of the script). The bug happens after 
100-200 files are downloaded.

--
Added file: https://bugs.python.org/file48019/SegfaultMinBugReplication.py

___
Python tracker 

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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-27 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +10603, 10605

___
Python tracker 

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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-27 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +10603, 10604

___
Python tracker 

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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-27 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +10603

___
Python tracker 

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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread miss-islington


Change by miss-islington :


--
keywords: +patch, patch, patch
pull_requests: +10600, 10601, 10602

___
Python tracker 

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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread miss-islington


Change by miss-islington :


--
keywords: +patch, patch
pull_requests: +10600, 10601

___
Python tracker 

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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
pull_requests: +10600

___
Python tracker 

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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread miss-islington


miss-islington  added the comment:


New changeset 59c2aa25ffc864bf11bf3b3973828f00e268a992 by Miss Islington (bot) 
(Steve Dower) in branch 'master':
bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple 
times. (GH-11329)
https://github.com/python/cpython/commit/59c2aa25ffc864bf11bf3b3973828f00e268a992


--
nosy: +miss-islington

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

PR11330 is for the PEP8 naming conventions.

--
stage: patch review -> 

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
keywords: +patch, patch, patch
pull_requests: +10597, 10598, 10599
stage:  -> patch review

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
keywords: +patch, patch
pull_requests: +10597, 10598
stage:  -> patch review

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Cheryl Sabella


Change by Cheryl Sabella :


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

___
Python tracker 

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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread Steve Dower


Steve Dower  added the comment:

Thanks for the extra info, and for confirming that 3.6.8 isn't affected (I 
hadn't tried that you, so you saved me some work :) )

This is definitely a new zipimport regression in 3.7.2. Thanks for the report.

--
keywords: +3.7regression -patch, patch
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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread hyu


hyu  added the comment:

Repeated on two clean install Windows hosts.
No (re)packaging, download and run/start python.
Repeated with versions 3.7.2, 3.7.1, and 3.6.8:

https://www.python.org/ftp/python/3.7.2/python-3.7.2-embed-amd64.zip
https://www.python.org/ftp/python/3.7.1/python-3.7.1-embed-amd64.zip
https://www.python.org/ftp/python/3.6.8/python-3.6.8-embed-amd64.zip

Windows Explorer properly extracted: \tmp\py372, \tmp\py371, \tmp\py368.
Python 3.6.8 and 3.7.1 properly started, executed import sys; sys.exit()
Python 3.7.2 failed to start.  Please suggest proper commands if you claim 
these are not proper Windows commands.

Worked extra to show both 3.6 and 3.7 regressions.  If you want to claim 
copying 3.6.8 vcruntime140.dll to 3.7.1 as (re)packaging, then ignore 
v3.7.1:260ec2c36a below.  

Windows Explorer shows and 7-zip lists two vcruntime140.dll in 3.7.2.  Please 
ignore 7-zip if you claim that is not proper or (re)package tool and I will 
attach Windows Explorer screen shot.


Microsoft Windows [Version 10.0.17763.195]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\>\tmp\py368\python
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit 
(AMD64)] on win32
>>> import sys; sys.exit()

C:\>\tmp\py372\python
Fatal Python error: initfsencoding: unable to load the file system codec
zipimport.ZipImportError: can't find module 'encodings'

Current thread 0x2614 (most recent call first):

C:\>copy \tmp\py368\vcruntime140.dll \tmp\py371\
1 file(s) copied.

C:\>\tmp\py371\python
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit 
(AMD64)] on win32
>>> import sys; sys.exit()

C:\>

--
nosy:  -serhiy.storchaka
type: crash -> 

___
Python tracker 

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



[issue35598] IDLE: Modernize config_key module

2018-12-27 Thread Cheryl Sabella


New submission from Cheryl Sabella :

* Apply PEP8 naming convention.
* Add additional tests to get coverage (close?) to 100%.
* Update to more meaningful names.
* Switch to ttk widgets and revise imports.
* Split toplevel class into a window class and frame class(es).

--
assignee: terry.reedy
components: IDLE
messages: 332614
nosy: cheryl.sabella, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Modernize config_key module
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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch, patch, patch
pull_requests: +10594, 10595, 10596
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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch, patch
pull_requests: +10594, 10595
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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch
pull_requests: +10594
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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-27 Thread Ned Deily


Ned Deily  added the comment:


New changeset c540c4ec611246da0c1900fe11a807a54f5c2a0c by Ned Deily in branch 
'2.7':
Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 
(GH-11101)"
https://github.com/python/cpython/commit/c540c4ec611246da0c1900fe11a807a54f5c2a0c


--

___
Python tracker 

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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread Steve Dower


Steve Dower  added the comment:

Okay, this looks like a zipimport issue. When I extract the "python37.zip" file 
containing the stdlib and reference the directory it works fine. But no matter 
what I do to the ZIP I can't get it to run.

It seems that zipimport either can't import .pyc files without a matching .py, 
or it can't import packages marked with __init__.pyc (I haven't gone deep 
enough, but adding encodings/__init__.py got me further).

This is a regression from 3.7.1.

Things to do:
* fix the regression (Serhiy?)
* add a regression test
* add a ".pyc-only stdlib in ZIP" test (I'll do this)
* remove the double vcruntime in ZIP issue (unrelated, so I'll just fix it)

--
nosy: +ned.deily, serhiy.storchaka
priority: normal -> release blocker
stage:  -> test needed
type:  -> crash

___
Python tracker 

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



[issue35594] Python script generating Segmentation Fault

2018-12-27 Thread Ned Deily


Ned Deily  added the comment:

You can either paste or upload a file (click on the "Choose File" button above 
in the web page) with code or with crash info.  For crash info, depending on 
the platform, there may be a Python traceback displayed in the shell session 
and there may be some sort of system-generated crash report, for example, on 
macOS, you might find them in ~/Library/Logs.  You should also include 
information about the platform (os, os version) and the Python version in use.  
With recent versions of Python and if tests are installed, you can get all the 
configuration information with one command, for example:

python3.7 -m test.pythoninfo

--

___
Python tracker 

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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread Steve Dower


Steve Dower  added the comment:

Have you tried a proper install as well? Could you do that to rule out any 
problem on your machine?

Are you repackaging anything as part of your app, or are you just testing the 
package first and getting this error?

It looks like you're running from the directory you extracted to. Is there 
anything else in that directory or just the Python files?

When you say there are two vcruntime140.dll, you mean one in each package and 
they're the same? That might be a problem, but it wouldn't show up like this, 
so I don't think it's yours. I'm not in A position to check the files right now 
but I'll get to it later

--

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2018-12-27 Thread Tal Einat


Tal Einat  added the comment:


New changeset c6c7237272499b2c528acb5f62601421f329e92a by Tal Einat in branch 
'master':
bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213)
https://github.com/python/cpython/commit/c6c7237272499b2c528acb5f62601421f329e92a


--

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2018-12-27 Thread Tal Einat


Tal Einat  added the comment:


New changeset c6c7237272499b2c528acb5f62601421f329e92a by Tal Einat in branch 
'master':
bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213)
https://github.com/python/cpython/commit/c6c7237272499b2c528acb5f62601421f329e92a


--

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2018-12-27 Thread Tal Einat


Tal Einat  added the comment:


New changeset c6c7237272499b2c528acb5f62601421f329e92a by Tal Einat in branch 
'master':
bpo-20182: AC convert remaining functions/methods in _hashopenssl.c (GH-9213)
https://github.com/python/cpython/commit/c6c7237272499b2c528acb5f62601421f329e92a


--

___
Python tracker 

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



[issue35594] Python script generating Segmentation Fault

2018-12-27 Thread Daugeras


Daugeras  added the comment:

@Ned: Of course I understand your feed-back. I can provide a script to 
reproduce the crash. How can I do this ?

--

___
Python tracker 

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



[issue35583] (glibc2.28/MIPS32EL) python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine)

2018-12-27 Thread Gagan


Gagan  added the comment:

of course you have more time to get sanctimonious than provide a substantive or 
insight comment as to what the problem is.

i am not surprised, at all.

--

___
Python tracker 

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



[issue35594] Python script generating Segmentation Fault

2018-12-27 Thread Ned Deily


Ned Deily  added the comment:

Sorry, but without either a full traceback or code that reproduces the problem, 
it is impossible for us to make an intelligent guess what problem you are 
seeing much less suggestion a solution.

--
nosy: +ned.deily

___
Python tracker 

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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread Ned Deily


Change by Ned Deily :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue35583] (glibc2.28/MIPS32EL) python 3.7.x interpreter segmentation fault (3.6.x/2.7.x compile fine)

2018-12-27 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

Your disrespectful comments and insults are not welcome here.

--
nosy: +Mariatta

___
Python tracker 

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



[issue35597] Bug in Python's compiler

2018-12-27 Thread Fady shehata

Fady shehata  added the comment:

yea yea i understand you and you are right thank you and sorry for this
miss understanding 😊


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, 27 Dec 2018 at 18:50, Tim Peters  wrote:

>
> Tim Peters  added the comment:
>
> Please read my answer again.  Your code does not do what you _think_ it
> does.  It does what I said it does instead.
>
> >>> a = input()
> 1010
> >>> print(a)
> 1010
> >>> print(type(a))
> 
>
> The input you're working with is NOT A LIST OF INTEGERS.  It's a string of
> "0" and "1" CHARACTERS.
>
> And I already told you how to repair that too:
>
> >>> a = list(map(int, a))
> >>> a
> [1, 0, 1, 0]
> >>> type(a)
> 
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue35597] Bug in Python's compiler

2018-12-27 Thread Tim Peters


Tim Peters  added the comment:

Please read my answer again.  Your code does not do what you _think_ it does.  
It does what I said it does instead.

>>> a = input()
1010
>>> print(a)
1010
>>> print(type(a))


The input you're working with is NOT A LIST OF INTEGERS.  It's a string of "0" 
and "1" CHARACTERS.

And I already told you how to repair that too:

>>> a = list(map(int, a))
>>> a
[1, 0, 1, 0]
>>> type(a)


--

___
Python tracker 

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



[issue35597] Bug in Python's compiler

2018-12-27 Thread Fady shehata

Fady shehata  added the comment:

look at this if we input (1011) in binary it must give eleven in decimal
but it gives uncollected eleven like 1123 if we add the digits in this
result we will get the right result eleven
[image: Capture2.PNG]


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, 27 Dec 2018 at 18:34, Tim Peters  wrote:

>
> Tim Peters  added the comment:
>
> `input()` returns a string, not a list.  For input '1010' you're
> effectively computing this:
>
> >>> int('1' * 8) + int('1' * 2) # =  + 11
> 1122
>
> which is the correct answer.  If you want your input to be a list of
> integers instead of a string, try, e.g.,
>
> a = input("please enter a binary integer ")
> a = list(map(int, a))
>
> --
> nosy: +tim.peters
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: https://bugs.python.org/file48018/Capture2.PNG

___
Python tracker 

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



[issue35597] Bug in Python's compiler

2018-12-27 Thread Fady shehata


Fady shehata  added the comment:

you didn't understand me, look, if we put (10) in binary it will give (2)
in decimal because ((0*2**0)+(1*2**1), but it gives the tow like that 11 it
means if we add the digits in the result we will get the right result


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, 27 Dec 2018 at 18:34, Tim Peters  wrote:

>
> Tim Peters  added the comment:
>
> `input()` returns a string, not a list.  For input '1010' you're
> effectively computing this:
>
> >>> int('1' * 8) + int('1' * 2) # =  + 11
> 1122
>
> which is the correct answer.  If you want your input to be a list of
> integers instead of a string, try, e.g.,
>
> a = input("please enter a binary integer ")
> a = list(map(int, a))
>
> --
> nosy: +tim.peters
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue35597] Bug in Python's compiler

2018-12-27 Thread Stefan Behnel


Stefan Behnel  added the comment:

I have no doubts that the code is right. However, your expectations might not 
be.

Try to print the values inside of the loop, for each iteration, as well as 
their type. You'll likely be surprised what that gives.

(In any case, this is not a bug. If you need help in understanding what's going 
on here, please ask on the Python mailing list, or consult a local Python 
meetup.)

--
nosy: +scoder, tim.peters
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue35597] Bug in Python's compiler

2018-12-27 Thread Tim Peters


Tim Peters  added the comment:

`input()` returns a string, not a list.  For input '1010' you're effectively 
computing this:

>>> int('1' * 8) + int('1' * 2) # =  + 11
1122

which is the correct answer.  If you want your input to be a list of integers 
instead of a string, try, e.g.,

a = input("please enter a binary integer ")
a = list(map(int, a))

--
nosy: +tim.peters
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue35597] Bug in Python's compiler

2018-12-27 Thread Fady shehata


New submission from Fady shehata :

this code is completely right , and its trace is right and give the correct 
result but your compiler give me an incorrect result. if we input 1010 it must 
give 10, the compiler give ten but uncollected ten like 1122 and if we 
input 111 it's output by your compiler is 1123

--
components: Windows
files: Capture.PNG
messages: 332596
nosy: Fady shehata, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Bug in Python's compiler
type: compile error
versions: Python 3.7
Added file: https://bugs.python.org/file48017/Capture.PNG

___
Python tracker 

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



[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'

2018-12-27 Thread hyu


New submission from hyu :

>python
Fatal Python error: initfsencoding: unable to load the file system codec
zipimport.ZipImportError: can't find module 'encodings'

There are two vcruntime140.dll with no binary diff.
 Date  Time Attr Size   Compressed   Name
--- -    
2018-12-10 22:06:34 .8012845532  vcruntime140.dll
...
2018-12-10 22:06:34 .8012845532  vcruntime140.dll

Repeated downloads. Checked both versions:
https://www.python.org/ftp/python/3.7.2/python-3.7.2-embed-amd64.zip
https://www.python.org/ftp/python/3.7.2/python-3.7.2-embed-win32.zip

Searched and read release and doc. Checked bugs since yesterday.

--
messages: 332595
nosy: hyu
priority: normal
severity: normal
status: open
title: Fatal Python error: initfsencoding: unable to load the file system codec 
zipimport.ZipImportError: can't find module 'encodings'
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



  1   2   >