[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think the timestamptz converter should either interpret strings without timezone as UTC (and perhaps understand the "Z" suffix as sqlite3 date() function) or raises an error. It should never return naive datetime. The timestamp converter needs better

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Xiang Zhang
Xiang Zhang added the comment: > I think the timestamptz converter should either interpret strings without > timezone as UTC (and perhaps understand the "Z" suffix as sqlite3 date() > function) or raises an error. It should never return naive datetime. Currently timestamptz just convert back

[issue29241] sys._enablelegacywindowsfsencoding() don't apply to os.fsencode and os.fsdecode

2017-01-11 Thread JGoutin
JGoutin added the comment: import sys # Force the use of legacy encoding like versions of Python prior to 3.6. sys._enablelegacywindowsfsencoding() # Show actual file system encoding encoding = sys.getfilesystemencoding() print('File system encoding:', encoding) # os.fsencode(filename) VS

[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2017-01-11 Thread Thomas Nyberg
Thomas Nyberg added the comment: Hi Mark Haase, I've gone through both of your patches and they both work for me as they should. I'm not sure why the first one isn't working for you, since it works for me. That one seems like it's solving the problem the "right" way. In any case, the second

[issue11681] -b option undocumented

2017-01-11 Thread Nick Coghlan
Nick Coghlan added the comment: Added some review comments on the patch. The only critical one was changing a :class:`bytes` reference to :class:`unicode`, but I also suggested it may be worth mentioning that it *doesn't* enable warnings about all binary/text comparisons the way the Python 3

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Naive and aware objects should not be mixed. Their actually are different types. The converter doesn't return str or bytes when can't parse an input as a datetime, and it shouldn't return a naive datetime if can't find a timezone. SQLite date and time

[issue29006] 2.7.13 _sqlite more prone to "database table is locked"

2017-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset dd13098a5dc2 by Benjamin Peterson in branch '2.7': revert 030e100f048a (#29006, #10513) https://hg.python.org/cpython/rev/dd13098a5dc2 -- nosy: +python-dev ___ Python tracker

[issue10513] sqlite3.InterfaceError after commit

2017-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset dd13098a5dc2 by Benjamin Peterson in branch '2.7': revert 030e100f048a (#29006, #10513) https://hg.python.org/cpython/rev/dd13098a5dc2 -- ___ Python tracker

[issue10513] sqlite3.InterfaceError after commit

2017-01-11 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: fixed -> status: closed -> open ___ Python tracker ___

[issue11681] -b option undocumented

2017-01-11 Thread Nick Coghlan
Nick Coghlan added the comment: Right, the lack of transitivity comes from the fact that: >>> u"3" == str(3) True Is really shorthand for: >>> u"3" == str(3).decode("ascii") True However, the implicit decoding only triggers for *exactly* bytes instances, so in the bytearray

[issue22343] Install bash activate script on Windows when using venv

2017-01-11 Thread Kevin Christopher Henry
Kevin Christopher Henry added the comment: I can confirm that LF endings work fine on Cygwin, and it's hard to imagine any bash implementation not handling that properly. -- ___ Python tracker

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Xiang Zhang
Xiang Zhang added the comment: timestamptz.patch implements a new converter that's able to convert aware datetime objects. -- stage: needs patch -> patch review Added file: http://bugs.python.org/file46265/timestamptz.patch ___ Python tracker

[issue29246] typing.Union raises RecursionError when comparing Union to other type

2017-01-11 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- type: crash -> behavior versions: -Python 2.7, Python 3.3, Python 3.4 ___ Python tracker

[issue29218] distutils: Remove unused install_misc class

2017-01-11 Thread Greg Ward
Greg Ward added the comment: LGTM, after a cursory glance at the code history. Been a lng time since I understood this stuff deeply, though! -- ___ Python tracker

[issue29247] Document return value of epoll.poll

2017-01-11 Thread Nathaniel Smith
New submission from Nathaniel Smith: The documentation for select.epoll.poll doesn't document the return value at all, which is somewhat important information :-) I think it's a list of (fd, eventmask) tuples? https://docs.python.org/3.7/library/select.html#select.epoll.poll --

[issue29220] Python 3.6 regression/change using logging.addLevelName() to clear a name

2017-01-11 Thread Vinay Sajip
Vinay Sajip added the comment: OK, will apply to 3.5 -> default. -- ___ Python tracker ___ ___

[issue29220] Python 3.6 regression/change using logging.addLevelName() to clear a name

2017-01-11 Thread Vinay Sajip
Vinay Sajip added the comment: > The fix should be applied to 3.5. Are you sure? $ python3.5 Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import logging >>>

[issue29220] Python 3.6 regression/change using logging.addLevelName() to clear a name

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm sure. e4b6faf22e8d is in 3.5 branch. -- ___ Python tracker ___ ___

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Xiang Zhang
Xiang Zhang added the comment: > LGTM except that arguments of assertEqual() should be swapped. Thanks Serhiy! I'll take care of that. One problem remained is what to do with 2.7. There is no timezone object in 2.7. My preference is just pointing out the limitation that only naive datetime

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Xiang Zhang
Xiang Zhang added the comment: I asked whether this should be treated as an enhancement or bug fix. Now with your concerns I think it fits as enhancement more. > Is it possible to make the support optional for 3.5 and 3.6 and only enable > it for 3.7 (with the possibility of disabling it

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I don't think this can be considered a bug fix, since it changes behavior for applications that read data from SQLite databases which were not created by Python. Those application may now see datetime values with tz infos and will likely not be prepared

[issue27603] Migrate IDLE context menu items to shell extension

2017-01-11 Thread Shane Smith
Shane Smith added the comment: Hi Vedran, that seems to now be the default behavior, regardless of previous installs (my 3.6 was a clean install, and it's still nested). Kind of a pain if you want to edit with IDLE frequently. While we wait for a more integrated solution, the hackish way to

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Michael Foord
Michael Foord added the comment: LGTM Serhiy - thank you for your work. Appreciated. -- ___ Python tracker ___

[issue29244] Python 3.6 unnecessarily requires inttypes.h

2017-01-11 Thread rdb
New submission from rdb: Python 3.6 now requires inttypes.h on all platforms. However, this is not provided by MSVC 2010 and 2012, which is still used by some people who build extension modules for Python. MSVC 2010 does provide stdint.h, and replacing the inttypes.h include with an include

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 98f061402fcf by Serhiy Storchaka in branch 'default': Issue #20804: The unittest.mock.sentinel attributes now preserve their https://hg.python.org/cpython/rev/98f061402fcf -- nosy: +python-dev ___ Python

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 398b73dbb1a0 by Serhiy Storchaka in branch '3.5': Issue #20804: Document the limitation of the unittest.mock.sentinel attributes. https://hg.python.org/cpython/rev/398b73dbb1a0 -- ___ Python tracker

[issue29213] python -m venv activate.bat has weird mix of line endings

2017-01-11 Thread Vinay Sajip
Vinay Sajip added the comment: Although we don't currently have binaries under venv/scripts, that might change in the future. The logic could be changed to: with open(srcfile, 'rb') as f: data = f.read() if not srcfile.endswith('.exe'): try: data =

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Michael. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue22343] Install bash activate script on Windows when using venv

2017-01-11 Thread Vinay Sajip
Vinay Sajip added the comment: If we do this, the activate script will have LF (POSIX) line endings on Windows. Will this work for things like cygwin, Git-bash etc? -- ___ Python tracker

[issue29231] Broken MSIs in Python 3.5+

2017-01-11 Thread Steve Dower
Steve Dower added the comment: "msiexec /a" does not install anything - it converts the MSI into a source layout for lazy network installs. It is, and always has been, completely unsupported as an approach to installing Python, and we are under no obligation to maintain it. Copy-pasting the

[issue29244] Python 3.6 unnecessarily requires inttypes.h

2017-01-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Build -Extension Modules nosy: +benjamin.peterson type: -> compile error versions: +Python 3.7 ___ Python tracker

[issue27603] Migrate IDLE context menu items to shell extension

2017-01-11 Thread Steve Dower
Steve Dower added the comment: The last time I saw collected data on usage (based on Visual Studio users), there was no clear majority of "number of interpreter versions", but 3 was the most common (2 and 4 were roughly equal, 5 and 6 were more popular than 1). The nesting also makes it

[issue29244] Python 3.6 unnecessarily requires inttypes.h

2017-01-11 Thread Zachary Ware
Zachary Ware added the comment: VS 2010 is not a supported compiler version for 3.6 (or 3.5) and VS 2012 is not a supported compiler for any version of Python. Extension modules built by those versions for use with Python 3.6 as supplied by python.org will only work in very particular

[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-01-11 Thread Brett Cannon
Brett Cannon added the comment: Since optimizations uses PGO which should do a fresh run, that's why there's the clearing of the state. I'm personally not bothered by it as you really should only being doing an optimized build once when you do the first install and then you're done. But if

[issue29244] Python 3.6 unnecessarily requires inttypes.h

2017-01-11 Thread Brett Cannon
Brett Cannon added the comment: Everything Zach said is accurate, so closing as "wont fix". -- nosy: +brett.cannon resolution: -> wont fix status: open -> closed ___ Python tracker

[issue29244] Python 3.6 unnecessarily requires inttypes.h

2017-01-11 Thread rdb
rdb added the comment: As far as I know, there should not be any ABI issues. We've been building extension modules with non-matching MSVC versions for years without issues. I find it hard to think of downsides to such a trivial fix. It is somewhat frustrating that we will have to resort to

[issue29231] Broken MSIs in Python 3.5+

2017-01-11 Thread KeyWeeUsr
KeyWeeUsr added the comment: python-3.5.2.exe /layout 11.01.2017 19:30 . 11.01.2017 19:30 .. 11.01.2017 19:30 3 035 136 core_d.msi 11.01.2017 19:30 2 240 512 core_pdb.msi 11.01.2017 19:3098 304 dev_d.msi 11.01.2017 19:30 110 

[issue29240] Implementation of the PEP 540: Add a new UTF-8 mode

2017-01-11 Thread STINNER Victor
STINNER Victor added the comment: pep540-2.patch: Patch version 2, updated to the latest version of the PEP 540. It has no more FIXME/TODO and has more unit tests. The main change is that the strict mode doesn't use strict anymore for OS data, but keeps surrogateescape. See the PEP for the

[issue23407] os.walk always follows Windows junctions

2017-01-11 Thread Eric Fahlgren
Eric Fahlgren added the comment: > # Junctions are not recognized as links. > self.assertFalse(os.path.islink(self.junction)) If the above comment is intended as a statement of fact, then it's inconsistent with the implementation of Py_DeleteFileW (

[issue6331] Add unicode script info to the unicode database

2017-01-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue29057] Compiler failure on Mac OS X - sys/random.h

2017-01-11 Thread George King
George King added the comment: I reinstalled the command line tools by downloading from developer.apple.com/download/more and the problem went away. No idea how they broke; I had previously installed the same version. In any case, sorry for the noise. --

[issue29240] Implementation of the PEP 540: Add a new UTF-8 mode

2017-01-11 Thread STINNER Victor
STINNER Victor added the comment: Oops, I introduced an obvious bug in my latest refactoring. It's now fixed in the patch version 3: pep540-3.patch. -- Added file: http://bugs.python.org/file46263/pep540-3.patch ___ Python tracker

[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-01-11 Thread Xiang Zhang
New submission from Xiang Zhang: In 3.6 we get --enable-optimizations. One thing I find annoyed with this flag is that it makes some build commands compile from scratch since it always clears the environment first. For example, with the commands listed at the top of Makefile: ./configure

[issue29231] Broken MSIs in Python 3.5+

2017-01-11 Thread Steve Dower
Steve Dower added the comment: I discussed installers on my blog at http://stevedower.id.au a while back. There are some other options linked from there, and also rationale for why things are how they are. -- ___ Python tracker

[issue29242] Crash on GC when compiling PyPy

2017-01-11 Thread Dingyuan Wang
New submission from Dingyuan Wang: When compiling the PyPy default branch [1] on a Debian testing machine with Python 2.7.13, cpython randomly crashes. (gdb) bt #0 update_refs () at ../Modules/gcmodule.c:332 #1 collect.lto_priv () at ../Modules/gcmodule.c:924 #2 0x5562a804 in

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agreed. And maybe raise more informative error for datetimes with a timezone. I'm also not sure about 3.5 and 3.6. Datetimes with timezones were never supported. Currently all returned ditetime objects are naive. Getting an aware datetime can confuse

[issue29057] Compiler failure on Mac OS X - sys/random.h

2017-01-11 Thread George King
George King added the comment: Still seeing this problem. Here was my exact process: $ git clone g...@github.com:python/cpython.git $ cd cpython $ git checkout 2.7 $ mkdir build $ cd build $ ../configure $ make In file included from ../Python/random.c:7: /usr/include/sys/random.h:37:32: error:

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Michael Foord
Michael Foord added the comment: It's a new feature. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29057] Compiler failure on Mac OS X - sys/random.h

2017-01-11 Thread George King
George King added the comment: This is using the latest apple toolchain on latest macOS 10.12.2: $ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 8.0.0 (clang-800.0.42.1) Target:

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.01.2017 17:08, Serhiy Storchaka wrote: > > The naive datetime converter is registered under the name "timestamp". The > aware datetime converter or the universal datetime converter (if it is > needed) can be registered under different names. This

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: commit review -> needs patch type: behavior -> enhancement versions: -Python 3.5, Python 3.6 ___ Python tracker

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.01.2017 17:04, Xiang Zhang wrote: > I am not sure it's worth to make it even optional in 3.7. Discarding tzinfo > sounds weird, and worse, the behaviour is not deterministic, it could also > fail with an exception. Best practice is to store all

[issue28231] zipfile does not support pathlib

2017-01-11 Thread Ethan Furman
Ethan Furman added the comment: Any path/file attributes, etc, inside a ZipFile should be str. ZipFile should also function properly if path/file requests are given as os.PathLike objects. -- ___ Python tracker

[issue15216] Support setting the encoding on a text stream after creation

2017-01-11 Thread Martin Panter
Martin Panter added the comment: Inada, I think you messed up the positioning of bits of the patch. E.g. there are now test methods declared inside a helper function (rather than a test class). Since it seems other people are in favour of this API, I would like to expand it a bit to cover

[issue29214] Standard open() does not allow to specify file permissions.

2017-01-11 Thread Christian Heimes
Christian Heimes added the comment: I like the partial opener trick. Can we have the examples in the public documentation of open(), too? -- ___ Python tracker

[issue29239] Fix wrong issue number in what's new entry

2017-01-11 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- assignee: docs@python components: Documentation files: fix_issue.patch keywords: patch nosy: Jim Fasarakis-Hilliard, docs@python priority: normal severity: normal status: open title: Fix wrong issue number in what's new

[issue29220] Python 3.6 regression/change using logging.addLevelName() to clear a name

2017-01-11 Thread Vinay Sajip
Vinay Sajip added the comment: > I think that even with empty name the output contains extra separators Not sure what you mean - please clarify with an example. > I would add an indentation for the second "if" ... or even use multiple > returns for the sake of microoptimization I will do a

[issue29220] Python 3.6 regression/change using logging.addLevelName() to clear a name

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Historically, getLevelName() gets the name for a level *but also the level > for a name* Ah, then getLevelName() was broken by issue27937. >>> logging.getLevelName('NOTSET') 'Level NOTSET' The fix should be applied to 3.5. -- resolution: fixed

[issue29006] 2.7.13 _sqlite more prone to "database table is locked"

2017-01-11 Thread Armin Rigo
Armin Rigo added the comment: If I had a say, I would indeed revert 030e100f048a (2.7 branch) and 81f614dd8136 (3.5 branch) as well as forward-port the revert to 3.6 and trunk. Then we wait for someone that really knows why the change was done in the first place. --

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I just don't know well the purpose of sentinels, and don't . I see fourth possible options: 1. Raise an exception when copy or pickle a sentinel. This is an option when we want to be sure that copying and pickling are not involved and we get the same

[issue28870] Reduce stack consumption of PyObject_CallFunctionObjArgs() and like

2017-01-11 Thread STINNER Victor
STINNER Victor added the comment: I also ran the reliable performance benchmark suite with LTO+PGO. There is no significant performance change on these benchmarks: https://speed.python.org/changes/?rev=b9404639a18c=5=speed-python The largest change is on scimark_lu (-13%), but there was an

[issue29234] Disable inlining of _PyStack_AsTuple() to reduce the stack consumption

2017-01-11 Thread STINNER Victor
STINNER Victor added the comment: Full commit message: --- Disable _PyStack_AsTuple() inlining Issue #29234: Inlining _PyStack_AsTuple() into callers increases their stack consumption, Disable inlining to optimize the stack consumption. Add _Py_NO_INLINE: use __attribute__((noinline)) of GCC

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Vlastimil Zíma
Vlastimil Zíma added the comment: Since the issue was dug up, I've created a patch for documentation. I still think, that it is worth stating the equality is not preserved for sentinels when copied as the message produced by tests is rather confusing: class SentinelTestCase(TestCase):

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file46254/sqlite3-3.patch ___ Python tracker ___

[issue15216] Support setting the encoding on a text stream after creation

2017-01-11 Thread INADA Naoki
INADA Naoki added the comment: > Inada, I think you messed up the positioning of bits of the patch. E.g. there > are now test methods declared > inside a helper function (rather than a test > class). I'm sorry. `patch -p1` merged previous patch into wrong place, and test passed accidently.

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Michael Foord
Michael Foord added the comment: So my thinking has evolved slightly on it. If it's *possible* for sentinels to be copied and pickled and preserve identity then I'm happy for it. I think the right semantics for copying a sentinel is that you get the original object back. If you pickle a

[issue29239] Fix wrong issue number in what's new entry

2017-01-11 Thread Roundup Robot
New submission from Roundup Robot: New changeset 114b03fa4c04 by Martin Panter in branch '3.6': Issue #29239: Fix --enable-optimizations bug number https://hg.python.org/cpython/rev/114b03fa4c04 New changeset 4e29c7f2b3e5 by Martin Panter in branch 'default': Issue #29239: Merge bug number from

[issue15657] Error in Python 3 docs for PyMethodDef

2017-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7d2d24003f5 by Martin Panter in branch '3.5': Issue #15657: METH_KEYWORDS cannot be used alone in Python 3 https://hg.python.org/cpython/rev/d7d2d24003f5 New changeset c140e72492a4 by Martin Panter in branch '3.6': Issue #15657: Delete incorrect

[issue29239] Fix wrong issue number in what's new entry

2017-01-11 Thread Martin Panter
Martin Panter added the comment: Thanks Jim -- nosy: +martin.panter resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue29241] sys._enablelegacywindowsfsencoding() don't apply to os.fsencode and os.fsdecode

2017-01-11 Thread JGoutin
New submission from JGoutin: The doc say that calling "sys._enablelegacywindowsfsencoding()" is equivalent to use "PYTHONLEGACYWINDOWSFSENCODING" environment variable. In fact, this no apply to "os.fsencode" and "os.fsdecode". Example with Python 3.6 64Bits on Windows 7 64 bits : EXAMPLE

[issue15216] Support setting the encoding on a text stream after creation

2017-01-11 Thread INADA Naoki
INADA Naoki added the comment: set_encoding-8.patch dropped support of changing encoding after read. It is based on set_encoding-newline.patch -- Added file: http://bugs.python.org/file46259/set_encoding-8.patch ___ Python tracker

[issue1294959] Problems with /usr/lib64 builds.

2017-01-11 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: The downstream patch we currently use in Fedora [0]. [0] http://pkgs.fedoraproject.org/cgit/rpms/python3.git/plain/00102-lib64.patch -- nosy: +cstratak ___ Python tracker

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-11 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: As I currently see this: - The error message for str can be changed to the one used for other sequences 'can only concatenate str (not "type") to str' - The error message for arrays can be changed to use concatenate instead of append, too. For

[issue29240] Implementation of the PEP 540: Add a new UTF-8 mode

2017-01-11 Thread STINNER Victor
STINNER Victor added the comment: pep540.patch: first draft Changes: * Add sys.flags.utf8mode * Add -X utf8 command line option * Add PYTHONUTF8 environment variable * sys.stdin, sys.stdout and sys.stderr encoding and errors are modified in UTF-8 mode * open() default encoding and errors is

[issue29240] Implementation of the PEP 540: Add a new UTF-8 mode

2017-01-11 Thread STINNER Victor
STINNER Victor added the comment: Examples with pep540_cli.py. Python 3.5: $ python3 pep540_cli.py sys.argv: ['pep540_cli.py'] stdin: UTF-8/strict stdout: UTF-8/strict stderr: UTF-8/backslashreplace open(): UTF-8/strict $ LC_ALL=C python3 pep540_cli.py sys.argv: ['pep540_cli.py'] stdin:

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM except that arguments of assertEqual() should be swapped. -- stage: patch review -> commit review ___ Python tracker

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Michael Foord
Michael Foord added the comment: I think option 3 is the correct semantic behaviour for sentinels, and if there are already examples of this in the standard library then it *doesn't* violate expected behaviour of pickling and copying (sentinel and singleton objects can be permitted to retain

[issue29240] Implementation of the PEP 540: Add a new UTF-8 mode

2017-01-11 Thread STINNER Victor
New submission from STINNER Victor: This issue tracks the implementation of the PEP 540. Attached pep540_cli.py script can be used to play with it. -- components: Interpreter Core, Library (Lib), Unicode files: pep540_cli.py messages: 285214 nosy: ezio.melotti, haypo priority: normal

[issue29231] Broken MSIs in Python 3.5+

2017-01-11 Thread Steve Dower
Steve Dower added the comment: Ah, you're using the full installer, which has the non-debug versions embedded and therefore does not ever need to download them. If you start from the web installer, it will download the MSIs for the non-debug components as well. But as I said, you're in

[issue29231] Broken MSIs in Python 3.5+

2017-01-11 Thread Paul Moore
Paul Moore added the comment: > Fully usable, portable *and unsupported* - you apparently ignored that point from Steve's comment > and working Python interpreter That's (essentially) pure luck. I don't think I've ever seen any suggestion that the /a flag for *any* MSI installer (Python or

[issue16684] Unicode property value abbreviated names and long names

2017-01-11 Thread Pander
Pander added the comment: Any updates or ideas on how to move this forward? Meanwhile, should the issue relate to version 3.6? Thanks. Ah, see also https://bugs.python.org/issue6331 please -- ___ Python tracker

[issue6331] Add unicode script info to the unicode database

2017-01-11 Thread Pander
Pander added the comment: Any updates or ideas on how to move this forward? See also https://bugs.python.org/issue16684 Thanks. -- ___ Python tracker ___

[issue29245] Can't write to NamedTemporaryFile

2017-01-11 Thread R. David Murray
R. David Murray added the comment: Yes, it is intended behavior, and it is documented. The default mode for NamedTemporaryFile (and TemporaryFile) is shown in the docs as "w+b". I suppose that used to be more convenient in python2 where there was almost no distinction between binary and text

[issue6331] Add unicode script info to the unicode database

2017-01-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

[issue16684] Unicode property value abbreviated names and long names

2017-01-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.7 -Python 3.4 ___ Python tracker ___

[issue29057] Compiler failure on Mac OS X - sys/random.h

2017-01-11 Thread Ned Deily
Ned Deily added the comment: Sorry, George, but I'm unable to reproduce the failure you observe following your recipe. The only thing I can suggest off the top of my head is that you might have out-of-date system header files installed in /usr/include. Those files are installed with: sudo

[issue29245] Can't write to NamedTemporaryFile

2017-01-11 Thread Kevin Bonham
New submission from Kevin Bonham: Python 3.6.0 (default, Dec 24 2016, 08:01:42) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from tempfile import NamedTemporaryFile >>> tmp = NamedTemporaryFile()

[issue29246] typing.Union raises RecursionError when comparing Union to other type

2017-01-11 Thread Spiro Sideris
New submission from Spiro Sideris: The typing.Union module raises a RecursionError when comparing a Union with no additional tree_args to a type that is not a Union. An example of the stack trace with the added test looks like the following: 0:00:00 [1/1] test_typing test test_typing failed

[issue29240] Implementation of the PEP 540: Add a new UTF-8 mode

2017-01-11 Thread STINNER Victor
STINNER Victor added the comment: I only tested the the PEP 540 implementation on Linux. The PEP and its implementation should adjusted for Windows, especially Windows-only env vars like PYTHONLEGACYWINDOWSFSENCODING. Changes are maybe also needed for Mac OS X and Android, which always use

[issue29240] Implementation of the PEP 540: Add a new UTF-8 mode

2017-01-11 Thread STINNER Victor
STINNER Victor added the comment: Hum, pep540-3.patch doesn't work if the locale encoding is different than ASCII and UTF-8. argv must be reencoded: $ LC_ALL=fr_FR ./python -X utf8 -c 'import sys; print(ascii(sys.argv))' $(echo -ne "\xff") ['-c', '\xff'] The result should not depend on the

[issue29240] Implementation of the PEP 540: Add a new UTF-8 mode

2017-01-11 Thread INADA Naoki
Changes by INADA Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___

[issue29241] sys._enablelegacywindowsfsencoding() don't apply to os.fsencode and os.fsdecode

2017-01-11 Thread Steve Dower
Steve Dower added the comment: If you import os first then that's acceptable and we should document it more clearly. Try calling enable before importing os. I wouldn't be surprised if os is imported automatically, in which case we need to figure out some alternate caching mechanism that can

[issue27603] Migrate IDLE context menu items to shell extension

2017-01-11 Thread Shane Smith
Shane Smith added the comment: I'm fine with a single implementation, so long as the implementation is what's best for the majority of users. Not my intent to increase the burden of work. So, let me ask the question alluded to in my first post: when is a nested menu actually desirable? I

[issue28759] access to mkfifo, mknod and hard links is controled by SELinux MAC on Android

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know what is a good name for such helper. supported_operation() looks too general. Maybe ask on Python-Dev? -- ___ Python tracker

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch contains doc changes. -- type: behavior -> enhancement versions: -Python 3.5, Python 3.6 Added file: http://bugs.python.org/file46260/mock_sentinel_pickle2.patch ___ Python tracker

[issue29220] Python 3.6 regression/change using logging.addLevelName() to clear a name

2017-01-11 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue29099] sqlite3 timestamp converter cannot handle timezone

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The naive datetime converter is registered under the name "timestamp". The aware datetime converter or the universal datetime converter (if it is needed) can be registered under different names. -- ___ Python

[issue27603] Migrate IDLE context menu items to shell extension

2017-01-11 Thread Steve Dower
Steve Dower added the comment: More user choice here is actually an incredibly huge burden. Managing file associations across a range of versions, many of which can no longer be updated, is hard enough without offering options. Not to mention the extra user interface required. Personally,

[issue20804] Sentinels identity lost when pickled (unittest.mock)

2017-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: sentinel-doc.patch documents the contrary behaviour -- not preserving an identity and equality. I haven't included doc changes because I don't know how to treat this change. As a bug fix, as a new feature, or as a new feature backported to maintained

[issue29231] Broken MSIs in Python 3.5+

2017-01-11 Thread KeyWeeUsr
KeyWeeUsr added the comment: Re blog post "Why are there so many Python installers?" > As a result, the old installer always requires administrative privileges just > in case you choose to install for all users. This prevents installation of > Python on machines where you do not have full

  1   2   >