[issue44158] Clarify documentation for redirected stdout/stderr when using subprocess in Linux

2021-05-17 Thread Andres Gomez
New submission from Andres Gomez : 1. Redirect the stderr and stdout with contextlib's redirect_stderr, redirect_stdout or just by replacing the fd in sys.stderr and sys.stdout 2. We run a subprocess with subprocess.run() 3. The documentation for subprocess states: https://docs.python.

[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

2018-06-01 Thread Andres Ayala
Andres Ayala added the comment: Script to reproduce: import os import pathlib # Change to the Root directory os.chdir('/') # Create a relative path object. p = pathlib.Path('spam') print(p.resolve()) Expected output: /span Incorrect output //span

[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

2018-05-30 Thread Andres Ayala
Change by Andres Ayala : -- nosy: +killerrex ___ Python tracker <https://bugs.python.org/issue33660> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33437] Defining __init__ in enums

2018-05-08 Thread Andres Ayala
Andres Ayala added the comment: I see, with mixed types you need to use __new__ to construct the elements (I imagine is specially important for non mutable types) I have modified the example of the coordinates to try to use a mixed type. Is not the most useful thing, but it mix the bytes

[issue33437] Defining __init__ in enums

2018-05-07 Thread Andres Ayala
New submission from Andres Ayala : I have to read and write many files for an old fortran program where the elements are coded as integer (so 0 is the X, 1 is the Y...) and I have some tags associated to each one. So I tried to create an Enum with some additional fields: class Coord(Enum

[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-01-12 Thread Andres Petralli
Andres Petralli added the comment: Re: rarity. There is at least one more person that ran into the same issue as seen in this report: https://github.com/Azure/azure-cli/issues/5184 -- ___ Python tracker <https://bugs.python.org/issue32

[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-01-12 Thread Andres Petralli
Andres Petralli added the comment: Moving doesn't work, but even removing the firewire adapter (which was unused on my system), doesn't remove it from the output of ifconfig. I did however work around the issue by just patching up uuid in a suboptimal manner (truncated the 64bit in

[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-01-12 Thread Andres Petralli
Andres Petralli added the comment: This could be purely incidental to have shown up in 10.13, but yes, the problem comes from the fact that the first hardware ID in the list of devices happens to be an EUI-64 address with 64 bits now. This is the Firewire interface of my Mac Pro and maybe

[issue32502] uuid1() broken on macos high sierra

2018-01-06 Thread Andres Petralli
Andres Petralli added the comment: Here's the output from my system. This is a Mac Pro with a firewire port. Looks as if the address was picked up from fw0: actually, not lo0. Guess _find_mac just iterates until it hits a matching word for a hw address: lo0: flags=8049 mtu

[issue32502] uuid1() broken on macos high sierra

2018-01-06 Thread Andres Petralli
New submission from Andres Petralli : uuid.py is getting a 64 bit hardware address for the loopback adapter in High Sierra, specifically in _ifconfig_getnode(). The function expects a 48 bit mac address, but is instead getting 64 bits back and converting it to an int value that is too long

[issue26049] Poor performance when reading large xmlrpc data

2016-05-18 Thread Oscar Andres Alvarez Montero
Changes by Oscar Andres Alvarez Montero : -- nosy: +Oscar Andres Alvarez Montero ___ Python tracker <http://bugs.python.org/issue26049> ___ ___ Python-bugs-list m

[issue826897] Proto 2 pickle vs dict subclass

2014-09-08 Thread Andres Riancho
Andres Riancho added the comment: FYI, I'm using Python 2.7.6 -- ___ Python tracker <http://bugs.python.org/issue826897> ___ ___ Python-bugs-list m

[issue826897] Proto 2 pickle vs dict subclass

2014-09-08 Thread Andres Riancho
Changes by Andres Riancho : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue826897> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue826897] Proto 2 pickle vs dict subclass

2014-09-08 Thread Andres Riancho
Changes by Andres Riancho : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue826897> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue826897] Proto 2 pickle vs dict subclass

2014-09-08 Thread Andres Riancho
Andres Riancho added the comment: Django's issue [0] shows the ugly code people write to work around this python bug. [0] https://code.djangoproject.com/ticket/15863 -- ___ Python tracker <http://bugs.python.org/iss

[issue826897] Proto 2 pickle vs dict subclass

2014-09-08 Thread Andres Riancho
Andres Riancho added the comment: Well, closing this as wont-fix is far from ideal. +4 years have past from the last activity in this issue but people are still being hit by this issue. In my case I'm not creating any special sub-class, I just use one of Python's built-in libs:

[issue14881] multiprocessing.dummy craches when self._parent._children does not exist

2013-10-18 Thread Andres Riancho
Andres Riancho added the comment: Is this a duplicate for http://bugs.python.org/issue10015 #10015 ? -- nosy: +Andres.Riancho ___ Python tracker <http://bugs.python.org/issue14

[issue18607] struct.unpack

2013-07-31 Thread Andres Adjimann
Andres Adjimann added the comment: sorry my bad. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue18607> ___ __

[issue18607] struct.unpack

2013-07-31 Thread Andres Adjimann
New submission from Andres Adjimann: There is something wrong with struct.unpack. import struct print struct.calcsize('BHB') 8 print struct.calcsize('BHB') 9 -- messages: 194009 nosy: Andres.Adjimann priority: normal severity: normal status: open title

[issue17836] multiprocessing exceptions with useful traceback

2013-04-24 Thread Andres Riancho
New submission from Andres Riancho: In pool.py, the worker function reads as follows: http://svn.python.org/view/python/trunk/Lib/multiprocessing/pool.py?view=markup """ 68 job, i, func, args, kwds = task 69 try: 70 result = (True, fun

[issue13796] use 'text=...' to define the text attribute of and xml.etree.ElementTree.Element

2012-01-18 Thread Pedro Andres Aranda Gutierrez
Pedro Andres Aranda Gutierrez added the comment: Thanks a lot again :-) We have a saying here: you'll never go to sleep without having learnt something new :-) On Tue, Jan 17, 2012 at 4:11 PM, patrick vrijlandt wrote: > > patrick vrijlandt added the comment: > > Hi, > &g

[issue13796] use 'text=...' to define the text attribute of and xml.etree.ElementTree.Element

2012-01-16 Thread Pedro Andres Aranda Gutierrez
Pedro Andres Aranda Gutierrez added the comment: Touché :-) I was just frustrated because my XMLs never have tail or text as attributes and I wanted to have more compact code... On Mon, Jan 16, 2012 at 12:14 PM, patrick vrijlandt wrote: > > patrick vrijlandt added the comment: >

[issue13796] use 'text=...' to define the text attribute of and xml.etree.ElementTree.Element

2012-01-15 Thread Pedro Andres Aranda Gutierrez
New submission from Pedro Andres Aranda Gutierrez : I have extended the xml.etree.ElementTree.Element class and pass the text attribute in the arguments. This creates much more compact code: import xml.etree.ElementTree as xml class Element(xml.Element): def __init__(self

[issue13795] CDATA Element missing

2012-01-15 Thread Pedro Andres Aranda Gutierrez
New submission from Pedro Andres Aranda Gutierrez : When creating ElementTree objects that hold SVG drawings, I need a CDATA object similar to the ProcessingInstruction object. There was a circumvention of the problem for Python 2.6: http://stackoverflow.com/questions/174890/how-to-output

[issue11280] urllib2 http_error_302 calls undefined "getheaders" method

2011-02-22 Thread Andres Riancho
Andres Riancho added the comment: Yes, the traceback was in my code because as I stated before: "my w3af code had a section of urllib2's code in logHandler.py" in other words, I copy+pasted a section of urllib2 into my code. Can't provide a

[issue11280] urllib2 http_error_302 calls undefined "getheaders" method

2011-02-22 Thread Andres Riancho
Andres Riancho added the comment: One more comment to be added. Please take a look at the following [0] w3af bug report. The interesting part starts at "[ Sun Nov 28 01:25:47 2010 - debug ] Traceback (most recent call last):". In there you'll find that my w3af code had a secti

[issue11280] urllib2 http_error_302 calls undefined "getheaders" method

2011-02-22 Thread Andres Riancho
Andres Riancho added the comment: Please take a deeper look. I think you're trusting the "old code" more than my bug report. Some things to keep in mind: * The "headers" parameter is a dict. It will never have a getheaders method * The If you search the whole u

[issue11280] urllib2 http_error_302 calls undefined "getheaders" method

2011-02-21 Thread Andres Riancho
New submission from Andres Riancho : Buggy Code: """ def http_error_302(self, req, fp, code, msg, headers): # Some servers (incorrectly) return multiple Location headers # (so probably same goes for URI). Use first header. if '

[issue2799] Remove _PyUnicode_AsString(), rework _PyUnicode_AsStringAndSize(), add PyUnicode_AsChar()

2010-12-07 Thread Julian Andres Klode
Julian Andres Klode added the comment: The problem I see here is that there is no public way to simply get a C string from a unicode object similar to PyBytes_AsString() for bytes. That's bad because we don't want to rewrite the whole code to duplicate strings all the time and

[issue3831] Multiprocessing: Expose underlying pipe in queues

2010-06-08 Thread Andres Freund
Andres Freund added the comment: As soon as some bytes are signalled as being available one can simply do a normal get(). I don't really see the problem here? Sure, the get() might not be completely non-blocking (especially if the transferred event is more than the size of a pipe-buffer

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-04-20 Thread Andres Moreira
Changes by Andres Moreira : -- nosy: +andrix ___ Python tracker <http://bugs.python.org/issue7946> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6483] Modules are not deallocated correctly if m_size = -1

2010-04-20 Thread Julian Andres Klode
Julian Andres Klode added the comment: This bug still exists in Python 3.1.2. -- ___ Python tracker <http://bugs.python.org/issue6483> ___ ___ Python-bugs-list m

[issue7920] urllib2.HTTPRedirectHandler incorrect redirect

2010-02-13 Thread Andres Riancho
Andres Riancho added the comment: The problem is still there in 2.7: >>> urlparts = urlparse.urlparse('C:\\boot.ini') >>> urlparts ('c', '', '\\boot.ini', '', '', '') >>> if not urlparts.path: ..

[issue7920] urllib2.HTTPRedirectHandler incorrect redirect

2010-02-12 Thread Andres Riancho
New submission from Andres Riancho : Buggy code: """ if 'location' in headers: newurl = headers.getheaders('location')[0] elif 'uri' in headers: newurl = headers.getheaders('uri')[0] els

[issue6483] Modules are not deallocated correctly if m_size = -1

2009-07-15 Thread Julian Andres Klode
Julian Andres Klode added the comment: I believe this may be related to Python/import.c (l. 592): def->m_base.m_copy = PyDict_Copy(dict); It creates a copy of the module dictionary, but the reference count of this copy is not decreased when the module object is deallocated, thus caus

[issue6483] Modules are not deallocated correctly if m_size = -1

2009-07-14 Thread Julian Andres Klode
New submission from Julian Andres Klode : The documentation states that m_size should be -1 if no additional memory is needed. But this causes the objects inside the module to not be deallocated at all. The attached module (test) stores an object of a type 'Test', which prints "

[issue6446] import_spam() in extending python can fail without setting the error.

2009-07-09 Thread Julian Andres Klode
New submission from Julian Andres Klode : The given example function initspam fails if an Based on some experience with my own code, I have found out that the function import_spam() fails when the module is not importable. In this case, it returns 0, although it should return -1 when an error

[issue5886] curses/__init__.py: global name '_os' is not defined

2009-04-30 Thread Andres Moreira
New submission from Andres Moreira : Hi, using ipython2.5 in Ubuntu 9.04. I've get this traceback: In [1]: max? --- NameError Traceback (most recent call last) /var/lib/python-su

[issue4932] Little improvement on urlparse module, urlparse function.

2009-01-14 Thread Andres Moreira
Andres Moreira added the comment: Yes are micro-optimizations, but when I parsed a lot of url(10.000 or more) that 10% or 8% or 5% is very well for me :). It was little contribution to that module, anyway, i think that there are more optimizatoins to do but I will try to do it then

[issue4932] Little improvement on urlparse module, urlparse function.

2009-01-14 Thread Andres Moreira
Andres Moreira added the comment: Hi haypo, sorry for submit all the file, it's my first time here and I'm not very used to this process yet. :) Now I attach the patch. -- keywords: +patch Added file: http://bugs.python.org/file12744/urlp

[issue4932] Little improvement on urlparse module, urlparse function.

2009-01-14 Thread Andres Moreira
Andres Moreira added the comment: And that is the profile code. Added file: http://bugs.python.org/file12743/profile_urlparse.py ___ Python tracker <http://bugs.python.org/issue4

[issue4932] Little improvement on urlparse module, urlparse function.

2009-01-14 Thread Andres Moreira
Andres Moreira added the comment: Hi haypo, Ok I've been testing with python 2.6 and I put the results here: optimizedurlparse is the file with my patch First test optimizedurlparse, second urlparse: #:/opt/python2.6/release26-maint$ ./python mio/profile_urlparse.py t

[issue4932] Little improvement on urlparse module, urlparse function.

2009-01-13 Thread Andres Moreira
New submission from Andres Moreira : Hi, I make a little change in the urlsplit function of urlparse module. And the performance when I'm parsing a lot of urls was improved a bit. In the best case was improved around a 20% percent. Python version: 2.5.2 (r252:60911, Oct 5 2008, 19:

[issue1028088] Cookies without values are silently ignored (by design?)

2008-10-10 Thread Andres Riancho
Andres Riancho <[EMAIL PROTECTED]> added the comment: - Problem: The secure flag of cookies is ignored by the load method. - Why is it related to this issue? Because the secure flag is a name without a value: pie=good; other=thing; secure - Why is it bad? Because the RFC says that we

[issue1028088] Cookies without values are silently ignored (by design?)

2008-10-09 Thread Andres Riancho
Andres Riancho <[EMAIL PROTECTED]> added the comment: My problem, and the problem if the original bug reporter (sirilyan) is that the load method ignores names that don't have values. Quoting the original bug report: >>> import Cookie >>> q = Cookie.SimpleCookie(&

[issue1028088] Cookies without values are silently ignored (by design?)

2008-10-08 Thread Andres Riancho
Andres Riancho <[EMAIL PROTECTED]> added the comment: The RFC I'm talking about is: http://www.ietf.org/rfc/rfc2109.txt ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pyt

[issue1028088] Cookies without values are silently ignored (by design?)

2008-10-07 Thread Andres Riancho
Andres Riancho <[EMAIL PROTECTED]> added the comment: Sorry to bother you guys after so much time, but I think that there is at least one bit of the RFC that isn't respected by this "name=value" thing... If we look at the RFC we'll see this: cookie-av =

[issue1401] urllib2 302 POST

2007-11-09 Thread Andres Riancho
Andres Riancho added the comment: As I said in my original bug report, if you don't remove the content-length header or add the data, you are sending an invalid request: START Request= GET http://f00/1.php HTTP/1.1 Content-length: 63 Accept-encoding: identity Accept: */* User-

[issue1401] urllib2 302 POST

2007-11-08 Thread Andres Riancho
Andres Riancho added the comment: According to the RFC: If urllib2 gets a 302 in response to a request, it MUST send the *same* request to the URI specified in the Location header, without modifying the method, headers, or any data (urllib2 is not RFC compliant here) In urllib2, a 301 and a

[issue1401] urllib2 302 POST

2007-11-08 Thread Andres Riancho
Andres Riancho added the comment: As mentioned in the RFC, and quoted by orsenthil, "however, most existing user agent implementations treat 302 as if it were a 303 response", which is true for urllib2.py too ( see line 585 ): http_error_301 = http_error_303 = http

[issue1401] urllib2 302 POST

2007-11-07 Thread Andres Riancho
Changes by Andres Riancho: -- title: urllib 302 POST -> urllib2 302 POST __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1401> __ ___ Python-bugs-li

[issue1401] urllib 302 POST

2007-11-07 Thread Andres Riancho
New submission from Andres Riancho: There is an error in urllib2 when doing a POST request to a URI that responds with a 302 redirection. The problem is in urllib2.py:536, where the HTTPRedirectHandler creates the new Request based on the original one: newurl = newurl.replace

[issue1358] Compile error on OS X 10.5

2007-10-29 Thread andres
andres added the comment: I've attached a compressed config.log. Incidentally, we were able to get Python to compile by appending the following line to pyconfig.h: #define SETPGRP_HAVE_ARG -Andres On Oct 29, 2007, at 1:00 PM, Martin v. Löwis wrote: > > Martin v. Löwis added

[issue1358] Compile error on OS X 10.5

2007-10-29 Thread andres
New submission from andres: Compiling python 2.5.1 on Mac OS X 10.5 (Leopard) fails with the following message: gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o

[issue1305] socket.py hangs on Mac OS X

2007-10-19 Thread andres
New submission from andres: Repeated socket connection attempts hang for >2s on Python 2.5.1 & OS X 10.4 after 250 attempts have been made. -- components: Library (Lib), Macintosh files: sockettest.py messages: 56601 nosy: andres severity: normal status: open title: socket.py h

[issue1217] infinite loop in re module

2007-09-27 Thread Andres Riancho
Andres Riancho added the comment: I think this should be reopened. The findall call is running for 3 hours now. I think that it's a clear case of an infinite loop. __ Tracker &l

[issue1217] infinite loop in re module

2007-09-27 Thread Andres Riancho
Andres Riancho added the comment: Have you tested it ? Is the re.findall() finishing it's work ? I left it working for 5 minutes or more, and got no response. Cheers, __ Tracker &l