[issue34560] Backport of uuid1() failure fix

2018-08-31 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy: +yan12125

___
Python tracker 

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



[issue34558] ctypes.find_library processing - missing parenthesis prevents subprocess from getting a returncode

2018-08-31 Thread miss-islington


miss-islington  added the comment:


New changeset 89c9043ee09d89c99f70e61d8fc0ba45e255b055 by Miss Islington (bot) 
in branch '3.7':
bpo-34558: Add missing parentheses in _aix.py (GH-9017)
https://github.com/python/cpython/commit/89c9043ee09d89c99f70e61d8fc0ba45e255b055


--
nosy: +miss-islington

___
Python tracker 

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



[issue34558] ctypes.find_library processing - missing parenthesis prevents subprocess from getting a returncode

2018-08-31 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

Thanks!

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



[issue34558] ctypes.find_library processing - missing parenthesis prevents subprocess from getting a returncode

2018-08-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8491

___
Python tracker 

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



[issue34558] ctypes.find_library processing - missing parenthesis prevents subprocess from getting a returncode

2018-08-31 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:


New changeset 172a71f19bb5e9624651850b315f403c460b9699 by Mariatta (Michael 
Felt) in branch 'master':
bpo-34558: Add missing parentheses in _aix.py (GH-9017)
https://github.com/python/cpython/commit/172a71f19bb5e9624651850b315f403c460b9699


--
nosy: +Mariatta

___
Python tracker 

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



[issue25711] Rewrite zipimport from scratch

2018-08-31 Thread Brett Cannon


Brett Cannon  added the comment:

I'm personally in no rush and I assume Serhiy isn't either with 3.8 cut-off 
quite a ways out, so I see no rush.

--

___
Python tracker 

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



[issue34561] Replace list sorting merge_collapse()?

2018-08-31 Thread Tim Peters


New submission from Tim Peters :

The invariants on the run-length stack are uncomfortably subtle.  There was a 
flap a while back when an attempt at a formal correctness proof uncovered that 
the _intended_ invariants weren't always maintained.  That was easily repaired 
(as the researchers suggested), but it remains hard to grasp why it's always 
correct now.  The Java variant didn't take the suggested fix, instead boosting 
its stack size.  But it turns out that's still not enough, because the original 
researchers made a different mistake in their own paper ;-)

http://drops.dagstuhl.de/opus/volltexte/2018/9467/

Buss & Knop recently published results on different ways of managing the stack, 
and I think they're worth investigating for "real life" use:

https://arxiv.org/abs/1801.04641

Offhand, their "2-merge" looks quite appealing to me.  The only invariant it 
maintains is that each run on the stack is at least twice the length of the run 
one above it on the stack, which can be maintained just by checking the topmost 
two stack entries in the loop.  So, e.g., where merge_collapse() is currently 
happy with runs of lengths 150 and 100 ending the stack, 2-merge would force a 
merge (it's not the case that 150 >= 2*100).  Both are happy if the stack ends 
with runs of lengths 200 and 100.

This is much easier to reason about, simpler to code, and would allow reducing 
the size of the stack (worst-case size is proportional to the log (of the 
largest possible array) to the base 2 instead of to the current base phi 
(~1.62)).  They developed some formal measures showing that its "merge cost" 
(an overall measure abstracting some from real-life behavior) is significantly 
better than timsort's current strategy.  And a little thought convinced me it 
preserves that, for random data, it would continue to strongly tend towared 
triggering perfectly balanced merges (merging runs of the same size).

When I was developing this code, virtually all the time was spent making 
merging itself as fast as possible; the stack-management code was just the 
first thing I tried that "worked well".  But turns out that's the only part 
researchers care about ;-) I'd be pleased if it could be replaced with 
something both better and simpler, or even just simpler but no worse.  But the 
devil's in the details ...

--
messages: 324455
nosy: tim.peters
priority: normal
severity: normal
stage: needs patch
status: open
title: Replace list sorting merge_collapse()?
type: performance
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



[issue34546] Add encryption support to zipfile

2018-08-31 Thread 大野隆弘

大野隆弘  added the comment:

Agree, we should not enhance weak encryption to the world.
But unfortunately, MS Windows supports only this type of encryption as far as I 
researched.
https://blogs.msdn.microsoft.com/oldnewthing/20180515-00/?p=98755

That is the my first motivation of Traditional PKWARE encryption(a.k.a  
ZipCrypto/Standard Zip 2.0 encryption) support.
If this big platform supports AES, we don't have any reason to support. But 
unfortunately not.


