Re: What should Python apps do when asked to show help?

2016-04-30 Thread cs
On 30Apr2016 23:46, Random832 wrote: On Sat, Apr 30, 2016, at 22:30, Grant Edwards wrote: We don't want to use a PAGER variable to specify when we want a pager and when we don't want a pager. If we want a pager we append "| less" to the command. If we don't want a

[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-04-30 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch. I left two review comments about unused variables on Rietveld. -- nosy: +berker.peksag ___ Python tracker

[issue26897] Clarify Popen stdin, stdout, stderr

2016-04-30 Thread Yclept Nemo
New submission from Yclept Nemo: From: https://docs.python.org/dev/library/subprocess.html#popen-constructor "..., an existing file descriptor (a positive integer), an existing file object, and None." It should be made clear that the file object must be backed by an operating system file,

Re: What should Python apps do when asked to show help?

2016-04-30 Thread Steven D'Aprano
On Sun, 1 May 2016 09:51 am, c...@zip.com.au wrote: > Let me recite one of my favourite rules of thumb: > > If it can't be turned off, it's not a feature. - Karl Heuer My microwave oven has a safety lock which prevents the mechanism from operating (generating microwaves) while the door is

[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-04-30 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +brett.cannon stage: -> patch review ___ Python tracker ___

Re: What should Python apps do when asked to show help?

2016-04-30 Thread Random832
On Sat, Apr 30, 2016, at 22:30, Grant Edwards wrote: > We don't want to use a PAGER variable to specify when we want a pager > and when we don't want a pager. If we want a pager we append "| less" > to the command. If we don't want a pager, we don't append that to the > command. Setting

[issue24114] ctypes.utils uninitialized variable 'paths'

2016-04-30 Thread Meador Inge
Meador Inge added the comment: Fixed. Thank y'all for the patch and help with testing. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue24114] ctypes.utils uninitialized variable 'paths'

2016-04-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 57bf7a40925f by Meador Inge in branch '2.7': Issue #24114: Fix an uninitialized variable in `ctypes.util`. https://hg.python.org/cpython/rev/57bf7a40925f New changeset db5baad7ad69 by Meador Inge in branch '3.5': Issue #24114: Fix an uninitialized

Re: What should Python apps do when asked to show help?

2016-04-30 Thread Grant Edwards
On 2016-05-01, Random832 wrote: > On Sat, Apr 30, 2016, at 19:51, c...@zip.com.au wrote: >> _When_ they want a pager. > > Why would they need an environment variable at all in that case, rather > than explicitly invoking the pager by name? We don't want to use a PAGER

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2016-04-30 Thread Torsten Bronger
Changes by Torsten Bronger : -- nosy: +bronger ___ Python tracker ___ ___

Re: What should Python apps do when asked to show help?

2016-04-30 Thread Random832
On Sat, Apr 30, 2016, at 19:51, c...@zip.com.au wrote: > _When_ they want a pager. Why would they need an environment variable at all in that case, rather than explicitly invoking the pager by name? To me, *not* having PAGER=cat signifies that someone *does* want a pager. That may be a crappy

Re: What should Python apps do when asked to show help?

2016-04-30 Thread cs
On 29Apr2016 11:40, Steven D'Aprano wrote: On Fri, 29 Apr 2016 07:08 am, Grant Edwards wrote: On 2016-04-28, Random832 wrote: On Thu, Apr 28, 2016, at 15:39, Grant Edwards wrote: That's fine. If you want two or three forms of documentation then

Re: What should Python apps do when asked to show help?

2016-04-30 Thread cs
On 30Apr2016 13:23, Steven D'Aprano wrote: On Sat, 30 Apr 2016 12:49 pm, Ben Finney wrote: Random832 writes: On Fri, Apr 29, 2016, at 22:27, Rustom Mody wrote: > Instead it does some ½-assed fall-between-the-stools of both That doesn't answer the

Re: How to fill in abbreviation in one column based on state name in another column?

2016-04-30 Thread Bob Gailer
1) Your code seems to be missing a lot. 2) it's better to post a small sample of the dictionary rather than the whole thing. 3) remove the comments that don't seem to say anything useful. 4) tell us what problems you are having -- https://mail.python.org/mailman/listinfo/python-list

Re: How to fill in abbreviation in one column based on state name in another column?

