[issue26118] String performance issue using single quotes

2016-01-15 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Fri, Jan 15, 2016 at 07:56:39AM +, poostenr wrote: > As I did more testing I noticed that appending data to the file slowed > down. The file grew initially with ~30-50KB increments and around > 500KB it had slowed down to ~3-5KB/s, until around 1MB the

Py2 + PY3 transform a project (git submodule) to a clean package (with setup.py)

2016-01-15 Thread Gelonida N
Hi, I'm having a git project which contains functionality, that I use in many of my projects. For this posts sake let's call it mylib. if mylib is in the python path, it can be used for quite some convenience function in many of my projects. Examples: from mylib.logging import

Re: Turtle

2016-01-15 Thread Alister
On 14/01/16 22:22, Stallone Carl wrote: Dear sir/madam I am currently using python 3.5.0 and I have been trying to write a program using turtle but is not seem to be working. I have followed all tutarial on the web and when i compare it with my code my am duing everything the same way but it

[issue26124] shlex.quote and pipes.quote do not quote shell keywords

2016-01-15 Thread Charles Daffern
New submission from Charles Daffern: The shlex.quote and pipes.quote functions do not quote shell keywords. Example shell keywords: done, time, coproc, while Presumably the intent of the quote functions is to prevent the resulting string from altering the syntax of the script it is inserted

Re: Powerful perl paradigm I don't find in python

