Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-28 Thread Terry Reedy
On 9/29/2017 1:25 AM, Steve D'Aprano wrote: I don't have Python 3.6 installed, can somebody check to see whether or not it shows the same (wrong) behaviour? import textwrap text = ('Lorum ipsum dolor sit amet, consectetur adipiscing' ' elit ZZZ\xa0ZZZ sed do euismod tempor incididunt'

Re: Textwrap doesn't honour NO-BREAK SPACE

2017-09-28 Thread Frank Millman
"Steve D'Aprano" wrote in message news:59cdd938$0$14933$b1db1813$d948b...@news.astraweb.com... I don't have Python 3.6 installed, can somebody check to see whether or not it shows the same (wrong) behaviour? [...] C:\Users\User>python Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016,

Re: Spacing conventions

2017-09-28 Thread Bill
Steve D'Aprano wrote: On Thu, 28 Sep 2017 03:56 pm, Bill wrote: I worked in maintenance programming. You got the hand you were dealt! And you weren't allowed to "improve" the code unless the customer contracted you to do so. How do you tell the difference between a bug fix and an code

[issue31624] remove support for BSD/OS

2017-09-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 288d1daadaddf6ae35cf666138ba4b5d07449657 by Benjamin Peterson in branch 'master': remove support for BSD/OS (closes bpo-31624) (#3812) https://github.com/python/cpython/commit/288d1daadaddf6ae35cf666138ba4b5d07449657

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman
Oren Milman added the comment: Another thought - the existing code assumes that splitlines() returned a string. So maybe we could just check that get_source() returned a string, and then call the method str.splitlines() on it? --

[issue31620] asyncio.Queue leaks memory if the queue is empty and consumers poll it frequently

2017-09-28 Thread Surenkumar Nihalani
Change by Surenkumar Nihalani : -- keywords: +patch pull_requests: +3797 stage: -> patch review ___ Python tracker ___

[issue31603] Please add argument to override stdin/out/err in the input builtin

2017-09-28 Thread Wren Turkal
Wren Turkal added the comment: Added a PR to facilitate discussion on python-ideas. -- keywords: +patch pull_requests: +3798 stage: -> patch review ___ Python tracker

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Gregory Ewing
Chris Angelico wrote: finding the bug is basically searching through a problem space of all things that could potentially cause this symptom. A novice could accidentally stumble onto the right solution to a tricky bug, or an expert could search a thousand other things and only get to the true

Textwrap doesn't honour NO-BREAK SPACE

2017-09-28 Thread Steve D'Aprano
I don't have Python 3.6 installed, can somebody check to see whether or not it shows the same (wrong) behaviour? import textwrap text = ('Lorum ipsum dolor sit amet, consectetur adipiscing' ' elit ZZZ\xa0ZZZ sed do euismod tempor incididunt' ' ut labore et dolore magna aliqua.')

Re: Spacing conventions

2017-09-28 Thread Chris Angelico
On Fri, Sep 29, 2017 at 2:38 PM, Steve D'Aprano wrote: > On Thu, 28 Sep 2017 03:56 pm, Bill wrote: > >> I worked in maintenance programming. You got the hand you were dealt! >> And you weren't allowed to "improve" the code unless the customer >> contracted you to do

Re: Spacing conventions

2017-09-28 Thread Steve D'Aprano
On Thu, 28 Sep 2017 03:56 pm, Bill wrote: > I worked in maintenance programming. You got the hand you were dealt! > And you weren't allowed to "improve" the code unless the customer > contracted you to do so. How do you tell the difference between a bug fix and an code improvement, if the

[issue31624] remove support for BSD/OS

2017-09-28 Thread Benjamin Peterson
Change by Benjamin Peterson : -- keywords: +patch pull_requests: +3796 stage: -> patch review ___ Python tracker ___

[issue31624] remove support for BSD/OS

2017-09-28 Thread Benjamin Peterson
New submission from Benjamin Peterson : This operating system hasn't been supported by its vendor since 2004. We should get rid of our code for it. -- components: Build messages: 303296 nosy: benjamin.peterson priority: normal severity: normal status: open title:

[issue31623] Allow to build MSI installer from the official tarball

2017-09-28 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: With this patch, I managed to make a working installer. There's nothing in PCBuild/readme.txt about making an installer, and this is the only relevant tool I found in the source. If there's another, feel free to close the ticket, and I'll

[issue31623] Allow to build MSI installer from the official tarball

2017-09-28 Thread Ivan Pozdeev
Change by Ivan Pozdeev : -- nosy: +r.david.murray ___ Python tracker ___ ___

[issue31623] Allow to build MSI installer from the official tarball

2017-09-28 Thread Ivan Pozdeev
Change by Ivan Pozdeev : -- keywords: +patch nosy: -r.david.murray Added file: https://bugs.python.org/file47176/0001-Support-making-MSI-installer-from-tarball.patch ___ Python tracker

Re: Case Solution: ENOVE Business Strategy in a Transitioning Economy by Maciek Nowak, Alexander Stoll

2017-09-28 Thread daw . walden66
On Friday, August 4, 2017 at 5:08:20 PM UTC-5, Case Solution & Analysis wrote: > Case Solution and Analysis of ENOVE: Business Strategy in a Transitioning > Economy by Maciek Nowak, Alexander Stoll is available at a lowest price, send > email to casesolutionscentre(at)gmail(dot)com if you want

[issue31623] Allow to build MSI installer from the official tarball

2017-09-28 Thread R. David Murray
R. David Murray added the comment: Assuming 3.4 is packagable using msi and hg is the only problem, I presume you could use an hg-git adapter to get an hg checkout to build from. -- nosy: +r.david.murray ___ Python tracker

[issue31622] Make threading.get_ident() return an opaque type

2017-09-28 Thread R. David Murray
R. David Murray added the comment: Are you aware of PEP 539? (See issue 25658 for discussion.) I haven't followed that closely, but I imagine this issue is at least related. -- nosy: +r.david.murray ___ Python tracker

[issue31623] Allow to build MSI installer from the official tarball

2017-09-28 Thread Ivan Pozdeev
New submission from Ivan Pozdeev : Since the last version of 3.4 is only made available as a source tarball, it's imperative to be able to make a distributable package locally from it. Tools/msi/msi.py only works from an `hg' checkout. -- components: Build

[issue31622] Make threading.get_ident() return an opaque type

2017-09-28 Thread pdox
New submission from pdox : Currently, Python exposes "thread identifiers" as unsigned long values across multiple modules: threading.get_ident() -> Returns an integer thread id sys._current_frames() -> Dictionary keys are integer thread ids signal.pthread_kill() -> Accepts

[issue31620] asyncio.Queue leaks memory if the queue is empty and consumers poll it frequently

2017-09-28 Thread Surenkumar Nihalani
Surenkumar Nihalani added the comment: I am working on fixing this. -- nosy: +snihalani ___ Python tracker ___

[issue25351] pyvenv activate script failure with specific bash option

2017-09-28 Thread Sorin Sbarnea
Sorin Sbarnea added the comment: Based on my tests this worked with all shells I tested with, the syntax being a very old one and not some new/modern one. Passed: bash, zsh, dash, ksh Platforms: MacOS, RHEL Linux Failed with: tcsh but with the note that even the

[issue25351] pyvenv activate script failure with specific bash option

2017-09-28 Thread R. David Murray
R. David Murray added the comment: Note that in the equivalent issue raised against virtualenv, the concern was raised that some old sh-like shells might not support this syntax, but it was pointed out that it is part of the posix standard. I'm not arguing for or

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Crude import benchmark (Ubuntu): * before: $ time ./python -c "import uuid" real0m0.074s user0m0.056s sys 0m0.012s * after: $ time ./python -c "import uuid" real0m0.030s user0m0.028s sys 0m0.000s * baseline: $

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Yes, I get the AssertionError with the latest version of PR 3802. From the high load avg of my system, you can see that the error occurs very rarely and that I need to stress my system to trigger it. With PR 3802, the error

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Larry Martell
On Thu, Sep 28, 2017 at 5:08 PM, Chris Angelico wrote: > Yep. Pick anyone on this list that you believe is an expert, and ask > him/her for a story of a long debug session that ended up finding a > tiny problem. I can pretty much guarantee that every expert programmer > will

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: (my previous msg303283 was for the bpo-11063, I removed it, sorry for the spam.) -- ___ Python tracker

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: I ran two benchmarks on my Fedora 26. * new = master (commit a106aec2ed6ba171838ca7e6ba43c4e722bbecd1) * ref = commit 8d59aca4a953b097a9b02b0ecafef840e4ac5855 git co master ./python -m perf timeit -s 'import sys, uuid' "del

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-09-28 Thread STINNER Victor
Change by STINNER Victor : -- Removed message: https://bugs.python.org/msg303283 ___ Python tracker ___

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: I ran two benchmarks on my Fedora 26. * new = master (commit a106aec2ed6ba171838ca7e6ba43c4e722bbecd1) * ref = commit 8d59aca4a953b097a9b02b0ecafef840e4ac5855 git co master ./python -m perf timeit -s 'import sys, uuid' "del

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Chris Angelico
On Fri, Sep 29, 2017 at 7:47 AM, Bill wrote: > I won't claim to be any sort of "expert". But one memorable problem, for > me, was ultimately accounted for by the "inherent problem" of the floating > point variables x0 and xo coexisting in the same module. It's sort of

[issue31604] unittest.TestLoader().loadTestsFromTestCase(...) fails when adding test cases with the expectedFailure decorator

2017-09-28 Thread Krzysztof Warunek
Krzysztof Warunek added the comment: AFAIK this helper is meant to be used with test function not the TestCases. -- nosy: +kwarunek ___ Python tracker

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Bill
Chris Angelico wrote: On Fri, Sep 29, 2017 at 6:59 AM, Bill wrote: Chris Angelico wrote: Be careful with this one. For anything other than trivial errors (and even for some trivial errors), finding the bug is basically searching through a problem space of all things

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Chris Angelico
On Fri, Sep 29, 2017 at 6:59 AM, Bill wrote: > Chris Angelico wrote: >> >> Be careful with this one. For anything other than trivial errors (and >> even for some trivial errors), finding the bug is basically searching >> through a problem space of all things that could

Re: EuroPython 2017: Videos for Monday available online

2017-09-28 Thread Terry Reedy
On 9/28/2017 12:33 PM, M.-A. Lemburg wrote: """ In the coming weeks, we will release the other videos, in batches of one conference day per week. """ It was not obvious to me that 'private video' meant 'non-existent, not yet added video'. It usually means a video that is present but not

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Bill
Chris Angelico wrote: On Fri, Sep 29, 2017 at 5:45 AM, Bill wrote: Paul Moore wrote: On 27 September 2017 at 17:41, leam hall wrote: Hehe...I've been trying to figure out how to phrase a question. Knowing I'm not the only one who gets frustrated

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-09-28 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue20519] Replace uuid ctypes usage with an extension module.

2017-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset a106aec2ed6ba171838ca7e6ba43c4e722bbecd1 by Antoine Pitrou in branch 'master': bpo-11063, bpo-20519: avoid ctypes and improve import time for uuid (#3796)

[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset a106aec2ed6ba171838ca7e6ba43c4e722bbecd1 by Antoine Pitrou in branch 'master': bpo-11063, bpo-20519: avoid ctypes and improve import time for uuid (#3796)

Re: Spacing conventions

2017-09-28 Thread Roel Schroeven
Steve D'Aprano schreef op 28/09/2017 3:45: One of Raymond Hettinger's videos talks about writing beautiful Python code, and how slavishly obeying PEP 8 is not really productive. I'll try to find a link later and post it. That would be Raymond Hettinger - Beyond PEP 8 -- Best practices for

[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "I have tested, this doesn't affect performance." Oh, thank you for testing that :-) -- ___ Python tracker

[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have tested, this doesn't affect performance. -- ___ Python tracker ___

[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: > The code doesn't work nice with general objects supporting the buffer > protocol. The length check suppose that the value has a length, and it is the > size in bytes. The code for bytes_le suppose that the value supports slicing >

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: Hum, let me clarify: my main goal is to get a stable CI. I don't really care of the exact implementation of one specific unit test in test_pty ;-) -- ___ Python tracker

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: Cornelius:Here is a PoC: I checked out your code and stressed my system with it. (...) AssertionError: ..." Did you get this failure with my PR 3802? Cornelius: "We have b'For my pet fish, Eric.\r\n' in the pty buffer. We read

[issue31621] Pluralization typo in Language Reference section 7.12

2017-09-28 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31621] Pluralization typo in Language Reference section 7.12

2017-09-28 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 641494ec3168bd556f0af226196e13ae29bddd53 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-31621: Fix typo in Simple Statements documentation (GH-3809) (GH-3810)

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Chris Angelico
On Fri, Sep 29, 2017 at 5:45 AM, Bill wrote: > Paul Moore wrote: >> >> On 27 September 2017 at 17:41, leam hall wrote: >>> >>> Hehe...I've been trying to figure out how to phrase a question. Knowing >>> I'm >>> not the only one who gets frustrated

[issue31621] Pluralization typo in Language Reference section 7.12

2017-09-28 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +3795 ___ Python tracker ___

[issue31621] Pluralization typo in Language Reference section 7.12

2017-09-28 Thread Kevin
Kevin added the comment: Ok, I've created a pull request, available at https://github.com/python/cpython/pull/3809. -- ___ Python tracker

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Bill
Paul Moore wrote: On 27 September 2017 at 17:41, leam hall wrote: Hehe...I've been trying to figure out how to phrase a question. Knowing I'm not the only one who gets frustrated really helps. I'm trying to learn to be a programmer. I can look at a book and read basic code

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Leam Hall
On 09/28/2017 04:15 AM, Paul Moore wrote: With Python, I'd say that an appreciation of the available libraries is key - both what's in the stdlib, and what's available from PyPI. That's not to say you should memorise the standard library, but rather cultivate an approach of "hmm, I'm pretty sure

[issue31621] Pluralization typo in Language Reference section 7.12

2017-09-28 Thread Kevin
Change by Kevin : -- keywords: +patch pull_requests: +3793 stage: needs patch -> patch review ___ Python tracker ___

[issue31614] can't list groupby generator without breaking the sub groups generators

2017-09-28 Thread Loïc Le Loarer
Loïc Le Loarer added the comment: Thanks a lot for the clear answer, sorry for not having read the online documentation, I only read the help(itertools.groupby) which has much less details. And for my use case, I can use an explicit command just to compute the number

Re: auto installing dependencies with pip to run a python zip application ?

2017-09-28 Thread Irmen de Jong
On 09/28/2017 09:40 AM, Paul Moore wrote: > Are you aware of pipsi? If you do `pipsi install somepackage` it > creates a new virtualenv in ~/.local/.venvs, populates it with > somepackage and its dependencies, and then puts the entry point > scripts for somepackage into ~/.local/bin. It may be a

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Leam Hall
On 09/28/2017 07:35 AM, Stefan Ram wrote: But remember that paid programmers usually do not "code", in the sense of "write a program from scratch". Most of the work is maintenance programming, where an important part of the job is to read and understand a piece of code. Coding

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Leam Hall
My question has received several helpful responses, thanks! On 09/28/2017 01:01 PM, Dennis Lee Bieber wrote: On Wed, 27 Sep 2017 12:41:24 -0400, leam hall declaimed the following: "Programmer"... or "Software Engineer"? I haven't kept up on "job titles" but

[issue31621] Pluralization typo in Language Reference section 7.12

2017-09-28 Thread Kevin
Kevin added the comment: Yes, I intend to make a PR shortly. -- ___ Python tracker ___

[issue31621] Pluralization typo in Language Reference section 7.12

2017-09-28 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks Kevin. Can you open a pull request with this change? -- nosy: +Mariatta stage: -> needs patch ___ Python tracker

[issue31616] Windows installer: Python binaries are user-writable

2017-09-28 Thread Steve Dower
Steve Dower added the comment: Correct, this is expected behavior. If you want your system to be secure *and* to modify default settings, you have to take full responsibility for that. You can't rely on other tools to have secure non-default settings (they should have

[issue31621] Pluralization typo in Language Reference section 7.12

2017-09-28 Thread Kevin
New submission from Kevin : The documentation for the `global` statement contains the line: > CPython implementation detail: The current implementation does not enforce > some of these restriction [...] "restriction" should be "restrictions" since there is more

[issue31616] Windows installer: Python binaries are user-writable

2017-09-28 Thread R. David Murray
R. David Murray added the comment: I'll let Steve be the one to close this, but it sounds like this isn't even a doc bug (ie: it is standard window's practice). -- ___ Python tracker

Re: Hatch - A modern project, package, and virtual env manager

2017-09-28 Thread ofekmeister
Hatch 0.20.0 features easy cross-platform Conda installation and interactive project creation! https://github.com/ofek/hatch/blob/master/HISTORY.rst#0200 -- https://mail.python.org/mailman/listinfo/python-list

Re: Real Programmers Write Docs

2017-09-28 Thread Rob Gaddi
On 09/27/2017 04:15 PM, Ned Batchelder wrote: On 9/27/17 6:55 PM, Rob Gaddi wrote: Anyone have any good references on using Sphinx to generate a mix of autogenerated API docs and hand-written "Yeah, but this is what you DO with it" docs?  Free is good but I'm happy to drop money on books if

[issue31620] asyncio.Queue leaks memory if the queue is empty and consumers poll it frequently

2017-09-28 Thread Zack Elan
New submission from Zack Elan : Repro: Call asyncio.wait_for(some_queue.get(), some_timeout) repeatedly, with no items in the queue, so that the call times out each time. Expected: No increase in memory while polling an empty queue Actual: The queue holds on to pending

[issue31619] Strange error when convert hexadecimal with underscores to int

2017-09-28 Thread Mark Dickinson
Mark Dickinson added the comment: Looks like an overflow check that was questionable in the first place (depending on undefined behaviour), and is now both questionable and wrong. I'll see if I can find time for a fix this evening (UTC+1). --

[issue31465] Allow _PyType_Lookup() to raise exceptions

2017-09-28 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > In 2.7, PyUnicode_Splitlines() first does: > string = PyUnicode_FromObject(string); And it raises an exception if the string contains non-ASCII characters. It is better to avoid str<->unicode convertion as long as possible.

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann
Change by Cornelius Diekmann : -- pull_requests: +3792 ___ Python tracker ___ ___

[issue31465] Allow _PyType_Lookup() to raise exceptions

2017-09-28 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list

Re: EuroPython 2017: Videos for Monday available online

2017-09-28 Thread M.-A. Lemburg
On 28.09.2017 18:25, M.-A. Lemburg wrote: > On 28.09.2017 18:11, Terry Reedy wrote: >> On 9/28/2017 8:15 AM, M.-A. Lemburg wrote: >>> We are pleased to announce the first batch of cut videos for EuroPython >>> 2017. >>> >>> To see the videos, please head over to our EuroPython YouTube channel >>>

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: I also added a pull request which I cannot get to fail on my system. What do you think, haypo? Sorry for the noise! -- ___ Python tracker

Re: EuroPython 2017: Videos for Monday available online

2017-09-28 Thread M.-A. Lemburg
On 28.09.2017 18:11, Terry Reedy wrote: > On 9/28/2017 8:15 AM, M.-A. Lemburg wrote: >> We are pleased to announce the first batch of cut videos for EuroPython >> 2017. >> >> To see the videos, please head over to our EuroPython YouTube channel >> and select the “EuroPython 2017″ playlist: >> >>

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman
Oren Milman added the comment: In 2.7, PyUnicode_Splitlines() first does: string = PyUnicode_FromObject(string); So i thought that PyUnicode_Splitlines() would be fine with receiving a string. But now i realize that even in case i was right there, PyUnicode_Splitlines()

Re: EuroPython 2017: Videos for Monday available online

2017-09-28 Thread Terry Reedy
On 9/28/2017 8:15 AM, M.-A. Lemburg wrote: We are pleased to announce the first batch of cut videos for EuroPython 2017. To see the videos, please head over to our EuroPython YouTube channel and select the “EuroPython 2017″ playlist: * EuroPython 2017 Videos *

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Oh, one more thing, since it is unclear whether read or write is causing the error. I replaced os.write(slave_fd, TEST_STRING_1) by pty._writen(slave_fd, TEST_STRING_1) which makes sure all bytes are written. After some time,

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyUnicode_Splitlines() cannot be used here in 2.7, because the source is likely a 8-bit string. Actually I'm not sure this issue is worth to be fixed in 2.7. The fix would be different from 3.x and more complex. --

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: >> Does reading the string b'I wish to buy a fish license.\n' not cause a >> problem, too? > >This string TEST_STRING_1 is used for a single os.write() call, whereas >TEST_STRING_2 is splitted and written in two parts with two

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman
Change by Oren Milman : -- pull_requests: +3791 ___ Python tracker ___ ___

[issue25098] test_uuid fails with pywin32 installed

2017-09-28 Thread Zachary Ware
Zachary Ware added the comment: Still fails on Python 3.6.1 with pypiwin32-220; those are the versions I have handy to check on. I've not managed to report it to pywin32 or look into it any deeper, though. If someone can confirm that it's definitely their bug, this

[issue25351] pyvenv activate script failure with specific bash option

2017-09-28 Thread sorin
sorin added the comment: This is a perfectly valid bug and I am surprised it was ignored for so long. I just raised a PR for addressing it, please review it. -- keywords: +patch nosy: +sorin pull_requests: +3790 stage: -> patch review type: enhancement ->

[issue31610] Use select.poll instead of select.select in SocketServer.BaseServer.serve_forever

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: > I recommend to use selectors.PollSelector and fallback on > selectors.SelectSelector where not available (Windows) in order to use 1 > syscall only. That's what we did already in socket.py, subprocess.py and > others. It would be

[issue31616] Windows installer: Python binaries are user-writable

2017-09-28 Thread Paul Moore
Paul Moore added the comment: Standard Windows behaviour, in my experience, is inherited permissions. IMO, the current behaviour is correct - we default to an OS-managed secure location for system wide installs, and a user-modifiable location for user installs. If the

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: > Does reading the string b'I wish to buy a fish license.\n' not cause a > problem, too? This string TEST_STRING_1 is used for a single os.write() call, whereas TEST_STRING_2 is splitted and written in two parts with two os.write()

[issue31610] Use select.poll instead of select.select in SocketServer.BaseServer.serve_forever

2017-09-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I recommend to use selectors.PollSelector and fallback on selectors.SelectSelector where not available (Windows) in order to use 1 syscall only. That's what we did already in socket.py, subprocess.py and others. -- nosy:

[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The code doesn't work nice with general objects supporting the buffer protocol. The length check suppose that the value has a length, and it is the size in bytes. The code for bytes_le suppose that the value supports slicing and

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Regarding PR 3802: * Does reading the string b'I wish to buy a fish license.\n' not cause a problem, too? * Is reading len(expected) bytes the correct behavior for systems where normalize_output is needed? I also fixed these

[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: is it safe to accept any memoryview? Or should we call explicitly .cast('B') on memory views to prevent bad surprises? The asyncio module doesn't do anything special in sock_sendall(). "data" is passed directly to

[issue31610] Use select.poll instead of select.select in SocketServer.BaseServer.serve_forever

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: > Better alternative will be to use poll or epoll even. epoll requires mulitple system calls, whereas the selector seems to only be used only once in most cases, no? Anyway, maybe selectors.DefaultSelector can be used here? About

[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, Victor already have created a PR! -- components: +Library (Lib) -Extension Modules versions: +Python 3.7 -Python 3.6 ___ Python tracker

[issue31609] PCbuild\clean.bat fails if the path contains whitespaces

2017-09-28 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Neil Cerutti
On 2017-09-28, bartc wrote: > On 28/09/2017 12:31, Steve D'Aprano wrote: >> Until now, I thought that people who wrote crappy code did so >> because they didn't know any better. This is the first time >> I've seen somebody state publicly that they have no interest >> in writing

[issue28129] assertion failures in ctypes

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: Ok, now the issue can be closed :-) I backported Oren Milman's fix to Python 2.7 and 3.6 as well. Oren Milman: thank you very much for your fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue28129] assertion failures in ctypes

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8b83687bdf66d2d10afb78e46bcede399deaefde by Victor Stinner in branch '2.7': bpo-28129: fix ctypes crashes (#386) (#3800) https://github.com/python/cpython/commit/8b83687bdf66d2d10afb78e46bcede399deaefde --

[issue28129] assertion failures in ctypes

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7d6ddb96b34b94c1cbdf95baa94492c48426404e by Victor Stinner in branch '3.6': bpo-28129: fix ctypes crashes (#386) (#3799) https://github.com/python/cpython/commit/7d6ddb96b34b94c1cbdf95baa94492c48426404e --

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman
Change by Oren Milman : -- pull_requests: +3789 ___ Python tracker ___ ___

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +3788 stage: -> patch review ___ Python tracker ___

[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree. In any case assert is a bad way of checking argument types. It was added in 65b6a80f19736d6313d5eb896d6b2fb6bbf65a03 as a part of migration to Python 3. I guess for debugging purposes. Now it isn't needed,

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread STINNER Victor
STINNER Victor added the comment: Oh, in fact, it's not that hard to reproduce the failure on Linux: haypo@selma$ ./python -m test test_pty -m test_basic -F Run tests sequentially 0:00:00 load avg: 2.17 [ 1] test_pty 0:00:00 load avg: 2.17 [ 2] test_pty 0:00:00

  1   2   >