2016-04-30 Thread Joel Goldstick
could you post in plaintext as its really hard to figure out what your code is doing On Sat, Apr 30, 2016 at 4:40 PM, David Shi via Python-list wrote: > I am trying to use apply to execute a lookup function, so that we can put > abbreviation in a new column, in

How to fill in abbreviation in one column based on state name in another column?

2016-04-30 Thread David Shi via Python-list
I am trying to use apply to execute a lookup function, so that we can put abbreviation in a new column, in accordance to a state name in another column. Does anyone knows how to make this to work? Regards. David state_to_code = {"VERMONT": "VT", "GEORGIA": "GA", "IOWA": "IA", "Armed Forces

[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-04-30 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file42668/patchedCPythonTestOutput.txt ___ Python tracker ___

[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-04-30 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file42667/CPythonTestOutput.txt ___ Python tracker ___

[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-04-30 Thread Oren Milman
New submission from Oren Milman: the proposed changes: 1. it seems there is some mix-up with the terms 'importer' and 'finder' (and rarely also 'loader') in the import system and in related code (I guess most of it is just relics from the time before PEP 302). The rational is simply

Re: about special characters

2016-04-30 Thread Jianling Fan
Oh, it works! This is the simplest and best way! Thanks very much! On 30 April 2016 at 13:42, MRAB wrote: > On 2016-04-30 19:13, Jianling Fan wrote: >> >> Hello everyone, >> >> Thanks very much for all your replies and sorry for the inconvience. >> This is my

Re: about special characters

2016-04-30 Thread MRAB
On 2016-04-30 19:13, Jianling Fan wrote: Hello everyone, Thanks very much for all your replies and sorry for the inconvience. This is my first time to post question in this list. I am using python 2.7 in Windows 7 Enterprise version. Here is the the filename that cause the problem:

[issue1944] Document PyUnicode_* API

2016-04-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyUnicode_DecodeCodePageStateful Following functions likely should be wrapped with "#ifndef Py_LIMITED_API": _PyUnicode_ClearStaticStrings _PyUnicode_EQ _PyUnicode_FromId -- nosy: +serhiy.storchaka ___ Python

Re: about special characters

2016-04-30 Thread Terry Reedy
On 4/30/2016 2:13 PM, Jianling Fan wrote: I am using python 2.7 in Windows 7 Enterprise version. Here is the the filename that cause the problem: "Decock-2013-On the potential of δ18O and δ15N.pdf" When I delete the "δ" in the filename, the script works good. You may be able to get "δ" (and

[issue26822] itemgetter/attrgetter/methodcaller objects ignore keyword arguments

2016-04-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > 2) my attempt caused a crash. I found an error in my attempt. Here is a patch that correctly define macros for _PyArg_NoKeywords and _PyArg_NoPositional micro-optimization. I don't know wherever it is worth to push it. --

[issue18688] Document undocumented Unicode object API

2016-04-30 Thread Berker Peksag
Changes by Berker Peksag : -- superseder: -> Document PyUnicode_* API ___ Python tracker ___

[issue10435] Document unicode C-API in reST

2016-04-30 Thread Berker Peksag
Berker Peksag added the comment: This is a duplicate of issue 1944. -- nosy: +berker.peksag resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Document PyUnicode_* API ___ Python tracker

[issue18688] Document undocumented Unicode object API

2016-04-30 Thread Berker Peksag
Berker Peksag added the comment: This is a duplicate of issue 1944. -- nosy: +berker.peksag resolution: -> duplicate stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue1944] Document PyUnicode_* API

2016-04-30 Thread Berker Peksag
Berker Peksag added the comment: Remaining undocumented functions: >From this issue: PyUnicode_RSplit PyUnicode_Partition PyUnicode_RPartition >From issue 10435: PyUnicode_IsIdentifier PyUnicode_Append PyUnicode_AppendAndDel PyUnicode_GetDefaultEncoding PyUnicode_FromOrdinal PyUnicode_Resize

Re: about special characters

2016-04-30 Thread Jianling Fan
Hello everyone, Thanks very much for all your replies and sorry for the inconvience. This is my first time to post question in this list. I am using python 2.7 in Windows 7 Enterprise version. Here is the the filename that cause the problem: "Decock-2013-On the potential of δ18O and δ15N.pdf"

[issue26877] tarfile use wrong code when read from fileobj

2016-04-30 Thread Lars Gustäbel
Lars Gustäbel added the comment: Please give us some example test code that shows us what goes wrong exactly. -- ___ Python tracker ___

[issue26877] tarfile use wrong code when read from fileobj

2016-04-30 Thread Марк Коренберг
Марк Коренберг added the comment: Well, there are more than one workarounds for that. man read: === If a read() is interrupted by a signal after it has successfully read some data, it shall return the number of bytes read. = So, this is a way how to make

[issue26893] ValueError exception raised when using IntEnum with an attribute called "name" and @unique decorator

2016-04-30 Thread Ethan Furman
Ethan Furman added the comment: Thanks for catching that. -- ___ Python tracker ___ ___ Python-bugs-list

Re: Not x.islower() has different output than x.isupper() in list output...

2016-04-30 Thread Christopher Reimer
On 4/30/2016 10:11 AM, Stephen Hansen wrote: You're thinking of the whole "string", but you're operating on single-character substrings, and when " ".islower() is run, its false. Because the two-pronged test, a) if all cased characters are lowercase and b) there is at least one cased

Re: web facing static text db

2016-04-30 Thread Fetchinson . via Python-list
On 4/30/16, Gordon Levi wrote: > "Fetchinson ." wrote: > >>Hi folks, >> >>I have a very specific set of requirements for a task and was >>wondering if anyone had good suggestions for the best set of tools: >> >>* store text documents (about

[issue26711] Fix comparison of plistlib.Data

2016-04-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ronald, my second patch uses "==" instead of __eq__. Is it good to you? -- ___ Python tracker ___

Re: Not x.islower() has different output than x.isupper() in list output...

2016-04-30 Thread Stephen Hansen
On Sat, Apr 30, 2016, at 09:48 AM, Christopher Reimer wrote: > On 4/29/2016 11:43 PM, Stephen Hansen wrote: > > The official documentation is accurate. > > That may be true on a technical level. But the identically worded text > in the documentation implies otherwise. That's the thing -- no

Re: Not x.islower() has different output than x.isupper() in list output...

2016-04-30 Thread Chris Angelico
On Sun, May 1, 2016 at 2:48 AM, Christopher Reimer wrote: > On 4/29/2016 11:43 PM, Stephen Hansen wrote: >> >> The official documentation is accurate. > > > That may be true on a technical level. But the identically worded text in > the documentation implies

Re: Not x.islower() has different output than x.isupper() in list output...

2016-04-30 Thread Christopher Reimer
On 4/29/2016 11:43 PM, Stephen Hansen wrote: The official documentation is accurate. That may be true on a technical level. But the identically worded text in the documentation implies otherwise. Maybe I'm nitpicking this. Even if I submitted a bug to request a clearer explanation in the

[issue26892] debuglevel not honored in urllib

2016-04-30 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Patch for the test. -- Added file: http://bugs.python.org/file42665/urllib_debuglevel_test.patch ___ Python tracker ___

[issue26893] ValueError exception raised when using IntEnum with an attribute called "name" and @unique decorator

2016-04-30 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-04-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +modulefinder should reuse the dis module ___ Python tracker ___

[issue26895] regex matching on bytes considers zero byte as end

2016-04-30 Thread Tim Peters
Tim Peters added the comment: Do note that `.match()` is constrained to match starting at the first byte. `.search()` is not (it can start matching at any position), and your example works fine if `.search()` is used instead. This is all expected, and intended, and documented. --

[issue21746] urlparse.BaseResult no longer exists

2016-04-30 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Matthew. Python 3 documentation has already been updated. -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue21746] urlparse.BaseResult no longer exists

2016-04-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6d49a7330c99 by Berker Peksag in branch '2.7': Issue #21746: Remove BaseResult reference from urlparse documentation https://hg.python.org/cpython/rev/6d49a7330c99 -- nosy: +python-dev ___ Python tracker

[issue26895] regex matching on bytes considers zero byte as end

2016-04-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no bug. The pattern b'a' matches bytes that starts with byte 97 (ord(b'a')), but b'\x00abc' starts with byte 0. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed

[issue23897] Update Python 3 extension module porting guide

2016-04-30 Thread Berker Peksag
Changes by Berker Peksag : -- components: +Documentation stage: -> needs patch type: -> enhancement versions: +Python 3.5, Python 3.6 ___ Python tracker

[issue26895] regex matching on bytes considers zero byte as end

2016-04-30 Thread Simmo Saan
New submission from Simmo Saan: Regex functions on bytes consider zero byte as end and stop matching at that point. This is completely nonsensical since python has no problems working with zero bytes otherwise. For example: Matches as expected: re.match(b'a', b'abc') Does not match

[issue14882] Link/Compile Error on Sun Sparc Solaris10 with gcc3.4.3----python2.6.8

2016-04-30 Thread Berker Peksag
Berker Peksag added the comment: > From some website, I was told that this is caused by a fault of Solaris's gcc. Closing as 'not a bug' since this isn't an issue with Python. Also, 2.6 is now EOL. -- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open ->

[issue26894] Readline not aborting line edition on sigint

2016-04-30 Thread Memeplex
New submission from Memeplex: Maybe this is just a bug in ipython but as it's closely related to http://bugs.python.org/issue23735 I'm reporting it here too, just in case. -- My original report to bug-readline: using readline with ipython 4.1.2 and the TkAgg (or GTK3Agg) backend for

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-04-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I found bugs in peephole.c. I have published my comments on Rietveld, but reviewing peephole.c is still not finished. -- ___ Python tracker

[issue26892] debuglevel not honored in urllib

2016-04-30 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi Chi Hsuan, The patch looks good to me. Additional tests for the coverage of this will be helpful too. Thanks! -- nosy: +orsenthil ___ Python tracker

[issue23960] PyErr_SetImportError doesn't clean up on some errors

2016-04-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- nosy: +serhiy.storchaka stage: patch review -> commit review ___ Python tracker ___

[issue26893] ValueError exception raised when using IntEnum with an attribute called "name" and @unique decorator

2016-04-30 Thread Berker Peksag
Berker Peksag added the comment: Looks like 2545bfe0d273 (issue 23486) is the culprit. -- keywords: +3.5regression nosy: +berker.peksag stage: -> needs patch versions: +Python 3.6 ___ Python tracker

[issue26893] ValueError exception raised when using IntEnum with an attribute called "name" and @unique decorator

2016-04-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Library (Lib) nosy: +barry, eli.bendersky, ethan.furman ___ Python tracker ___

EuroPython 2016: Extra Hot Topics - Call for Proposals

2016-04-30 Thread M.-A. Lemburg
The Program work group is happy to announce that there will be an extra Call for Proposals early in June. This call is limited to hot topics and most recent developments in software and technology. Why is there a second call ? Planning a big conference is a

Re: How to download a flash video from this site?

2016-04-30 Thread zljubisic
On Friday, 29 April 2016 22:40:10 UTC+2, Chris Angelico wrote: > Since you're asking on this list, I'll assume you're using Beautiful > Soup and/or youtube-dl. You'll need to go into more detail about what > you're trying to do, and where the Python problem is. > > ChrisA The situation is very

[issue26864] urllib.request no_proxy check differs from curl

2016-04-30 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26893] ValueError exception raised when using IntEnum with an attribute called "name" and @unique decorator

