[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your script works fine here (Ubuntu 16.04). Besides, if you're seeing differences between two Linux versions with the same Python version, it is quite unlikely to be a Python issue. -- nosy: +pitrou ___ Python

[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Matthias Klose
Matthias Klose added the comment: > * The sysconfigdata file name was terminated with a dangling > underscore when 'multiarch' is not defined. That only solves part of the problem in that the kernel/os version gets encoded as well, e.g. gnukfreebsd9, gnukfreebsd10, which is nasty when the

[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: +1 for this. The patch looks fine, and there's no need to add any documentation or tests. -- nosy: +pitrou stage: -> patch review versions: +Python 3.7 -Python 3.6 ___ Python tracker

[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Matthias Klose
Matthias Klose added the comment: This approach will not work with a "multiarch" enabled environment, and break cross builds on Debian and Ubuntu. Afaics, the proposal assumes that the python executable for the target architecture is installed (which it is not for the multiarch cross-build

[issue14845] list() != []

2016-11-29 Thread R. David Murray
R. David Murray added the comment: OK, then this issue can be closed unless someone thinks it is worth documenting the lack of PEP 479 in 3.5 and 3.6. -- ___ Python tracker

[issue28781] On Installation of 3.5 Python get error message

2016-11-29 Thread Mark Harris
Mark Harris added the comment: I've attached the logs, Thanks, Mark -- Added file: http://bugs.python.org/file45689/Python logs 3.zip ___ Python tracker

Re: best way to read a huge ascii file.

2016-11-29 Thread Jussi Piitulainen
Heli writes: > Hi all, > > Let me update my question, I have an ascii file(7G) which has around > 100M lines. I read this file using : > > f=np.loadtxt(os.path.join(dir,myfile),delimiter=None,skiprows=0) > > x=f[:,1] > y=f[:,2] > z=f[:,3] > id=f[:,0] > > I will need the x,y,z and id arrays

[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Xavier de Gaye
New submission from Xavier de Gaye: With this patch, cross compiling a third-party extension module is done with the command: XBUILD_PYTHON_DIR=/path/to/python/dir python setup.py build where XBUILD_PYTHON_DIR is the location of the directory of the cross-compiled python executable. It may

[issue28781] On Installation of 3.5 Python get error message

2016-11-29 Thread Steve Dower
Steve Dower added the comment: Could you attach those three sets of logs? I'm running low on ideas and need all the inspiration I can get :) -- ___ Python tracker

[issue28733] Show how to use mock_open in modules other that __main__

2016-11-29 Thread Michał Bultrowicz
Michał Bultrowicz added the comment: Then where it should be patched in? Can you give an example? From what I've checked patching only works in __main__ and builtins. -- ___ Python tracker

async enumeration - possible?

2016-11-29 Thread Frank Millman
Hi all Python 3.6 has introduced Asynchronous Generators, which work very well. Python 3.6.0b4 (default, Nov 22 2016, 05:30:12) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. import asyncio loop = asyncio.get_event_loop() async

Re: best way to read a huge ascii file.

2016-11-29 Thread Heli
Hi all, Let me update my question, I have an ascii file(7G) which has around 100M lines. I read this file using : f=np.loadtxt(os.path.join(dir,myfile),delimiter=None,skiprows=0) x=f[:,1] y=f[:,2] z=f[:,3] id=f[:,0] I will need the x,y,z and id arrays later for interpolations. The

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-11-29 Thread Erik Bray
Erik Bray added the comment: To me, Masayuki's patch is an acceptable work-around for the time being. I don't *like* it because the fact remains that native TLS can work on these platforms and falling back on Python's slower implementation isn't necessary. That said, the previous patch

Last call for the Call For Proposals of PythonFOSDEM 2017

2016-11-29 Thread Stephane Wirtel
Because the deadline is imminent and because we have only received some proposals, we will extend the current deadline. The new submission deadline is 2016-12-18. Call For Proposals == This is the official call for sessions for the Python devroom at FOSDEM 2017. FOSDEM is the

Vulture 0.11

2016-11-29 Thread Jendrik Seipp
vulture - Find dead code Vulture finds unused classes, functions and variables in your code. This helps you cleanup and find errors in your programs. If you run it on both your library and test suite you can find untested code. Due to Python's dynamic nature, static

[issue28832] Reduce memset in dict creation

2016-11-29 Thread INADA Naoki
New submission from INADA Naoki: This patch delays initialization of dk_entries. Entries are initialized when first use (when dk_netries is incremented). Minimum dk_entries of 64bit arch is 5 * 8 * 3 = 120bytes. So it can save 4 cache lines! I'm running benchmark for now. -- assignee:

[issue13721] ssl.wrap_socket on a connected but failed connection succeeds and .peer_certificate gives AttributeError

2016-11-29 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: fyi, I just observed this in the field in 2.7.3 using requests 2.5.3 I don't think requests has a workaround for 2.7 from reading the release logs. -- nosy: +kristjan.jonsson ___ Python tracker

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: FYI the first release including the fix 78ede2baa146 is Python 3.5.2. -- ___ Python tracker ___

[issue24838] tarfile.py: fix GNU and USTAR formats to properly handle paths with special characters that are encoded with more than one byte each

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: FYI the first release including the fix 78ede2baa146 is Python 3.5.2. -- ___ Python tracker ___

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Oh, Serhiy just closed the issue as a duplicate. -- ___ Python tracker ___

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: An entry in a TAR archive has a name. The name field has a size of 100 bytes. The field is padded with zero bytes. I don't know if it must or must not end with a zero byte.

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks as a duplicate of issue24838. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> tarfile.py: fix GNU and USTAR formats to properly handle paths with special characters that are

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread Decorater
Decorater added the comment: hmm This shows a bug in shutil.make_archive in python3. Run ./test.sh to run shutil.make_archive in both python2 and python3 on the wdir and then extract each of them for comparison. The file called

[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread Dan “locallycompact” Firth
New submission from Dan “locallycompact” Firth: I have made an example of this bug here: https://github.com/locallycompact/py3_make_archive_bug Using shutil.make_archive() in python2 works fine, where as in python3 one of the filenames has been truncated by five characters after unpacking the

[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread SilentGhost
Changes by SilentGhost : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread Lele Gaifax
Lele Gaifax added the comment: Ok, thank you. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28781] On Installation of 3.5 Python get error message

2016-11-29 Thread Mark Harris
Mark Harris added the comment: I installed python just for my user, attempted to run python just out of interest in the command line and again the same error appeared (missing python35.dll). I uninstalled that then reinstalled for all users, and again during installation the message missing

[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread SilentGhost
SilentGhost added the comment: Reads just fine to me. -- nosy: +SilentGhost ___ Python tracker ___ ___

[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread Lele Gaifax
New submission from Lele Gaifax: At https://hg.python.org/cpython/rev/52038705827d#l1.18 there is an "as part" where probably a "are part" was meant. -- assignee: docs@python components: Documentation messages: 281977 nosy: docs@python, lelit priority: normal severity: normal status:

[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-29 Thread Julien Palard
Julien Palard added the comment: Hi Martin, Removed the removing of the double new line at end of file. -- Added file: http://bugs.python.org/file45686/issue28820-2.diff ___ Python tracker

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread Marko Rauhamaa
Peter Otten <__pete...@web.de>: > Marko Rauhamaa wrote: > >> However, I think the real answer is that you shouldn't mix the "with" >> construct with exception handling. Instead you should write: >> >>try: >>f = open("xyz") >>except FileNotFoundError: >>...[B]... >>

[issue28733] Show how to use mock_open in modules other that __main__

2016-11-29 Thread Michael Foord
Michael Foord added the comment: open shouldn't always be patched in builtins, it's much better to patch it in the specific namespace it's being called from. So the doc patch here shouldn't be applied as is. -- ___ Python tracker

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread Peter Otten
Marko Rauhamaa wrote: > However, I think the real answer is that you shouldn't mix the "with" > construct with exception handling. Instead you should write: > >try: >f = open("xyz") >except FileNotFoundError: >...[B]... >try: >...[A]... >finally: >

[issue14845] list() != []

2016-11-29 Thread Mark Dickinson
Mark Dickinson added the comment: Wolfgang: ah, thanks, that makes more sense. I misunderstood; sorry for the noise. -- ___ Python tracker ___

[issue14845] list() != []

2016-11-29 Thread Wolfgang Maier
Wolfgang Maier added the comment: running with "-W always": >>> def five(x): ... for _ in range(5): ... yield x ... >>> F = five('x') >>> [next(F) for _ in range(10)] Traceback (most recent call last): File "", line 1, in File "", line 1, in StopIteration >>> list(next(F)

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would be nice to test corner cases: 1. Search UCS2 or UCS4 character with zero lower 8 bits: U+XX00. 2. Search UCS2 or UCS4 character with lower 8 bits that match high bits of string characters. For example search U+0404 in the string that consists of

[issue28441] Change sys.executable to include executable suffix

2016-11-29 Thread Masayuki Yamamoto
Changes by Masayuki Yamamoto : Added file: http://bugs.python.org/file45685/sys-executable-suffix-3.patch ___ Python tracker ___

[issue14845] list() != []

2016-11-29 Thread Wolfgang Maier
Wolfgang Maier added the comment: Mark, PEP479 is not fully in effect in 3.6 yet. 3.7 will raise the RuntimeError, but 3.6 still only gives a DeprecationWarning. -- ___ Python tracker

[issue28441] Change sys.executable to include executable suffix

2016-11-29 Thread Masayuki Yamamoto
Changes by Masayuki Yamamoto : Removed file: http://bugs.python.org/file45684/sys-executable-suffix-3.patch ___ Python tracker ___

Re: correct way to catch exception with Python 'with' statement

2016-11-29 Thread Marko Rauhamaa
Steven D'Aprano : > There is no need to catch the exception if you're not going to do > anything with it. Correct. However, the question of the subject line is still a good one. See: try: with open("xyz") as f: ...[A]... except

[issue14845] list() != []

2016-11-29 Thread Mark Dickinson
Mark Dickinson added the comment: @wolma: I don't think PEP 479 is relevant here: we're not raising StopIteration inside a generator function, which is the situation that PEP 479 covers. The behaviour in 3.6 matches that originally reported: Python 3.6.0b3 (default, Nov 2 2016, 08:15:32)

[issue28441] Change sys.executable to include executable suffix

2016-11-29 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: I updated a patch to check the made path because previous patch has added suffix even to symbolic link. New patch works that If made path is invalid, revert to original. -- Added file: http://bugs.python.org/file45684/sys-executable-suffix-3.patch

[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Usually we don't add "versionchanged" for every fixed bug. -- ___ Python tracker ___

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is nice to add tests for C API. Especially if there is no direct mapping between Python and C API ("character in str" don't call PyUnicode_FindChar()). Tests should cover all corner cases, otherwise we can miss bugs. Some C API can be not used in

[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: >> The function was already documented in Python 3.5, so please add a ".. >> versionchanged:: 3.6" to document the API chnange. > No, this behavior is not documented in any released Python version. The note > about the failure was added in issue28701. Ah

[issue28821] generate_opcode_h.py crash when run with python2

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Florin Papa added the comment: > I tested and the script is no longer called if you do a "make touch" > beforehand. Oh ok, thanks for the test. It confirms that you don't need to run the script to build Python 3. It's a side effect of the Mercurial clone.

[issue28821] generate_opcode_h.py crash when run with python2

2016-11-29 Thread Florin Papa
Florin Papa added the comment: I tested and the script is no longer called if you do a "make touch" beforehand. -- ___ Python tracker ___

[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: I don't think that it's worth it to add a new function to _testcapi to test PyUnicode_FindChar. The implementation of the function seems simple. At least, I would prefer to only see a few unit tests, not 17 test for this simple function! I mean

[issue28821] generate_opcode_h.py crash when run with python2

2016-11-29 Thread STINNER Victor
STINNER Victor added the comment: > Whenever I did a fresh clone, the Tools/scripts/generate_opcode_h.py would be > called. Can you please test "make touch"? This command "fixes" timestamps. -- ___ Python tracker

[issue28829] Tkinter messagebox cx_freeze Python 3.4

2016-11-29 Thread Parviz Karimli
New submission from Parviz Karimli: Tkinter messagebox doesn't work when trying to make an exectuable by cx_freeze in Python 3.4. It works fine with Python 3.4 alone. But after I create an exe of this file, the messagebox does not pop up. -- components: Tkinter files: messagebox

<    1   2