On the other hand, encryption algorithm compromising happens forever.
I believe python developers must have ability to make decision of suitable 
algorithm because "We are all (consenting) adults here".(I love this phrase)

Also implementing other algo (including AES) support must affect to decryption 
of zipfile module. 
As we can imagine it should be big task and should be divided.

These are the background of my suggestion.

In summary, 
 1. We don't have to support "weak" encryption like DES/RC2 although they are 
on the document.
 2. But Traditional PKWare Encryption is special enough to support because of 
the circumstances.
 3. Other algo support in both decrypt/encrypt should be implemented sooner or 
later.

Any feedback is welcome.


FYI  : All candidate of Zip encryption
-
(Traditional PKWARE encryption)
+
0x6601 - DES
0x6602 - RC2 (version needed to extract < 5.2)
0x6603 - 3DES 168
0x6609 - 3DES 112
0x660E - AES 128 
0x660F - AES 192 
0x6610 - AES 256 
0x6702 - RC2 (version needed to extract >= 5.2)
0x6720 - Blowfish
0x6721 - Twofish
0x6801 - RC4

https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
7.2.3.2 AlgId

-

FYI 2. Other languages/tools support

Perl : "Support Encryption" is in TODO 
https://metacpan.org/pod/Archive::Zip

Go : Both (AES/Traditional) encryption is going to be integrated( discussion 
was suspended?)
https://github.com/golang/go/issues/12081

Ruby : Supports as experimental
https://github.com/rubyzip/rubyzip/blob/master/README.md


WinZip : Supports but not recommended.
http://kb.winzip.com/help/help_encryption.htm

--

___
Python tracker 

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



[issue25711] Rewrite zipimport from scratch

2018-08-31 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

Not sure if I'll have time before the core sprints to check the implementation 
with shiv, but I can give it a try then.  Do you mind waiting until then?

--

___
Python tracker 

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



[issue34546] Add encryption support to zipfile

2018-08-31 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

>From the official ZIP files specification:

This form of encryption is considered weak by today's standards
and its use is recommended only for situations with
low security needs or for compatibility with older .ZIP
applications.

I think that the support of encrypting ZIP files using the traditional PKWARE 
encryption was intentionally omitted in the zipfile module, because we don't 
want to encourage using such weak encryption method. If you need to add 
encrypted data in the ZIP file, use third-party tools for encrypting it before 
adding to the ZIP file or encrypting the whole ZIP file after creating.

I'm -1 for adding support of weak encrypting.

Of course, adding support for the strong (AES) encryption in ZIP files would be 
nice. But this task is much more difficult.

--
nosy: +alanmcintyre, serhiy.storchaka, twouters

___
Python tracker 

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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-08-31 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +8490

___
Python tracker 

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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-08-31 Thread miss-islington


miss-islington  added the comment:


New changeset 4da71814b327cb2ad47a01710360cd21ba636352 by Miss Islington (bot) 
in branch '3.7':
bpo-34007: Skip traceback tests if the Program Counter is not available. 
(GH-9018)
https://github.com/python/cpython/commit/4da71814b327cb2ad47a01710360cd21ba636352


--

___
Python tracker 

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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-08-31 Thread miss-islington


miss-islington  added the comment:


New changeset 5d594f3106aff6cea00234c88051427ae511cdd8 by Miss Islington (bot) 
in branch '2.7':
bpo-34007: Skip traceback tests if the Program Counter is not available. 
(GH-9018)
https://github.com/python/cpython/commit/5d594f3106aff6cea00234c88051427ae511cdd8


--
nosy: +miss-islington

___
Python tracker 

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



[issue34560] Backport of uuid1() failure fix

2018-08-31 Thread Riccardo Mottola


New submission from Riccardo Mottola :

Backport proposal of fix for closed issue 32502 

The patch was directly adapted from
https://github.com/python/cpython/commit/d69794f4df81de731cc66dc82136e28bee691e1e


applied to 2.7 and tested working for me.

Discussion ongoing MacPorts requested to share said patch upstream

https://github.com/macports/macports-ports/pull/2456

--
components: Library (Lib)
files: uuid-64bit.patch
keywords: patch
messages: 324449
nosy: Riccardo Mottola
priority: normal
severity: normal
status: open
title: Backport of uuid1() failure fix
type: crash
versions: Python 2.7
Added file: https://bugs.python.org/file47776/uuid-64bit.patch

___
Python tracker 

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



[issue18307] Relative path in co_filename for zipped modules