2016-04-30 Thread Julien Enche
New submission from Julien Enche: The linked file fails with the following error : ValueError: duplicate values found in : id -> User.name, name -> User.name This exception was not raised with Python 3.4. -- files: enumtest.py messages: 264554 nosy: Julien Enche priority: normal

[issue26891] CPython doesn't work when you disable refcounting

2016-04-30 Thread Larry Hastings
Larry Hastings added the comment: Here is my theory: if the code asserts that it's true, and the code normally runs fine, then it's normally true, and therefore I can remove the assertion and the code will run correctly. I haven't hit that assertion in the peephole optimizer. But I have

[issue23960] PyErr_SetImportError doesn't clean up on some errors

2016-04-30 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch. I left review comments on Rietveld (click to the review link above). -- nosy: +berker.peksag stage: -> patch review versions: +Python 3.6 ___ Python tracker

[issue24887] Sqlite3 has no option to provide open flags

2016-04-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: IMO this issue can be closed as the URI filename interface can be used instead of the flags. The URI interface parameters can override the flags given as specified in: https://www.sqlite.org/c3ref/open.html -- nosy: +palaviv

[issue26891] CPython doesn't work when you disable refcounting

2016-04-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Just now I'm reading the code of the peephole optimizer, and it contains such assertion since it modifies the lnotab bytes array in-place. May be there are other similar cases. -- ___ Python tracker

