Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Frank Millman
"Frank Millman" wrote in message news:ogr3ff$sg1$1...@blaine.gmane.org... By default, psycopg2 uses 'autocommit', which means that even a SELECT is preceded by a 'BEGIN' statement internally. I never changed the default, so all of the following assumes that autocommit is on. Oops - by

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Eryk Sun
Eryk Sun added the comment: The following is an example of the problem, right? >>> fd = os.open('stdout.txt', os.O_CREAT | os.O_WRONLY) >>> os.dup2(fd, 1) >>> print('spam') Traceback (most recent call last): File "", line 1, in OSError: [WinError 87] The parameter is

Re: Working with dictionaries and keys help please!

2017-06-02 Thread Gregory Ewing
On Thu, 1 Jun 2017 10:29 am, David D wrote: Is there a way of performing this where the key will update so that is continues to work sequentially? It sounds like you don't want a dictionary at all, you want a list. You can use the index() method to find the current "key" of an entry. >>>

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Gregory Ewing
Frank Millman wrote: I never changed the default, so all of the following assumes that autocommit is on. I had many SELECT's, but I was not issuing any form of commit, so the locks built up. I solved my problem by always committing. Something is screwy when a feature called "autocommit"

Re: [OT] How to improve my programming skills?

2017-06-02 Thread Adriaan Renting
Adriaan Renting| Email: rent...@astron.nl Software Engineer Radio Observatory ASTRON | Phone: +31 521 595 100 (797 direct) P.O. Box 2 | GSM: +31 6 24 25 17 28 NL-7990 AA Dwingeloo | FAX: +31 521 595 101 The Netherlands| Web:

[issue30547] [Windows] SubinterpreterTest.test_callbacks_leak() of test_atexit leaks references