2016-01-15 Thread Charles T. Smith
On Fri, 15 Jan 2016 11:42:24 +0100, Wolfgang Maier wrote: > On 15.01.2016 10:43, Peter Otten wrote: >> Charles T. Smith wrote: >> >>> while ($str != $tail) { >>> $str ~= s/^(head-pattern)//; >>> use ($1); >>> } >> > > things = [] > while some_str != tail: > m =

Re: Powerful perl paradigm I don't find in python

2016-01-15 Thread Charles T. Smith
On Fri, 15 Jan 2016 11:04:32 +, Charles T. Smith wrote: > capability, somehow, but that was apparently overlooked. For example, > by storing string state in the match object and having a *sub* method without > a string parameter. -- https://mail.python.org/mailman/listinfo/python-list

Re: Turtle

2016-01-15 Thread Dave Farrance
Stallone Carl wrote: >I am currently using python 3.5.0 and I have been trying to write a program >using turtle but is not seem to be working. I have followed all tutarial on >the web and when i compare it with my code my am duing everything the same >way but it still

[issue26122] Isolated mode doesn't ignore PYTHONHASHSEED

2016-01-15 Thread Nick Coghlan
New submission from Nick Coghlan: While working on the draft PEP 432 implementation, I noticed that -I isn't special cased for early processing the same way that -E is: https://hg.python.org/cpython/file/tip/Modules/main.c#l265 This means that when isolated mode is used to turn off

Re: Turtle

2016-01-15 Thread Bernardo Sulzbach
Maybe the tutorial is using Python 2. Always provide a SSCCE and, when it makes sense, the error message. -- https://mail.python.org/mailman/listinfo/python-list

[issue26072] pdb fails to access variables closed over

2016-01-15 Thread SilentGhost
Changes by SilentGhost : -- nosy: +georg.brandl type: -> behavior ___ Python tracker ___

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Bernardo Sulzbach
On Fri, Jan 15, 2016 at 2:56 AM, Chris Angelico wrote: > > We would have to skip a few - 3.I and 3.O are too confusing, and 3.X > would wreak havoc with people's heads. But then, so would 3.A... > > Let's do this. Wreak the havoc. Unleash the folly. Dispel the sanity! > There

[issue26121] Use C99 functions in math if available

2016-01-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently the math module uses own implementation of some mathematical functions that are in C99 standard, but not in C89 standard: tgamma, lgamma, erf, erfc. Proposed patch makes it to use functions from standard C library if they are available. They are

Re: ignoring or replacing white lines in a diff

2016-01-15 Thread Peter Otten
Adriaan Renting wrote: > - print line, did remove the extra newlines, but didn't get rid of the > blank lines. You mean you found that import fileinput for line in fileinput.FileInput("test.xml", inplace=True): if line.strip(): print line, does not remove all blank lines? If the

[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-01-15 Thread Alessandro Cucci
Alessandro Cucci added the comment: I there anything else I can do for this? -- ___ Python tracker ___ ___

Re: Powerful perl paradigm I don't find in python

2016-01-15 Thread Wolfgang Maier
On 15.01.2016 12:04, Charles T. Smith wrote: On Fri, 15 Jan 2016 11:42:24 +0100, Wolfgang Maier wrote: On 15.01.2016 10:43, Peter Otten wrote: Charles T. Smith wrote: while ($str != $tail) { $str ~= s/^(head-pattern)//; use ($1); } things = [] while some_str != tail:

Re: Powerful perl paradigm I don't find in python

2016-01-15 Thread Wolfgang Maier
On 15.01.2016 10:43, Peter Otten wrote: Charles T. Smith wrote: while ($str != $tail) { $str ~= s/^(head-pattern)//; use ($1); } For those whose Perl's a little rusty: what does this do? A self-contained example might also be useful... Right, an explanation would certainly get

Re: problem

2016-01-15 Thread eryk sun
On Thu, Jan 14, 2016 at 7:03 PM, Andrew Ongko wrote: > At least, this way, the cmd doesn't close by itself. This phrasing may perpetuate a common misconception that the Windows console is (or is created by) cmd.exe. The cmd.exe shell is just another console client

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread Sebastian Rittau
New submission from Sebastian Rittau: The HTTP status code constants in Python 3.5 http.client are not compatible with the constants in Python 3.4, since the str() behaviour is different. This breaks code: srittau@moby:~$ python3.5 Python 3.5.1+ (default, Jan 13 2016, 15:09:18) [GCC 5.3.1

[issue26121] Use C99 functions in math if available

2016-01-15 Thread Christian Heimes
Christian Heimes added the comment: Faster: maybe. More accurate ... Mark can tell you some funny stories. :) -- nosy: +christian.heimes ___ Python tracker

Re: Powerful perl paradigm I don't find in python

2016-01-15 Thread Peter Otten
Charles T. Smith wrote: > What the original snippet does is parse *and consume* a string - actually, > to avoid maintaining a cursor traverse the string. The perl feature is > that substitute allows the found pattern to be replaced, but retains the > group after the expression is complete. That

Re: Consistent error

2016-01-15 Thread iykeluvzu
On Sunday, January 3, 2016 at 5:59:30 PM UTC+1, cc.fe...@gmail.com wrote: > On Sunday, January 3, 2016 at 5:28:49 PM UTC+1, Ian wrote: > > On Sun, Jan 3, 2016 at 8:59 AM, wrote: > > > Thanks Chris! > > > Don't worry about the indent, will fix it > > > I've rewritten it to

[issue26124] shlex.quote and pipes.quote do not quote shell keywords

2016-01-15 Thread SilentGhost
Changes by SilentGhost : -- components: +Library (Lib) -Extension Modules nosy: +eric.araujo versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

Re: help

2016-01-15 Thread Dave Farrance
sam Rogers wrote: >  I have downloaded python 2.7  with no problem. It works. I am trying to get >pyserial to work. I have tried many different solutions. I am not  sure if it >works or not. How can I be sure? I am using windows 7.  I did not see any help >at python.org.

[issue23606] ctypes.util.find_library("c") no longer makes sense

2016-01-15 Thread Steve Dower
Steve Dower added the comment: The msvcrt module? I don't think so. -- ___ Python tracker ___ ___

[issue26084] HTMLParser mishandles last attribute in self-closing tag

2016-01-15 Thread Ezio Melotti
Ezio Melotti added the comment: This is not a bug, as described in the HTML5 standard[0], if an unquoted attribute value is followed by a /, the / is included (the "anything else" branch of that list). This is also what browsers do: try to create an HTML document that includes and open it in

Re: Powerful perl paradigm I don't find in python

2016-01-15 Thread me
On 2016-01-15, Ulli Horlacher wrote: > Charles T. Smith wrote: >> while ($str != $tail) { >> $str ~= s/^(head-pattern)//; >> use ($1); >> } > > use() is illegal syntax in Perl. Actually it is not. OP is defnitely thinking of

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread SilentGhost
Changes by SilentGhost : -- keywords: +3.5regression nosy: +serhiy.storchaka type: -> behavior versions: +Python 3.6 ___ Python tracker

ANN: psutil 3.4.1 with NetBSD support released

2016-01-15 Thread Giampaolo Rodola'
Full story here: http://grodola.blogspot.com/2016/01/netbsd-support-for-psutil.html -- Giampaolo - http://grodola.blogspot.com -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

Re: Powerful perl paradigm I don't find in python

2016-01-15 Thread Ulli Horlacher
Charles T. Smith wrote: > while ($str != $tail) { > $str ~= s/^(head-pattern)//; > use ($1); > } use() is illegal syntax in Perl. -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum IZUS/TIK E-Mail:

[issue26125] Incorrect error message in the module asyncio.selector_events.

2016-01-15 Thread Ezio Melotti
Ezio Melotti added the comment: LGTM unless you think we should also add a test that checks that the name of the incorrect type is included in the error message. -- nosy: +ezio.melotti stage: -> commit review type: -> behavior versions: +Python 3.5, Python 3.6 -Python 3.4

[issue18595] zipfile: symlinks etc.

2016-01-15 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker ___ ___ Python-bugs-list

ANN: unicode 2.1

2016-01-15 Thread garabik-news-2005-05
unicode is a simple python command line utility that displays properties for a given unicode character, or searches unicode database for a given name. It was written with Linux in mind, but should work almost everywhere (including MS Windows and MacOSX), UTF-8 console is recommended. ˙pɹɐpuɐʇs

[issue26125] Incorrect error message in the module asyncio.selector_events.

2016-01-15 Thread Carlo Beccarini
New submission from Carlo Beccarini: Incorrect error message in the module asyncio.selector_events for the methods: _SelectorSocketTransport.write _SelectorSslTransport.write _SelectorDatagramTransport.sendto. The previous error was raising a Tuple: TypeError: ('data argument must be byte-ish

help

2016-01-15 Thread sam Rogers via Python-list
  I have downloaded python 2.7  with no problem. It works. I am trying to get pyserial to work. I have tried many different solutions. I am not  sure if it works or not. How can I be sure? I am using windows 7.  I did not see any help at python.org. Can you help? PS my goal is make this

[issue26124] shlex.quote and pipes.quote do not quote shell keywords

2016-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide an example? -- nosy: +serhiy.storchaka ___ Python tracker ___

Writing a stream of bytes

2016-01-15 Thread jmp
Hi pyple ! I'd like to write a stream of bytes into a file. I'd like to use the struct (instead of bytearray) module because I will have to write more than bytes. let's say I want a file with 4 bytes in that order: 01 02 03 04 None of these work: import struct with open('toto', 'wb') as

Re: Powerful perl paradigm I don't find in python

2016-01-15 Thread Nathan Hilterbrand
On 01/15/2016 04:24 AM, Charles T. Smith wrote: while ($str != $tail) { $str ~= s/^(head-pattern)//; use ($1); } IDK... maybe the OP is looking for something like this? : import re def do_something(matchobj): print("I found {}".format(matchobj.group(0))) return "" tail

[issue26118] String performance issue using single quotes

2016-01-15 Thread poostenr
poostenr added the comment: Thank you for your feedback Victor and Steven. I just copied my scripts and 360MB of CSV files over to Linux. The entire process finished in 4 minutes exactly, using the original python scripts. So there is something different between my environments. If it was a

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread Sebastian Rittau
Sebastian Rittau added the comment: It is no doubt that is easy to work around. Once I found the problem it took about five minutes to fix it and roll a new release. And of course for Python 3.5+ code it is better to use the enum http.HTTPStatus directly (I actually like that enum a lot). But

[issue26114] Rewrite math.erf() and math.erfc() from scratch

2016-01-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 76eb752e5447 by Brett Cannon in branch '3.5': Issue #26114: Remove a reference to 'Numerical Recipes'. https://hg.python.org/cpython/rev/76eb752e5447 New changeset 8ad701463cd7 by Brett Cannon in branch 'default': Merge for issue #26114

[issue26114] Rewrite math.erf() and math.erfc() from scratch

2016-01-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset faac8f09020d by Brett Cannon in branch '2.7': Issue #26114: Remove mention of 'Numerical Recipes'. https://hg.python.org/cpython/rev/faac8f09020d -- ___ Python tracker

[issue26114] Rewrite math.erf() and math.erfc() from scratch

2016-01-15 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue26039] More flexibility in zipfile interface

2016-01-15 Thread Thomas Kluyver
Thomas Kluyver added the comment: Attached is a first go at a patch enabling zipfile.open(blah, mode='w') Files must be written sequentially, so you have to close one writing handle before opening another. If you try to open a second one before closing the first, it will raise RuntimeError. I

[issue26118] String performance issue using single quotes

2016-01-15 Thread SilentGhost
SilentGhost added the comment: poostenr, this is demonstrably not a problem with the CPython, which this bug tracker is about. There are few options available on the internet if you need help with your code: mailing lists and irc are among them. -- nosy: +SilentGhost resolution: ->

[issue26121] Use C99 functions in math if available

2016-01-15 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +brett.cannon ___ Python tracker ___ ___

Re: wxpython strange behaviour

2016-01-15 Thread Ian Kelly
On Fri, Jan 15, 2016 at 10:05 AM, Shiva Upreti wrote: > https://gist.github.com/anonymous/4baa67aafd04555eb4e6 > > I wrote the above code to display a toasterbox, and I didnt want it to > display any frames on the screen, just a toasterbox. The problem with this > code

Re: Writing a stream of bytes

2016-01-15 Thread Peter Otten
Mark Lawrence wrote: > On 15/01/2016 15:55, jmp wrote: >> Hi pyple ! > > In the UK it's "purple", a bit like "color" is wrong, it's "colour". Yeah, you Brits are a deep purple. (I thought I had already exhausted my allowance for lame jokes yesterday. Seems I was wrong ;) --

wxpython strange behaviour

2016-01-15 Thread Shiva Upreti
https://gist.github.com/anonymous/4baa67aafd04555eb4e6 I wrote the above code to display a toasterbox, and I didnt want it to display any frames on the screen, just a toasterbox. The problem with this code is that it runs fine when I run it the first time, but when I run it next time it shows

Re: Writing a stream of bytes

2016-01-15 Thread BartC
On 15/01/2016 15:55, jmp wrote: Hi pyple ! I'd like to write a stream of bytes into a file. I'd like to use the struct (instead of bytearray) module because I will have to write more than bytes. let's say I want a file with 4 bytes in that order: 01 02 03 04 None of these work: import

Re: Writing a stream of bytes

2016-01-15 Thread Tim Chase
On 2016-01-15 16:55, jmp wrote: > Hi pyple ! > > > I'd like to write a stream of bytes into a file. I'd like to use > the struct (instead of bytearray) module because I will have to > write more than bytes. > > let's say I want a file with 4 bytes in that order: > > 01 02 03 04 > > None of

Re: Writing a stream of bytes

2016-01-15 Thread Tim Chase
[sorry, toddler on my lap clicked before I could type] > import struct > with open('toto', 'wb') as f: f.write(struct.pack('<4B', *[1,2,3,4])) This one does what you want. The problem resides in your check: > I always end up with the following bytes on file: > !hexdump toto > 000 0201

[issue26125] Incorrect error message in the module asyncio.selector_events.

2016-01-15 Thread Carlo Beccarini
Carlo Beccarini added the comment: https://github.com/python/asyncio/pull/313 -- ___ Python tracker ___ ___

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___

[issue26124] shlex.quote and pipes.quote do not quote shell keywords

2016-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be. But only if this doesn't make the documentation too verbose. -- assignee: -> docs@python components: +Documentation keywords: +easy nosy: +docs@python stage: -> needs patch ___ Python tracker

Re: Writing a stream of bytes

2016-01-15 Thread Mark Lawrence
On 15/01/2016 15:55, jmp wrote: Hi pyple ! In the UK it's "purple", a bit like "color" is wrong, it's "colour". I'd like to write a stream of bytes into a file. I'd like to use the struct (instead of bytearray) module because I will have to write more than bytes. If you'd like to

Re: Writing a stream of bytes

2016-01-15 Thread jmp
On 01/15/2016 05:08 PM, Tim Chase wrote: [sorry, toddler on my lap clicked before I could type] import struct with open('toto', 'wb') as f: f.write(struct.pack('<4B', *[1,2,3,4])) This one does what you want. The problem resides in your check: I always end up with the following bytes on

[issue26125] Incorrect error message in the module asyncio.selector_events.

2016-01-15 Thread Carlo Beccarini
Changes by Carlo Beccarini : -- type: behavior -> versions: +Python 3.4 -Python 3.5, Python 3.6 Added file: http://bugs.python.org/file41625/patch.diff ___ Python tracker

[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-01-15 Thread R. David Murray
Changes by R. David Murray : -- nosy: -r.david.murray ___ Python tracker ___ ___

[issue26124] shlex.quote and pipes.quote do not quote shell keywords

2016-01-15 Thread Charles Daffern
Charles Daffern added the comment: It's definitely a corner case (in argv[0] position + is keyword), but here's an example: >>> import subprocess >>> import shlex >>> subprocess.call(shlex.quote("done"), shell=True) /bin/sh: 1: Syntax error: "done" unexpected 2 The expected output of this

[issue26125] Incorrect error message in the module asyncio.selector_events.

2016-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: Remember also to apply to asyncio's own GitHub repo. --Guido (mobile) On Jan 15, 2016 6:03 AM, "Ezio Melotti" wrote: > > Ezio Melotti added the comment: > > LGTM unless you think we should also add a test that checks that the name >

[issue26114] Rewrite math.erf() and math.erfc() from scratch

2016-01-15 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the historical information, Mark! I'll either update the comment or flat-out delete it so it doesn't trip anyone else up. I'll also scale back the scope of the update since it's just a cleanup and not an IP issue. -- assignee: ->

[issue26124] shlex.quote and pipes.quote do not quote shell keywords

2016-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This does not seem to be a serious problem. In any case the command is failed. And usually argv[0] is predefined command name, not arbitrary user input. To be sure that it is existing program, you can use shutil.which(). I would close this issue as "won't

[issue26124] shlex.quote and pipes.quote do not quote shell keywords

2016-01-15 Thread Charles Daffern
Charles Daffern added the comment: In that case, should the documentation specify that shlex.quote is unsuitable for quoting command names? -- ___ Python tracker

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread Ethan Furman
Ethan Furman added the comment: These changes were made in issue21793. -- ___ Python tracker ___ ___

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Emile van Sebille
On 1/14/2016 3:55 PM, Rick Johnson wrote: But, when you have almost infinitely deep pockets, like Google, you don't need to create *everything* yourself, no, you simply wait for someone else to build it, then wait a little longer for them to market it successfully, and when it's jt

[issue26123] http.client status code constants incompatible with Python 3.4

2016-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this a side effect of using more human-friendly enums. This is not a problem if string representation is used in formatting human-readable messages, but if you need numerical representation, you could use str(int(code)), '%d' % code or

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread William Ray Wing
> On Jan 15, 2016, at 9:52 AM, Emile van Sebille wrote: > > On 1/14/2016 3:55 PM, Rick Johnson wrote: >> But, when you have almost infinitely deep pockets, like >> Google, you don't need to create *everything* yourself, no, >> you simply wait for someone else to build it, then

[issue26126] Possible subtle bug when normalizing and str.translate()ing

2016-01-15 Thread Peter Otten
Peter Otten added the comment: There seems to be a connection to hash randomization. I consistently get $ PYTHONHASHSEED=1 python3.6 ./normbug.py BUG ('The aenid oevre', '!=', 'The AEnid oevre') $ PYTHONHASHSEED=0 python3.6 ./normbug.py OK ('The AEnid oevre', '==', 'The AEnid oevre')

[issue26126] Possible subtle bug when normalizing and str.translate()ing

2016-01-15 Thread Mark Summerfield
New submission from Mark Summerfield: I am using Python 3.4.3 on Xubuntu 14.04 LTS 64-bit. I have a program that when run repeatedly sometimes what I expect, and sometimes does not: $ ~/tmp/normbug.py OK ('The AEnid oevre', '==', 'The AEnid oevre') $ ~/tmp/normbug.py OK ('The AEnid oevre',

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Bernardo Sulzbach
On Fri, Jan 15, 2016 at 3:02 PM, William Ray Wing wrote: > > What Micro$oft was actually sued for was worse. They would approach a small > company: “We like your product/technology, we think we are interested in > buying you out, but we want to see your code to be sure it is >

Re: virtualenv: help me decide

2016-01-15 Thread Paulo da Silva
Às 05:10 de 15-01-2016, Cameron Simpson escreveu: > On 15Jan2016 03:37, Paulo da Silva wrote: ... > Virtualenv is so easy to use that i suggest you > just try it and see. > Thank you very much Cameron. Being easy, I'll give it a try with a small test program and

[issue26126] Possible subtle bug when normalizing and str.translate()ing

2016-01-15 Thread Peter Otten
Peter Otten added the comment: Not a bug. In your XFORMS dict you have >>> ord("Æ") == 0xC6 True Whether the value of "Æ" or 0xC6 is used by str.maketrans() depends on the order of the dict entries which in turn is determined by the keys' hash. Remove one and you should see consistent

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Bernardo Sulzbach
On Fri, Jan 15, 2016 at 4:29 PM, Robin Koch wrote: > > Not necessarily. > See TeX. :-) > GvR does not like even an elegant 3.10 and you are implying that we are going to converge to something? LOL. -- Bernardo Sulzbach --

[issue26094] ConfigParser.get() doc to be updated according to the configparser.py header doc

2016-01-15 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. : -- nosy: +fdrake ___ Python tracker ___ ___

[issue17633] zipimport's handling of namespace packages is incorrect

2016-01-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 07a615a8f9ad by Brett Cannon in branch '3.5': Issue #17633: Improve support for namespace packages with zipimport. https://hg.python.org/cpython/rev/07a615a8f9ad New changeset 87f87673af7b by Brett Cannon in branch 'default': Merge for issue #17633

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Robin Koch
Am 14.01.2016 um 01:40 schrieb Bernardo Sulzbach: On Wed, Jan 13, 2016 at 10:10 PM, Steven D'Aprano wrote: (...) 4.0 (assuming there is one) Isn't it just a matter of time? Do you think it is even possible not to have Python 4 eventually? Not necessarily. See TeX.

[issue26126] Possible subtle bug when normalizing and str.translate()ing

2016-01-15 Thread SilentGhost
Changes by SilentGhost : -- status: open -> closed ___ Python tracker ___ ___

[issue26126] Possible subtle bug when normalizing and str.translate()ing

2016-01-15 Thread SilentGhost
SilentGhost added the comment: Mark, your XFORMS dictionary contains this entry: 0x00C6: "ae" It should be 'AE'. The same applies to 0x0152: "oe" which should be 'OE'. -- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved ___ Python

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread William Ray Wing
> On Jan 15, 2016, at 1:09 PM, Bernardo Sulzbach > wrote: > > On Fri, Jan 15, 2016 at 3:02 PM, William Ray Wing wrote: >> >> What Micro$oft was actually sued for was worse. They would approach a small >> company: “We like your product/technology, we

[issue26127] Broken link in docs for tokenize

2016-01-15 Thread Antony Lee
New submission from Antony Lee: The docs for `tokenize.detect_encoding` state `Use open() to open Python source files: it uses detect_encoding() to detect the file encoding.` Unfortunately, clicking on `open` redirects to the builtin `open` function, not to `tokenize.open` as it should.

[issue26127] Broken link in docs for tokenize

2016-01-15 Thread SilentGhost
SilentGhost added the comment: Here is the patch. Most of the fixes are however for the tokenize function that was for whatever reason linked to the module. -- keywords: +patch nosy: +SilentGhost stage: -> patch review type: -> behavior Added file:

[issue17633] zipimport's handling of namespace packages is incorrect

2016-01-15 Thread Brett Cannon
Brett Cannon added the comment: The fix for 3.5 is in https://hg.python.org/cpython/rev/07a615a8f9ad and 3.6 in https://hg.python.org/cpython/rev/87f87673af7b. Thanks to Phil and Mike for tackling this problem! -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue26124] shlex.quote and pipes.quote do not quote shell keywords

2016-01-15 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: It's not at all obvious that the intention is to ensure such an argument should be treated only as a command external to the shell. If an application really wants to ensure the command is not handled as a shell built-in, it should use shell=False. Making

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Alister
On 15/01/16 18:09, Bernardo Sulzbach wrote: On Fri, Jan 15, 2016 at 3:02 PM, William Ray Wing wrote: What Micro$oft was actually sued for was worse. They would approach a small company: “We like your product/technology, we think we are interested in buying you out, but we

Re: virtualenv: help me decide

2016-01-15 Thread Joel Goldstick
On Fri, Jan 15, 2016 at 1:17 PM, Paulo da Silva < p_s_d_a_s_i_l_v_a...@netcabo.pt> wrote: > Às 05:10 de 15-01-2016, Cameron Simpson escreveu: > > On 15Jan2016 03:37, Paulo da Silva > wrote: > ... > > Virtualenv is so easy to use that i suggest you > > just try it

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Bernardo Sulzbach
In the end, wouldn't contemporary economies benefit from more "legislative fairness" when it comes to technology-focused businesses? -- https://mail.python.org/mailman/listinfo/python-list

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Bernardo Sulzbach
On Fri, Jan 15, 2016 at 4:46 PM, Alister wrote: > > Doublespace disk compression springs to mind Does not ring a bell, I was not even born for MS-DOS 6.0. -- Bernardo Sulzbach -- https://mail.python.org/mailman/listinfo/python-list

[issue26124] shlex.quote and pipes.quote do not quote shell keywords

2016-01-15 Thread Charles Daffern
Charles Daffern added the comment: >To be sure that it is existing program, you can use shutil.which() I'd like to clear this up a little because this is worded as if shutil.which()'s success implies that the shell will not fail. Here is the setup to demonstrate: >>> import os, shlex,

[issue26128] Let the subprocess.STARTUPINFO constructor take arguments

2016-01-15 Thread Ram Rachum
New submission from Ram Rachum: Right now when you want to use `subprocess.STARTUPINFO`, you need to do something like this: si = subprocess.STARTUPINFO() si.dwFlags = subprocess.STARTF_USESTDHANDLES subprocess.Popen(['whatever'], startupinfo=si) It would be much nicer to do

[issue26129] Difference in behaviour with grp.getgrgid and pwd.getpwuid

2016-01-15 Thread Simon Fraser
New submission from Simon Fraser: grp.getgrgid is capable of accepting a string: from grp import getgrgid print(getgrgid('0')) However, pwd.getpwuid can't do the same: from pwd import getpwuid print(getpwuid('0')) Traceback (most recent call last): File "getpwuid_test.py", line 2, in

[issue26130] redundant local copy of a char pointer in classify in Parser\parser.c

2016-01-15 Thread Oren Milman
New submission from Oren Milman: In Parser\parser.c in classify, the 'str' parameter is assigned into the local variable 's'. However, 'str' is not used anywhere else in the function, which makes 's' redundant. My proposal is to simply remove 's', and just use 'str' instead. The diff is

[issue26130] redundant local copy of a char pointer in classify in Parser\parser.c

2016-01-15 Thread SilentGhost
Changes by SilentGhost : -- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, yselivanov ___ Python tracker ___

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Gregory Ewing
On 1/14/2016 3:55 PM, Rick Johnson wrote: And if the owners refuse to sell, no problem, you offer their customers the same services at bargain basement discounts But... that would require you to develop your own version, which is what you're trying to avoid! -- Greg --

Re: wxpython strange behaviour

2016-01-15 Thread Mark Lawrence
On 15/01/2016 17:05, Shiva Upreti wrote: https://gist.github.com/anonymous/4baa67aafd04555eb4e6 I wrote the above code to display a toasterbox, and I didnt want it to display any frames on the screen, just a toasterbox. The problem with this code is that it runs fine when I run it the first

[issue26130] redundant local copy of a char pointer in classify in Parser\parser.c

2016-01-15 Thread Georg Brandl
Georg Brandl added the comment: Looks good to me. s was probably left over after a rewrite of the function. -- ___ Python tracker ___

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Mark Lawrence
On 15/01/2016 18:53, Bernardo Sulzbach wrote: In the end, wouldn't contemporary economies benefit from more "legislative fairness" when it comes to technology-focused businesses? Maybe, but there is as much chance of that happening as Python 2.8 or RickedPython ever getting released, or the

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Gregory Ewing
Chris Angelico wrote: and 3.X would wreak havoc with people's heads. The danger there is that 3.X would sound so cool (everything is cooler with an X in it) that nobody would want to move past it. So after 3.X we would get 3.X.1, ... and then 3.X.X.1, ... At some point people would start

Re: Writing a stream of bytes

2016-01-15 Thread Gregory Ewing
Mark Lawrence wrote: On 15/01/2016 15:55, jmp wrote: Hi pyple ! In the UK it's "purple", a bit like "color" is wrong, it's "colour". Now, let's not make fun of people with English as a second language. That was obviously written with a Jäger accent:

[issue21762] update the import machinery to only use __spec__

2016-01-15 Thread Brett Cannon
Brett Cannon added the comment: So I am going to disagree with Nick about the module attributes and their usefulness (partially because I just made __spec__.parent take precedence over __package__ in issue #25791). While I get the idea of wanting a history of what did (not) change since

[issue26131] Raise ImportWarning when loader.load_module() is used

2016-01-15 Thread Brett Cannon
New submission from Brett Cannon: Since loader.load_module() is documented as deprecated, we should consider raising an ImportWarning when it is used. That way when Python 2.7 support ends we can either remove it or have one more release where the various ImportWarnings turn into

  1   2   >