2018-08-31 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The patch for the Python implementation of zipimport (see issue25711) is much 
simpler (see the attached sample patch). But it requires adding a way of 
modifying co_filename. Currently code objects are immutable.

This issue looks as a part of the larger problem. Zipimport is not the only 
source of precompiled bytecode which needs updating co_filename. For example 
the tree of py and pyc files can be moved to other place. Also, since 
co_filename contains system depended path, it doesn't make sense when load pyc 
files on other system (for example if they were created on Linux and ran on 
Windows). On other side, the import machinery tries to load pyc and py files, 
therefore it should know the path of corresponding py file when load a pyc 
file. Maybe it be better to not save co_filename in a pyc file (note that all 
code object in a file have the same co_filename, but it is saved for every code 
object), but set co_filename after unmarshalling the module bytecode by the 
import machinery in all loaders.

--
Added file: https://bugs.python.org/file47775/pyzipimport-code-filename.diff

___
Python tracker 

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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-08-31 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-08-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8489

___
Python tracker 

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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-08-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8487

___
Python tracker 

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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-08-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8488

___
Python tracker 

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



[issue34559] multiprocessing AuthenticationError when nesting with non-default authkey

2018-08-31 Thread natedogith1


New submission from natedogith1 :

If you nest shared objects on a manager that doesn't use the default authkey, 
you get an AuthenticationError.

import multiprocessing.managers
a = multiprocessing.managers.SyncManager(authkey=b'')
a.start()
b = a.list()
b.append(a.list())
_ = b[0]

--
components: Library (Lib)
messages: 324447
nosy: natedogith1
priority: normal
severity: normal
status: open
title: multiprocessing AuthenticationError when nesting with non-default authkey
versions: Python 3.6

___
Python tracker 

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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-08-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset f2ef51f8bec525b21e5290c8a029642795ed by Pablo Galindo in 
branch 'master':
bpo-34007: Skip traceback tests if the Program Counter is not available. 
(GH-9018)
https://github.com/python/cpython/commit/f2ef51f8bec525b21e5290c8a029642795ed


--

___
Python tracker 

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



[issue34546] Add encryption support to zipfile

2018-08-31 Thread Brett Cannon


Change by Brett Cannon :


--
title: Zipfile encryption function -> Add encryption support to zipfile

___
Python tracker 

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



[issue25711] Rewrite zipimport from scratch

2018-08-31 Thread Brett Cannon


Brett Cannon  added the comment:

I think Serhiy's PR is basically done, so now the question is do we want to 
merge it in and drop the C code? ;)

I obviously say yes because this is I/O-bound code and so the switch shouldn't 
be enough of a performance hit to warrant blocking the gain in maintainability 
long-term (especially if we try to clean the module up slowly).

Barry, since I know you work with zip files a lot at work did you want to check 
to make sure perf won't be an issue for your use-case?

--

___
Python tracker 

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



[issue34408] possible null pointer dereference in pystate.c

2018-08-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 95d630e2213fb0ffc197ec440efa3ae3dbb74f8d by Pablo Galindo in 
branch 'master':
bpo-34408: Prevent a null pointer dereference and resource leakage in 
`PyInterpreterState_New()` (GH-8767)
https://github.com/python/cpython/commit/95d630e2213fb0ffc197ec440efa3ae3dbb74f8d


--

___
Python tracker 

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



[issue34521] test_socket.RecvmsgIntoSCMRightsStreamTest fails on AMD64 FreeBSD CURRENT Debug 3.x

2018-08-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This error happens a lot in the same buildbot in different tests:

raceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/multiprocessing/process.py",
 line 297, in _bootstrap
self.run()
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/multiprocessing/process.py",
 line 99, in run
self._target(*self._args, **self._kwargs)
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py",
 line 3335, in child_access
w = conn.recv()
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/multiprocessing/connection.py",
 line 251, in recv
return _ForkingPickler.loads(buf.getbuffer())
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/multiprocessing/connection.py",
 line 960, in rebuild_connection
fd = df.detach()
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/multiprocessing/resource_sharer.py",
 line 58, in detach
return reduction.recv_handle(conn)
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/multiprocessing/reduction.py",
 line 185, in recv_handle
return recvfds(s, 1)[0]
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd-current/build/Lib/multiprocessing/reduction.py",
 line 161, in recvfds
len(ancdata))
RuntimeError: received 0 items of ancdata

--

___
Python tracker 

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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-08-31 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue34499] Extend registering of single-dispatch functions to parametrized generic pseudo-types

2018-08-31 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue34443] enum repr should use __qualname__