2017-06-02 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.6/builds/15/steps/test/logs/stdio 0:02:58 [ 28/405/2] test_atexit failed .. beginning 6 repetitions 123456 test_atexit leaked [12, 12, 12] references, sum=36 test_atexit leaked [4,

[issue30392] default webbrowser fails on macOS Sierra 10.12.5

2017-06-02 Thread Ned Deily
Ned Deily added the comment: Thanks for the suggestion but, by the time we have released the next maintenance updates for all actively maintained Python versions, 10.12.6 will have long been released and, once it has been, any need to support the broken 10.12.5 release is dead. --

Re: Converting epoch to string in format yyyy-mm-dd, or maybe it is not necessary

2017-06-02 Thread dieter
zljubi...@gmail.com writes: > I have a dataframe with epoh dates, something like this: > > df = pd.DataFrame( { 'epoch' : [1493928008, 1493928067, 1493928127, > 1493928310, 1493928428, 1493928547]}) > > I want to create a new column with epoch converted to -mm-dd as string. "epoch" dates

[issue30546] [Windows] test_uname_win32_ARCHITEW6432() of test_platform leaks references

2017-06-02 Thread STINNER Victor
Changes by STINNER Victor : -- title: test_uname_win32_ARCHITEW6432() of test_platform leaks references -> [Windows] test_uname_win32_ARCHITEW6432() of test_platform leaks references ___ Python tracker

[issue30542] [EASY] test_files() of test_tools.test_unparse.DirectoryTestCase leaks references

2017-06-02 Thread STINNER Victor
STINNER Victor added the comment: I tagged this issue as easy. I consider that it's a good exercice for new contributors. Core developers: please let new contributors try to fix it since this issue is not critical, try to explain how to fix it rather than writing the fix ;-) --

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Segev Finer
Segev Finer added the comment: We might want to open a separate issue for the FD redirection issue since this one was really about the _io._WindowsConsoleIO.write GetLastError() issue. Also see https://github.com/pytest-dev/pytest/pull/2462 where I discuss this more. Still not sure why it's

[issue30245] possible overflow when organize struct.pack_into error message

2017-06-02 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset aead53b6ee27915de248b07de509529174aaad21 by Xiang Zhang (Johan Liu) in branch 'master': bpo-30245: Fix possible overflow when organize struct.pack_into error message (#1682)

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Chris Angelico
On Fri, Jun 2, 2017 at 6:10 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> Executing a query gives you some sort of object. That object either >> contains all the results, or has the resource handle (or whatever) >> needed to fetch more from the back end. That

Re: Circular iteration on tuple starting from a specific index

2017-06-02 Thread guillaume . paulet
@Gregory Ewing: you were right, your version without *chain* is faster and I quiet like it :) ``` from timeit import timeit from itertools import chain, cycle, islice def cycle_once_with_chain(sequence, start): return chain(islice(sequence, start, None), islice(sequence, start)) def

[issue30550] Document order-preserving dictionary output in son

2017-06-02 Thread Eric O. LEBIGOT
Changes by Eric O. LEBIGOT : -- title: Document order-preserving dictionary output -> Document order-preserving dictionary output in son ___ Python tracker

[issue30550] Document order-preserving dictionary output in json

2017-06-02 Thread Eric O. LEBIGOT
Changes by Eric O. LEBIGOT : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python ___ Python tracker

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Frank Millman
"Skip Montanaro" wrote in message news:canc-5uz2ruxrwnax8pjevqztqbndc0aojz3ggeb04k1zfff...@mail.gmail.com... Assuming the underlying database supports transactions, is there any difference between calling the commit() method on the connection and calling the execute method on the cursor with

[issue30546] test_uname_win32_ARCHITEW6432() of test_platform leaks references

2017-06-02 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.6/builds/15/steps/test/logs/stdio 0:00:17 [ 4/405/1] test_platform failed .. beginning 6 repetitions 123456 test_platform leaked [12, 12, 12] references, sum=36 test_platform

[issue21783] smtpd.py does not allow multiple helo/ehlo commands

2017-06-02 Thread Milan Oberkirch
Milan Oberkirch added the comment: *Barry :P -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue21783] smtpd.py does not allow multiple helo/ehlo commands

2017-06-02 Thread Milan Oberkirch
Milan Oberkirch added the comment: Thanks for pointing me at this, Berry! I added a PR for aiosmtpd at https://github.com/aio-libs/aiosmtpd/pull/106 -- ___ Python tracker

[issue30549] ProcessPoolExecutor hangs forever if the object raises on __getstate__

2017-06-02 Thread Roberto Martínez
New submission from Roberto Martínez: Hi, I detected that a ProcessPoolExecutor hangs if the object fails to picklelize. I attached the simplest code to reproduce the behavior. Note that the interpreter should exit after the exception but it doesn't and hangs forever. I tested with python

[issue30548] typo in documentation for create_autospec

2017-06-02 Thread Erik Byström
New submission from Erik Byström: "a class" should most probably be replaced by "an instance" in the documentation for create_autospec. "You can use a class as the spec for an instance object by passing instance=True. The returned mock will only be callable if instances of the mock are

[issue30245] possible overflow when organize struct.pack_into error message

2017-06-02 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: If you would like, go ahead an submit a PR. -- assignee: docs@python -> rhettinger nosy: +rhettinger priority: normal -> low ___ Python tracker

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Gregory Ewing
Chris Angelico wrote: Executing a query gives you some sort of object. That object either contains all the results, or has the resource handle (or whatever) needed to fetch more from the back end. That basically makes it a cursor, so we're not far different after all :) The point is that my

[issue30545] Enum equality across modules: comparing objects instead of values

2017-06-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> ethan.furman nosy: +ethan.furman ___ Python tracker ___

[issue11783] email parseaddr and formataddr should be IDNA aware

2017-06-02 Thread Milan Oberkirch
Milan Oberkirch added the comment: I see your point, but I'm not fully convinced it relates to this PR directly: the code here just uses the standard interface to use an 'idna' codec. If that codec is buggy that is a different issue. If it's so buggy that using it is absolutely pointless, it

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Chris Angelico
On Fri, Jun 2, 2017 at 5:18 PM, Frank Millman wrote: > As I said, I cannot prove this, but the theory fits the observed behaviour > perfectly, so I have proceeded on the assumption that it is true. Therefore > I now always run every SQL command or block of commands within a

[issue30547] [EASY][Windows] SubinterpreterTest.test_callbacks_leak() of test_atexit leaks references

2017-06-02 Thread STINNER Victor
STINNER Victor added the comment: I tagged this issue as easy. I consider that it's a good exercice for new contributors. Core developers: please let new contributors try to fix it since this issue is not critical, try to explain how to fix it rather than writing the fix ;-) --

[issue30546] [EASY][Windows] test_uname_win32_ARCHITEW6432() of test_platform leaks references

2017-06-02 Thread STINNER Victor
STINNER Victor added the comment: I tagged this issue as easy. I consider that it's a good exercice for new contributors. Core developers: please let new contributors try to fix it since this issue is not critical, try to explain how to fix it rather than writing the fix ;-) --

[issue30536] [EASY] SubinterpThreadingTests.test_threads_join_2() of test_threading leaks references

2017-06-02 Thread STINNER Victor
STINNER Victor added the comment: I tagged this issue as easy. I consider that it's a good exercice for new contributors. Core developers: please let new contributors try to fix it since this issue is not critical, try to explain how to fix it rather than writing the fix ;-) --

[issue30537] Using PyNumber_AsSsize_t in itertools.islice

2017-06-02 Thread Will Roberts
Will Roberts added the comment: Note that this issue also seems to affect other methods in the itertools package, such as permutations. -- nosy: +Will Roberts ___ Python tracker

[issue30550] Document order-preserving dictionary output in json

2017-06-02 Thread Eric O. LEBIGOT
Changes by Eric O. LEBIGOT : -- title: Document order-preserving dictionary output in son -> Document order-preserving dictionary output in json ___ Python tracker

[issue30550] Document order-preserving dictionary output

2017-06-02 Thread Eric O. LEBIGOT
New submission from Eric O. LEBIGOT: The JSON encoder for dictionaries preserves the order of the items in a dictionary: it would be useful to document this behavior, so that users can rely on it. While JSON itself does not have ordered key/value pairs, this feature can be useful (for

[issue30552] Bugs

2017-06-02 Thread Mahira
New submission from Mahira: Hai Python Team, Am very new to programming Am facing following error in python Traceback (most recent call last): File "C:/Users/Mahira/AppData/Local/Programs/Python/Python36/Lib/graphics_setup/Shape Gra Ex.py", line 6, in circle.draw("win") File

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Neil Cerutti
On 2017-06-02, Frank Millman wrote: > As I said, I cannot prove this, but the theory fits the > observed behaviour perfectly, so I have proceeded on the > assumption that it is true. Therefore I now always run every > SQL command or block of commands within a context manager,

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-02 Thread Cheryl Sabella
Cheryl Sabella added the comment: Submitted a PR, thank you. I changed added the argument for count(). Also I noticed that the link to accumulate() was broken, so I fixed that and I added a link to functools in the references at the end of the page. One other thing I noticed was that

[issue30052] URL Quoting page links to function Bytes instead of defintion

2017-06-02 Thread Cheryl Sabella
Cheryl Sabella added the comment: Sorry, Mariatta. I didn't realize this was waiting for a backport. -- ___ Python tracker ___

[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Xavier Morel
Xavier Morel added the comment: > A warning is probably too strong. Also, it's easy to check sys.meta_path at > the interpreter prompt, so I'm not sure it's worth mentioning at all. It's easy if you think of it and did not miss a small bit of the Python 3.3 release note indicating that the

[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 02/06/2017 à 13:21, Xavier Morel a écrit : > > I spent a few hours trying to understand why our import hooks did not work > correctly anymore in 3.5, and I never even considered printing sys.meta_path > in an open interpreter, I realised the behavioural

[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Xavier Morel
Xavier Morel added the comment: > Fair enough. So we can just add a sentence informing readers that `meta_path`, by default, holds entries to handle the standard kinds of modules (.py files, extension modules…). Yeah that's basically what I meant, talking about a "warning" in python 3 may have

[issue27318] Add support for symlinks to zipfile

2017-06-02 Thread Mathieu Bridon
Mathieu Bridon added the comment: Do note that extracting a zipfile with symlinks might lead to unexpected results, for example if the path pointed to is outside of the extract dir. Maybe the behaviour introduced in this patch should not be the default, but instead `extract` and `extractall`

[issue30547] [EASY][Windows] SubinterpreterTest.test_callbacks_leak() of test_atexit leaks references

2017-06-02 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: this issue can be executed on Linux, I think I am going to work on this one. -- nosy: +matrixise ___ Python tracker

[issue30537] Using PyNumber_AsSsize_t in itertools.islice

2017-06-02 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1997 ___ Python tracker ___

[issue30542] [EASY] test_files() of test_tools.test_unparse.DirectoryTestCase leaks references

2017-06-02 Thread Louie Lu
Louie Lu added the comment: Haypo: How do you know that this is leaked at test_files() of test_tools.test_unparse.DirectoryTestCase? The result of your command didn't reveal that is leaked at which test case or function. -- nosy: +louielu ___

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Jon Ribbens
On 2017-06-02, Frank Millman wrote: > "Frank Millman" wrote in message news:ogr3ff$sg1$1...@blaine.gmane.org... > >> By default, psycopg2 uses 'autocommit', which means that even a SELECT is >> preceded by a 'BEGIN' statement internally. I never changed the default, so >> all

[issue30551] Attribute Error

2017-06-02 Thread Mahira
New submission from Mahira: Hai, I am New to python and I am training with some open source projects now am Practising GUI I get the Error Message Traceback (most recent call last): File "C:/Users/Mahira/AppData/Local/Programs/Python/Python36/Lib/graphics_setup/Shape Gra Ex.py", line

[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Xavier Morel
Xavier Morel added the comment: > I'm fine with adding a note to the Python 2 docs, but putting it in Python 3 > seems to be going in the wrong direction as having sys.meta_path not be empty > is how Python will be going forward. I don't think putting a note is any hint that the Python 3

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-02 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +1998 ___ Python tracker ___ ___

[issue30542] [EASY] test_files() of test_tools.test_unparse.DirectoryTestCase leaks references

2017-06-02 Thread STINNER Victor
STINNER Victor added the comment: > Haypo: How do you know that this is leaked at test_files() of > test_tools.test_unparse.DirectoryTestCase? The result of your command didn't > reveal that is leaked at which test case or function. Using the script I wrote which is attached to issue29512.

[issue30551] Attribute Error

2017-06-02 Thread Mahira
Mahira added the comment: hey issue Cleared -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30552] Bugs

2017-06-02 Thread Mahira
Changes by Mahira : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30553] Add HTTP Response code 421

2017-06-02 Thread Julien
New submission from Julien: The `http.HTTPStatus` class provides constants for most of the HTTP status codes. Status code 421 was added by the RFC 7540 (HTTP/2), and is not part of this class. It is described as follows: > The 421 (Misdirected Request) status code indicates that the request >

[issue30526] Allow setting line_buffering on existing TextIOWrapper

2017-06-02 Thread Nick Coghlan
Nick Coghlan added the comment: Right, the request/requirement for in-place configuration changes arise from the fact the underlying buffer objects can't readily be shared, while makes swapping out the wrapper problematic if others may already have references to the original. The "Don't do

[issue30526] Allow setting line_buffering on existing TextIOWrapper

2017-06-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks. I'll produce an updated PR using reconfigure() for line_buffering and write_through. -- ___ Python tracker ___

[issue30414] multiprocesing.Queue silently ignore messages after exc in _feeder

2017-06-02 Thread Thomas Moreau
Thomas Moreau added the comment: This fix, while preventing the Queue to crash, does not give any way to programatically detect that the message was dropped. This is a problem as we can no longer assume that the Queue will not drop messages. For instance, we can no longer detect deadlocks in

[issue30535] Warn that meta_path is not empty

2017-06-02 Thread Eric Snow
Changes by Eric Snow : -- keywords: +easy ___ Python tracker ___ ___

[issue11783] email parseaddr and formataddr should be IDNA aware

2017-06-02 Thread R. David Murray
R. David Murray added the comment: The email package currently forces explicit IDNA use currently. The new policies are supposed to support it automatically but I they currently don't. I'm not sure we should add it to the old interface (parseaddr/formataddr) any longer, but I don't object

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

2017-06-02 Thread Nick Coghlan
Nick Coghlan added the comment: Antoine posted a simpler reconfiguration RFE over in https://bugs.python.org/issue30526 (for setting line buffering). While technically orthogonal to this RFE, we're thinking it might be possible to expose them to users as a common "reconfigure()" API, rather

[issue30052] URL Quoting page links to function Bytes instead of defintion

2017-06-02 Thread Nick Coghlan
Nick Coghlan added the comment: Not your fault, Cheryl! I unfortunately got distracted and didn't follow up on the backports for several PRs I merged a while back. Mariatta has been graciously cleaning some of those up rather than leaving them lingering the way I had been :) I also just

[issue30414] multiprocesing.Queue silently ignore messages after exc in _feeder

2017-06-02 Thread Thomas Moreau
Changes by Thomas Moreau : -- pull_requests: +2001 ___ Python tracker ___ ___

[issue30536] [EASY] SubinterpThreadingTests.test_threads_join_2() of test_threading leaks references

2017-06-02 Thread Sayan Chowdhury
Sayan Chowdhury added the comment: I replicated the issue. Starting to work on the issue. -- nosy: +sayanchowdhury ___ Python tracker ___

[issue30545] Enum equality across modules: comparing objects instead of values

2017-06-02 Thread Ethan Furman
Ethan Furman added the comment: Two points: - Python 2.7 was the version marked, but 2.7 does not come with Enum (wasn't introduced until 3.4 -- the third-party backport does work on 2.7) - the problem in the SO question is not caused by Enum, but by re-importing a module under a

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: > enumerate was described with one argument, but it takes two. > Should I update that as well? Yes please. -- ___ Python tracker

[issue30052] URL Quoting page links to function Bytes instead of defintion

2017-06-02 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +1999 ___ Python tracker ___ ___

[issue30458] CRLF Injection in httplib

2017-06-02 Thread Xiang Zhang
Xiang Zhang added the comment: Looking at the code and the previous issue #22928, CRLF immediately followed by a tab or space (obs-fold: CRLF 1*( SP / HTAB )) is a valid part of a header value so the regex deliberately ignore them. So it looks right to me the url given doesn't raise the same

[issue30554] Inaccessible attribute characters_written on OSError instances

2017-06-02 Thread Igor Kozyrenko (ikseek)
New submission from Igor Kozyrenko (ikseek): If I enumerate attributes on OSError instance with dir dir(OSError()) I see an 'characters_written' attribute (which is supposed to be defined on BlockingIOError according to docs). If I try to access it getattr(OSError(), 'characters_written') I get

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Steve Dower
Steve Dower added the comment: New changeset 523776c3419f6795e78173d53c10e35ec4eed48d by Steve Dower (Segev Finer) in branch 'master': bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails (#1912)

[issue11783] email parseaddr and formataddr should be IDNA aware

2017-06-02 Thread R. David Murray
R. David Murray added the comment: In other words, this was a major standards screwup and we get to deal with the consequences :( All right, since I'm hardly likely to have time to deal with it anyway, we'll just say that email isn't going to handle unicode domain names until *someone*

[issue30545] Enum equality across modules: comparing objects instead of values

2017-06-02 Thread R. David Murray
R. David Murray added the comment: Can you provide actual code that demonstrates the issue you are talking about? -- nosy: +r.david.murray versions: -Python 2.7 ___ Python tracker

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Jon Ribbens
On 2017-06-02, Dennis Lee Bieber wrote: > Connector/Python (MySQL) [guess it is time for me to finally upgrade to > Python 3.x -- it was the delay in getting mysqldb ported that held me back] > does allow for turning on autocommit -- which is documented as issuing an

[issue30555] _io._WindowsConsoleIO breaks in the face of fd redirection

2017-06-02 Thread Segev Finer
Changes by Segev Finer : -- nosy: +eryksun ___ Python tracker ___ ___ Python-bugs-list

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Steve Dower
Steve Dower added the comment: Yeah, make it a separate issue. This PR fixes an obvious error that we should just fix, so I've merged it. (I might get to the backport today, but if someone else submits it then I'll merge.) -- ___ Python tracker

[issue30545] Enum equality across modules: comparing objects instead of values

2017-06-02 Thread Ethan Furman
Ethan Furman added the comment: If your example code is the same as the code in the SO problem, then my previous points stand. According to the plain-English description you provided the comparison would succeed, so if you have example code which: - doesn't involve ModuleA being the __main__

Bug or intended behavior?

2017-06-02 Thread sean . dizazzo
Can someone please explain this to me? Thanks in advance! ~Sean Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print "foo %s" % 1-2 Traceback (most

Re: Bug or intended behavior?

2017-06-02 Thread Jussi Piitulainen
sean.diza...@gmail.com writes: > Can someone please explain this to me? Thanks in advance! > > ~Sean > > > Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" for more information.

[issue30554] Inaccessible attribute characters_written on OSError instances

2017-06-02 Thread Igor Kozyrenko (ikseek)
Igor Kozyrenko (ikseek) added the comment: So is it by design? cgitb library fails to create report if there are links to exceptions based on OSError on the stack because it tries to enumerate all it's attributes. -- ___ Python tracker

[issue11783] email parseaddr and formataddr should be IDNA aware

2017-06-02 Thread Christian Heimes
Christian Heimes added the comment: Adding automatic IDNA decoding is like opening Pandora's box. uts46 is not necessarily the correct solution. The correct handling of internationalized domain names depends on multiple factors: TLD, remote application and more. You actually have to know if

[issue30533] missing feature in inspect module: getmembers_static

2017-06-02 Thread Lisa Roach
Lisa Roach added the comment: +1 to a new getmembers_static(), I don't see why this couldn't be implemented. -- nosy: +lisroach ___ Python tracker ___

[issue30554] Inaccessible attribute characters_written on OSError instances

2017-06-02 Thread Xiang Zhang
Xiang Zhang added the comment: Actually the docs says "This attribute is available when using the buffered I/O classes from the io module", which means it's not always available since it depends on an inner field set or not. It's just like Python code: >>> class CW: ... def __get__(self,

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-06-02 Thread Eric Snow
Eric Snow added the comment: Sorry I didn't see the just-landed PR earlier, but it may make sense to not skip that test under *any* release level for a micro version > 0: @unittest.skipUnless( (sys.version_info.micro > 0 or sys.version_info.releaselevel in ('final',

Re: Manager for project templates, that allows "incremental" feature addition

2017-06-02 Thread Lele Gaifax
Lele Gaifax writes: > Paul Moore writes: > >> On Thursday, 23 March 2017 15:56:43 UTC, Paul Moore wrote: >> >> Sadly, it doesn't support Windows, which is what I use. > > FYI, I just saw https://pypi.python.org/pypi/what/0.4.0, that seems an >

[issue11783] email parseaddr and formataddr should be IDNA aware

2017-06-02 Thread Paul Kehrer
Changes by Paul Kehrer : -- nosy: -reaperhulk ___ Python tracker ___ ___

[issue11783] email parseaddr and formataddr should be IDNA aware

2017-06-02 Thread Paul Kehrer
Paul Kehrer added the comment: As someone who built an idna aware API for pyca/cryptography and deeply regrets it I'd like to weigh in on the side of saying that IDNA is a presentation issue and that supporting it in lower level APIs is the cause of many bugs, some of which can potentially be

[issue30545] Enum equality across modules: comparing objects instead of values

2017-06-02 Thread Madhav Datt
Madhav Datt added the comment: Thanks a lot for those points Ethan. I feel I haven't done a very good job of explaining the bug, but let me use an example. Let's say we have an Enum called MyEnum, which is in a Python module called ModuleA. ModuleB imports ModuleA, and ModuleC imports both,

[issue30555] _io._WindowsConsoleIO breaks in the face of fd redirection

2017-06-02 Thread Segev Finer
New submission from Segev Finer: _WindowsConsoleIO works by taking the handle out of the file descriptors of the stdio handles (get_osfhandle) and reading/writing to it directly using ReadConsoleW/WriteConsoleW. The problem is that some Python code wants to do file descriptor level

[issue30414] multiprocesing.Queue silently ignore messages after exc in _feeder

2017-06-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thomas, thanks for the heads up. I would suggest something like the following patch to multiprocessing.Pool: $ git diff diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py index 7f77837..ebbb360 100644 ---

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Segev Finer
Changes by Segev Finer : -- type: -> behavior ___ Python tracker ___ ___

[issue30052] URL Quoting page links to function Bytes instead of defintion

2017-06-02 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 7a82f9c2b94d31c8f4cc8bb8e3151765d8b148d7 by Nick Coghlan in branch 'master': bpo-30052: Always regenerate cross-references (#1339) https://github.com/python/cpython/commit/7a82f9c2b94d31c8f4cc8bb8e3151765d8b148d7 --

[issue11783] email parseaddr and formataddr should be IDNA aware

2017-06-02 Thread Christian Heimes
Christian Heimes added the comment: We can't replace IDNA-2003 with IDNA-2008 either. Some applications / protocols / TLDs still use IDNA-2003. I see two options, (1) make encoding configurable somehow, (2) drop implicit IDNA encoding/decoding and force applications to perform explicit IDNA.

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Chris Angelico
On Sat, Jun 3, 2017 at 5:31 AM, Jon Ribbens wrote: > On 2017-06-02, Chris Angelico wrote: >> On Sat, Jun 3, 2017 at 2:45 AM, Jon Ribbens >> wrote: >>> Bewaare - MyISAM tables have no transactions for DML but they do have

[issue30557] faulthandler does not correctly filter fatal exceptions on Windows

2017-06-02 Thread Steve Dower
New submission from Steve Dower: faulthandler adds a structured exception handler on Windows so we can dump a Python traceback before crashing. This should only be done for fatal exceptions, but is currently done for some non-fatal exceptions. The current test is `flags &

[issue30557] faulthandler does not correctly filter fatal exceptions on Windows

2017-06-02 Thread Steve Dower
Steve Dower added the comment: Also, it displays exception codes as decimal, but should be hex. I'll fix that too -- ___ Python tracker ___

[issue30557] faulthandler does not correctly filter fatal exceptions on Windows

2017-06-02 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +2004 ___ Python tracker ___ ___

[issue30544] _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

2017-06-02 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +2005 ___ Python tracker ___ ___

HD LIVE مسلسل غرابيب سود الحلقة 8 @) ))MBC(( مشاهدة غرابيب سود الحلقة 8 الثامنة كاملة LBC

2017-06-02 Thread 6hktt . com
HD LIVE مسلسل غرابيب سود الحلقة 8 @) ))MBC(( مشاهدة غرابيب سود الحلقة 8 الثامنة كاملة LBCHD LIVE مسلسل غرابيب سود الحلقة 8 @) ))MBC(( مشاهدة غرابيب سود الحلقة 8 الثامنة كاملة LBCHD LIVE مسلسل غرابيب سود الحلقة 8 @) ))MBC(( مشاهدة غرابيب سود الحلقة 8 الثامنة كاملة LBCHD LIVE مسلسل غرابيب سود

[issue30554] Inaccessible attribute characters_written on OSError instances

2017-06-02 Thread R. David Murray
R. David Murray added the comment: That's actually a very good question. hasattr returns False, but is it supposed to be an invariant that if dir returns a string hasattr should return True and getattr should not return AttributeError? (Well, it might raise AttributeError from inside the

Re: Python DB API - commit() v. execute("commit transaction")?

2017-06-02 Thread Neil Cerutti
On 2017-06-02, Dennis Lee Bieber wrote: > > A bit of a long free-association rambling... > > On Fri, 2 Jun 2017 12:07:45 + (UTC), Neil Cerutti > declaimed the following: >>You're probably not expected to interleave transaction control

[issue30518] Import type aliases from another module

2017-06-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Block = [int, Tuple[int]] > Blocks = List[Block] These are both invalid type aliases (I have no idea why PyCharm does not flag them, you could report this at PyCharm issue tracker). I am not sure what exactly you want. If you want a list of either

[issue30555] _io._WindowsConsoleIO breaks in the face of fd redirection

2017-06-02 Thread Steve Dower
Steve Dower added the comment: > We can also switch to calling _get_osfhandle always instead of caching the > handle, it will break when the fd is redirected to a non-console. But so does > _WindowsConsoleIO in general since it will try to continue writing to the > console despite the

  1   2   >