[issue26187] sqlite3 trace callback prints duplicate line

2016-04-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: This issue will be resolved when we change the sqlite3_prepare to sqlite3_prepare_v2. So there should be a dependency on issue 9303. -- ___ Python tracker

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2016-04-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: I made a new patch to fix this issue. I left a fallback to the old API as Jim suggested. In addition to the changes in Robin`s patch I changed sqlite3_close to sqlite3_close_v2 if available. This solves issue 26187 as well. -- nosy: +palaviv Added

[issue26892] debuglevel not honored in urllib

2016-04-30 Thread Chi Hsuan Yen
New submission from Chi Hsuan Yen: The following test program: import sys try: import urllib.request as urllib_request except: import urllib2 as urllib_request print(sys.version) handler = urllib_request.HTTPSHandler(debuglevel=1) opener = urllib_request.build_opener(handler)

EuroPython 2016: Extra Hot Topics - Call for Proposals

2016-04-30 Thread M.-A. Lemburg
The Program work group is happy to announce that there will be an extra Call for Proposals early in June. This call is limited to hot topics and most recent developments in software and technology. Why is there a second call ? Planning a big conference is a

[issue26891] CPython doesn't work when you disable refcounting

2016-04-30 Thread Larry Hastings
Larry Hastings added the comment: I did as you suggested. I also discovered that _Py_NewReference is usually a macro, and I'd only fixed the version in Objects/object.c (the one not being used). When I fixed both those things, and switched the makefile so it uses a different Python

Re: web facing static text db

2016-04-30 Thread Gordon Levi
"Fetchinson ." wrote: >Hi folks, > >I have a very specific set of requirements for a task and was >wondering if anyone had good suggestions for the best set of tools: > >* store text documents (about 10 pages) >* the data set is static (i.e. only lookups are

[issue26807] mock_open()().readline() fails at EOF

2016-04-30 Thread Yolanda
Yolanda added the comment: How about... @@ -2339,9 +2339,12 @@ def mock_open(mock=None, read_data=''): if handle.readline.return_value is not None: while True: yield handle.readline.return_value -for line in _state[0]: -yield line +

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-04-30 Thread Michael Felt
Michael Felt added the comment: Question - before I submit a patch. A. Is there a PEP I should read re: ctypes/util and/or ctypes/cdll? B. I show two different behaviors of responding - My question is, what does the community think should be the response? My preference is to bring the request

Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?]

2016-04-30 Thread Paul Rubin
Rustom Mody writes: > At that point what I gleaned was that original makeinfo was in C > New one was rewritten in perl. The previous one was definitely written in C and I've looked at the code some. I hadn't known there was a new one. The C one was actually the second

Re: Compiling extensions on Python 2.7, Windows 10 64 bit

2016-04-30 Thread Andrea Gavana
Hi, On Friday, 29 April 2016, Igor Korot wrote: > Andrea, > > On Fri, Apr 29, 2016 at 4:27 PM, Andrea Gavana > wrote: > > Hi, > > > > > > On Friday, 29 April 2016, Igor Korot > > wrote: > >> > >>

Re: Not x.islower() has different output than x.isupper() in list output...

2016-04-30 Thread Stephen Hansen
On Fri, Apr 29, 2016, at 06:55 PM, Christopher Reimer wrote: > On 4/29/2016 6:29 PM, Stephen Hansen wrote: > > If isupper/islower were perfect opposites of each-other, there'd be no > > need for both. But since characters can be upper, lower, or *neither*, > > you run into this situation. > >

Re: manpage writing [rst, asciidoc, pod] was [Re: What should Python apps do when asked to show help?]

2016-04-30 Thread Rustom Mody
On Saturday, April 30, 2016 at 9:36:42 AM UTC+5:30, Paul Rubin wrote: > Rustom Mody writes: > > As with all things rms, its taking him decades to realize this defeat > > [Latest makeinfo is 18 times slower than previous version!! > >

[issue24434] ItemsView.__contains__ does not mimic dict_items

2016-04-30 Thread Xiang Zhang
Xiang Zhang added the comment: After reading issue4296, I agree with Serhiy's point on the second issue. Right now, (1, math.nan) in ItemsView({1: math.nan}) returns false which seems not acceptable. -- ___ Python tracker