2018-08-31 Thread orlnub123


orlnub123  added the comment:

After some thinking I've come to the conclusion that making the __str__s use 
the fully qualified name was a bad idea. I've closed my PR.

--

___
Python tracker 

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



[issue34558] ctypes.find_library processing - missing parenthesis prevents subprocess from getting a returncode

2018-08-31 Thread Michael Felt


Change by Michael Felt :


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

___
Python tracker 

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



[issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned

2018-08-31 Thread Ethan Furman


Change by Ethan Furman :


--
assignee:  -> ethan.furman
nosy: +ethan.furman

___
Python tracker 

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



[issue34558] ctypes.find_library processing - missing parenthesis prevents subprocess from getting a returncode

2018-08-31 Thread Michael Felt


New submission from Michael Felt :

With AIX I have seen the following messages repeatedly:

root@x066:[/data/prj/python/python3-3.8]./python 
../git/*3.8/Lib/ctypes/test/test_loading.py
/data/prj/python/git/python3-3.8/Lib/subprocess.py:852: ResourceWarning: 
subprocess 11796734 is still running
  ResourceWarning, source=self)
/data/prj/python/git/python3-3.8/Lib/subprocess.py:852: ResourceWarning: 
subprocess 11796480 is still running
  ResourceWarning, source=self)

There is python2 to python3 missed change typo that is preventing the 
returncode from ever being determined

diff --git a/Lib/ctypes/_aix.py b/Lib/ctypes/_aix.py
index 463f60a284..190cac6507 100644
--- a/Lib/ctypes/_aix.py
+++ b/Lib/ctypes/_aix.py
@@ -115,7 +115,7 @@ def get_ld_headers(file):
 else:
 break
 p.stdout.close()
-p.wait
+p.wait()
 return ldr_headers

 def get_shared(ld_headers):

PR will be posted.

--
components: Library (Lib), Tests
messages: 324441
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: ctypes.find_library processing - missing parenthesis prevents subprocess 
from getting a returncode
type: behavior
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



[issue34557] When sending binary file to a Microsoft FTP server over FTP TLS, the SSL unwind method hangs

2018-08-31 Thread James Campbell


New submission from James Campbell :

When using the FTP library to transfer a binary file to a Microsoft FTP server 
using TLS, then the library will hang when unwinding the connection until it 
finally times out.

The storbinary method calls conn.unwind which seems to have an issue with SSL 
connections with a Microsoft server. If we terminate the connection early the 
file is successfully transferred so it's just the unwind procedure that crashes 
and hangs our server until it times out.


We are able to work around it by creating our own version of the storbinary 
method which just closes the connection and doesn't do the unwind step.

It's not clear why the library does this step since we never need to drop down 
to an unencrypted connection so it should be enough to just close it once done.

You can read more information on this by somebody else with Python 3.2
http://www.sami-lehtinen.net/blog/python-32-ms-ftps-ssl-tls-lockup-fix

--
components: Library (Lib)
messages: 324440
nosy: James Campbell2
priority: normal
severity: normal
status: open
title: When sending binary file to a Microsoft FTP server over FTP TLS, the SSL 
unwind method hangs
type: crash
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34551] Redundant store can be removed from _PyFunction_FastCallDict

2018-08-31 Thread Eric Lippert


Eric Lippert  added the comment:

If it were possible that the interpreter iterating over a dictionary could 
cause the dictionary to change size then I suspect that this would be a rich 
source of bugs to mine. :-) 

It would be great if we could make it a documented, enforced invariant that the 
interpreter reading a dictionary never produces a side effect visible to the 
interpreter.

Re: "this specific statement already existed before my work."

Thanks for the historical note; the first thing I thought when I read this line 
was "that's got to be a copy-paste left over from an earlier version of the 
algorithm."

--

___
Python tracker 

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



[issue34496] Argparse library: parse --set type

2018-08-31 Thread Éric Araujo

Éric Araujo  added the comment:

In my experience, a more common way to say “stop parsing and take the remaining 
arguments as one value” is using `--`.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue34465] ipaddress should accept bytearray in addition to bytes

2018-08-31 Thread Xiang Zhang


Xiang Zhang  added the comment:

I'm -1 on this change. I think the workaround is easy and direct.

--

___
Python tracker 

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



[issue34551] Redundant store can be removed from _PyFunction_FastCallDict

2018-08-31 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +tim.peters

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2018-08-31 Thread Christoph Reiter


Christoph Reiter  added the comment:

To add one more use case for this:

concurrent.futures.Future.add_done_callback() currently ignores exceptions for 
the callback and just logs them which is easy to miss. I assume because it's 
not clear when and in which thread it gets called, and there is no "right" way 
to handle it.

It would be nice if it would call something like sys.excepthook instead.

--
nosy: +lazka

___
Python tracker 

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



[issue34556] Add --upgrade to venv module

2018-08-31 Thread Cooper Lees


Cooper Lees  added the comment:

Thanks for hi-lighting, yes, sorry. I should of been clearer here.

What should we use other than `--upgrade`? I just wanted the topic to be 
generic:
- `-U`
- `--upgrade-modules`
- `--pip-upgrade`
- `--pull-latest`

In regards to using subprocess, it calls exec or fork to run the child 
process/command, so that's what I wished to communicate via the term 'fork'.

--

___
Python tracker 

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



[issue34062] Python launcher on Windows does not work with --list or --list-paths

2018-08-31 Thread Steve Dower


Steve Dower  added the comment:

Thanks, Brendan!

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



[issue34556] Add --upgrade to venv module

2018-08-31 Thread Zachary Ware


Zachary Ware  added the comment:

This sounds good to me; my `python -m venv venv` commands are also almost 
always followed up by `venv/bin/python -m pip install -U pip setuptools wheel`. 
 I wouldn't get the `wheel` from this, but it's not always necessary anyway.

Rather than importing or forking, I would expect this could just be done by 
invoking the venv's pip as a subprocess.

Also, it would need to be a different flag than `--upgrade`, which already 
exists.

--
nosy: +vinay.sajip, zach.ware

___
Python tracker 

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



[issue34062] Python launcher on Windows does not work with --list or --list-paths

2018-08-31 Thread miss-islington


miss-islington  added the comment:


New changeset 5df3658f2db1585607d41c25093a2a7d2a4de347 by Miss Islington (bot) 
in branch '3.7':
bpo-34062: Add missing launcher argument and make behavior consistent between 
short and long arguments (GH-8827)
https://github.com/python/cpython/commit/5df3658f2db1585607d41c25093a2a7d2a4de347


--
nosy: +miss-islington

___
Python tracker 

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



[issue34556] Add --upgrade to venv module

2018-08-31 Thread Cooper Lees


New submission from Cooper Lees :

I'd like to propose add a `--upgrade` to venv module to automatically update 
pip and potentially setuptools if supplied. This will allow ensuring you have 
the latest and greatest of these core components.

Example Usage:
python3 -m venv --upgrade /tmp/awesome_venv

This will allow me to skip my next command that I usually always do:
/tmp/awesome_venv/bin/pip install --upgrade pip setuptools

Thoughts? If people are happy, I will look at doing the PR. 

I would envision I'll either import (which seems to be a no no from pip 
maintainers) the upgrade code or just fork pip ...

--
components: Library (Lib)
messages: 324431
nosy: cooperlees
priority: normal
severity: normal
status: open
title: Add --upgrade to venv 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



[issue34555] AF_VSOCK not unset because of wrong nesting

2018-08-31 Thread Thomas Herzog


Change by Thomas Herzog :


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

___
Python tracker 

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



[issue34554] Add match built-in function

2018-08-31 Thread mokhalid


mokhalid  added the comment:

Thanks so much, I will do it :)

--

___
Python tracker 

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



[issue34062] Python launcher on Windows does not work with --list or --list-paths

2018-08-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8483

___
Python tracker 

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



[issue34554] Add match built-in function

2018-08-31 Thread Eric Snow


Eric Snow  added the comment:

Thanks for the proposal.  At first glance I actually kind of like the idea, 
though I can't offer much more feedback than that without taking some time to 
think it through. :)

That said, proposals like this for new syntax and other new language features 
are best suited for the python-id...@python.org mailing list. [1]  I recommend 
you make a post there.  I'm closing the issue as "rejected" because it belongs 
on python-ideas instead of here, not because we're rejecting the idea. :)

Thanks again!  I hope you post something about this to python-ideas.

[1] https://mail.python.org/mailman/listinfo/python-ideas

--
nosy: +eric.snow
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue34062] Python launcher on Windows does not work with --list or --list-paths

2018-08-31 Thread Steve Dower


Steve Dower  added the comment:


New changeset aada63b20ec64bbfc4f2fb0718fc563eedbdd36a by Steve Dower (Brendan 
Gerrity) in branch 'master':
bpo-34062: Add missing launcher argument and make behavior consistent between 
short and long arguments (GH-8827)
https://github.com/python/cpython/commit/aada63b20ec64bbfc4f2fb0718fc563eedbdd36a


--

___
Python tracker 

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



[issue34555] AF_VSOCK not unset because of wrong nesting

2018-08-31 Thread Thomas Herzog

New submission from Thomas Herzog :

If ./configure runs with the following result...

checking for linux/vm_sockets.h... no
checking for sockaddr_alg... no

...then the result of the first check is treated as if it was "yes". This is 
because the logic for disabling the vm_sockets functionality is nested inside 
an #ifdef HAVE_SOCKADDR_ALG.

This leads to compilation errors:

In file included from ./Modules/socketmodule.c:283:0:
./Modules/socketmodule.h:206:24: error: field ‘vm’ has incomplete type
 struct sockaddr_vm vm;
^

--
components: Extension Modules
messages: 324427
nosy: mcduke
priority: normal
severity: normal
status: open
title: AF_VSOCK not unset because of wrong nesting
type: compile error
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



[issue34554] Add match built-in function

2018-08-31 Thread mokhalid


Change by mokhalid :


--
title: Add match built in functio -> Add match built-in function

___
Python tracker 

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



[issue34554] Add match built in functio

2018-08-31 Thread mokhalid


Change by mokhalid :


--
title: add match built in function -> Add match built in functio

___
Python tracker 

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



[issue34554] add match built in function

2018-08-31 Thread mokhalid


mokhalid  added the comment:

sorry I forget to print text i mean:
match([2,5,4,'Hello']):
  2: print('here is 2')
  6: print('here is 6')
elif 'Hello': print('Hello world')
  8:print('here is 8')
elif 'python': print('Hello world')
else: print('MoKhalid')

--

___
Python tracker 

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



[issue34554] add match built in function

2018-08-31 Thread mokhalid


New submission from mokhalid :

match built-in function feature request:

what is the match function do?
the match function is doing something like if but with quick easy syntax that 
even beginners can use.

possible syntax:

match(list or string or dictionary):
  condition: event here
  condition: event here
#all conditions are applied at the same time as if not elif and else
#but you use elif or else.

ex:
match(list or string or dictionary):
  condition: event here
  condition: event here
elif condition: event here
else: event here
 

example of what I mean:
match([2,5,4,'Hello']):
  2: print('here is 2')
  6: print('here is 6')
elif 'Hello': ('Hello world')
  8:print('here is 8')
elif 'python': ('Hello world')
else: print('MoKhalid')

the output should look like:
here is 2
Hello world
MoKhalid

--
components: Regular Expressions
messages: 324425
nosy: MoKhaild, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: add match built in function
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



[issue34097] ZIP does not support timestamps before 1980

2018-08-31 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Petr Viktorin for reporting this issue and thanks Marcel Plch for the 
fix!

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



[issue34097] ZIP does not support timestamps before 1980

2018-08-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 77b112cd56a50232abcdbf28f9aba88dc5d33ad3 by Victor Stinner 
(Marcel Plch) in branch 'master':
bpo-34097: Polish API design (GH-8725)
https://github.com/python/cpython/commit/77b112cd56a50232abcdbf28f9aba88dc5d33ad3


--

___
Python tracker 

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



[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2018-08-31 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2018-08-31 Thread STINNER Victor


STINNER Victor  added the comment:

My concern is more about backward compatibility. Documentation is one thing, 
but usually users rely on the actual implementation, not on the documentation, 
to define what is the Python behaviour.

Would you mind to open a thread on python-dev about this change?

I don't want to take the responsibility alone of such change :-) Moreover, I 
don't really have the bandwidth to work on this specific issue :-(

--

___
Python tracker 

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



[issue34553] Python Crashes when trying to access any date related fields in MailItem

2018-08-31 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

win32com is part of pywin32, which is a 3th-party extension. Please check with 
that project first (if there is bug it is probably on that side).

--
components: +Windows
nosy: +paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware
resolution:  -> third party

___
Python tracker 

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



[issue34551] Redundant store can be removed from _PyFunction_FastCallDict

2018-08-31 Thread STINNER Victor


STINNER Victor  added the comment:

> I think it is technically not possible. Neither PyDict_Next() nor Py_INCREF() 
> mutate the dict, call the user code or release GIL. If it could be possible, 
> we would have a potential writing out of a buffer here.

When I read PyDict_Next(), I'm thinking at the Python level which can execute 
arbitrary code. But it seems like you are right: the exact C implementation of 
PyDict_Next() doesn't seem to modify the dictionary.

PR 9009 seems safe.

--

___
Python tracker 

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



[issue34347] AIX: test_utf8_mode.test_cmd_line fails

2018-08-31 Thread STINNER Victor


STINNER Victor  added the comment:

> The buildbots seem happy. This may be closed.

Cool, thank you for checking, and thanks for your fix! I close the issue.

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

___
Python tracker 

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



[issue34553] Python Crashes when trying to access any date related fields in MailItem

2018-08-31 Thread Vijay


Vijay  added the comment:

i have already added the script. try to run in the python3.7. python is getting 
crashed.

--

___
Python tracker 

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



[issue34553] Python Crashes when trying to access any date related fields in MailItem

2018-08-31 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

There is a very similar SO question 
https://stackoverflow.com/questions/51885734/python-crashes-when-i-am-trying-to-access-any-date-related-fields-in-mailitem-co
 which points to an AttributeError. Is this a case where Python segfaults or 
there is some stacktrace? Any chance you can provide the message or a 
reproducible script for this? I also hope this is something related 
specifically to Windows and someone might add in here about this.

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue17239] XML vulnerabilities in Python

2018-08-31 Thread STINNER Victor


STINNER Victor  added the comment:

This issue didn't get much attention in 5 years. The XML documentation starts 
with a big red warning:
https://docs.python.org/dev/library/xml.html

The warning is present in 2.7 and 3.4 as well:
https://docs.python.org/2.7/library/xml.html
https://docs.python.org/3.4/library/xml.html

It seems like XML is getting less popular because of JSON becoming more popular 
(JSON obviously comes with its own set of security issues). It seems like less 
core developers care about XML.

I suggest to:

* close bpo-17318 as a duplicate of this issue (bpo-17239)
* close bpo-24238
* close this issue

We just have to accept that core developers have limited availability and that 
documenting security issues is an acceptable tradeoff. I don't see any value of 
keeping these 3 issues open.

--
nosy: +vstinner

___
Python tracker 

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



[issue34282] Enum._convert shadows members named _convert

2018-08-31 Thread Ethan Furman


Ethan Furman  added the comment:

For versions 3.6 and 3.7 the solution is to modify the shadow check at line 236 
so only DynamicClassAttributes are /not/ shadowed (meaning the _convert method 
would be shadowed by an _convert member).

For 3.8 we can move _convert to the metaclass: I wasn't originally supportive 
of this idea, but I can see it being useful for other Enum mix-ins such as str. 
 However, I will want to include a check that such a mix-in is there -- 
probably by checking that the Enum type is a subclass of the first member's 
type... something like:

if not issubclass(cls, members[0]):
   raise TypeError(...)

While we're making that change we can also check that members is not empty and 
issue a friendlier error message.

We can also rename _convert to _convert_ in 3.8, but we'll need to have 
_convert also on the metaclass and have it trigger a warning that _convert_ is 
now the right way, and _convert will go away in 3.9.

--

___
Python tracker 

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



[issue34282] Enum._convert shadows members named _convert

2018-08-31 Thread Ethan Furman


Change by Ethan Furman :


--
Removed message: https://bugs.python.org/msg324414

___
Python tracker 

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



[issue34282] Enum._convert shadows members named _convert

2018-08-31 Thread Ethan Furman


Ethan Furman  added the comment:

For versions 3.6 and 3.7 the solution is to modify the shadow check at line 236 
so only DynamicClassAttributes are /not/ shadowed (meaning the _convert method 
would be shadowed by an _convert member).

For 3.8 we can move _convert to the metaclass: I wasn't originally supportive 
of this idea, but I can see it being useful for other Enum mix-ins such as str. 
 However, I will want to include a check that such a mix-in is there -- 
probably by checking that the Enum type is a subclass of the first member's 
type... something like:

if not issubclass(cls, members[0]):
   raise TypeError(...)
While we're making that change we can also check that members is not empty and 
issue a friendlier error message.

We can also rename _convert to _convert_ in 3.8, but we'll need to have 
_convert also on the metaclass and have it trigger a warning that _convert_ is 
now the right way, and _convert will go away in 3.9.

--

___
Python tracker 

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



[issue34551] Redundant store can be removed from _PyFunction_FastCallDict

2018-08-31 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think it is technically not possible. Neither PyDict_Next() nor Py_INCREF() 
mutate the dict, call the user code or release GIL. If it could be possible, we 
would have a potential writing out of a buffer here.

--

___
Python tracker 

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



[issue34373] test_time errors on AIX

2018-08-31 Thread Michael Felt


Michael Felt  added the comment:

Would be very nice to get this to clear on the build bots!

--

___
Python tracker 

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



[issue34382] test_os.test_mode fails when directory base directory has g+s set

2018-08-31 Thread Michael Felt


Michael Felt  added the comment:

For now, backport only means, imho to 3.7 and maybe 3.6. More could be merrier 
- but the goal is to clear the buildbots for regression testing.

This one is quite simple - so adding 2.7 to the list of backports would be 
great.

--
versions: +Python 2.7, 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



[issue34490] transport.get_extra_info('sockname') of test_asyncio fails on AIX

2018-08-31 Thread Michael Felt


Michael Felt  added the comment:

Even if it is just in the spirit of issue29972 I hope this can be given a quick 
review and have yet one less test failing on the AIX bots.

--

___
Python tracker 

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



[issue34347] AIX: test_utf8_mode.test_cmd_line fails

2018-08-31 Thread Michael Felt


Michael Felt  added the comment:

The buildbots seem happy. This may be closed.

--

___
Python tracker 

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



[issue34538] Remove encouragement to author a base class for all Exception subclasses in a module

2018-08-31 Thread INADA Naoki


INADA Naoki  added the comment:

> https://github.com/search?q=%22except+TemplateError%22=Code

For example, I found flask_mako's TemplateException in this search result.

Strictly speaking, this is not base exception class.  It is wraps exception 
during template rendering.  But "why this class is useful?" is very similar to 
base exception class.

It provides better traceback for mako template.  They use this class for 
"particular reason", not because it's generally recommended practice.

And this "particular reason" shouldn't be in Python tutorial, clearly.

---

If we really need exception class hierarchy in tutorial, I think OSError is the 
best example.  When opening a file, `except OSError:` is much better than 
`except (PermissionError, FileNotFound, ...)`.  It's the most clear example 
when common base class for some distinct exceptions is useful.

--

___
Python tracker 

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



[issue34551] Redundant store can be removed from _PyFunction_FastCallDict

2018-08-31 Thread STINNER Victor


STINNER Victor  added the comment:

Technically it's possible that the dictionary mutates itself during iterating 
and so that it's size change, so "nk = i / 2;" make sure that we pass the 
proper length to the function call.

Maybe I'm wrong, but we would need an unit test for that.

While I reworked a lot of code in call.c (and I moved code to call.c ;-)), this 
specific statement already existed before my work. I moved it from somewhere 
else. Extract of Objects/funcobject.c:

static PyObject *
function_call(PyObject *func, PyObject *arg, PyObject *kw)
{
...
if (kw != NULL && PyDict_Check(kw)) {
...
while (PyDict_Next(kw, , [i], [i+1])) {
Py_INCREF(k[i]);
Py_INCREF(k[i+1]);
i += 2;
}
nk = i/2;
}
...
}

It seems like the code is quite old :-)

commit 6d6c1a35e08b95a83dbe47dbd9e6474daff00354
Author: Tim Peters 
Date:   Thu Aug 2 04:15:00 2001 +

Merge of descr-branch back into trunk.

--

___
Python tracker 

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



[issue34553] Python Crashes when trying to access any date related fields in MailItem

2018-08-31 Thread Vijay


New submission from Vijay :

MailItem.SentOn or MailItem.ReceivedTime, Python crashes with windows showing 
"Python has stopped working" dialog window. What can be the cause of this issue?

import win32com.client
import os
import datetime
from datetime import timedelta
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox = outlook.GetDefaultFolder(6)
messages=inbox.Items
message = messages.GetLast()

print(type(message))

t = message.ReceivedTime    crashes when the script is reached this line.

Attached the screenshot for your reference.

--
files: python crash.PNG
messages: 324406
nosy: vijay
priority: normal
severity: normal
status: open
title: Python Crashes when trying to access any date related fields in MailItem
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file47774/python crash.PNG

___
Python tracker 

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



[issue34538] Remove encouragement to author a base class for all Exception subclasses in a module

2018-08-31 Thread INADA Naoki


INADA Naoki  added the comment:

I didn't claim this pattern is not used anymore.
My point is "should we suggest this pattern for tutorial readers?"

* Is this pattern recommended blindly?  -- I think no.
* How / when this pattern is recommended?  -- When there is use case people 
want to catch the base exception.
* Should it be in tutorial?  -- I doubt it.  This topic requires some 
experience to understand.

--

___
Python tracker 

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



[issue34461] Availability of parsers in etree initializer

2018-08-31 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +8482

___
Python tracker 

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