[issue4311] Race condition on Multiprocessing module documentation

2008-11-12 Thread Alejandro

New submission from Alejandro <[EMAIL PROTECTED]>:

The "devel" documentation of the "Multiprocessing" module at the
"Exchanging objects between processes" section has the following example
snippet:

from multiprocessing import Process, Queue

def f(q):
q.put([42, None, 'hello'])

 if __name__ == '__main__':
 q = Queue()
 p = Process(target=f, args=(q,))
 p.start()
 print q.get()# prints "[42, None, 'hello']"
 p.join()

The last two lines should be swapped to avoid a race condition:

 p.join()
 print q.get()# prints "[42, None, 'hello']"

BTW, Nice work. Keep on going folks =)

--
assignee: georg.brandl
components: Documentation
messages: 75804
nosy: alejolp, georg.brandl
severity: normal
status: open
title: Race condition on Multiprocessing module documentation
versions: Python 2.7

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4311>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4311] Race condition on Multiprocessing module documentation

2008-11-12 Thread Alejandro

Alejandro <[EMAIL PROTECTED]> added the comment:

Ups. My mistake. Sorry

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4311>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21950] import sqlite3 not running

2014-07-10 Thread Alejandro

New submission from Alejandro:

We have compile python 3.4.1 in Suse Linux Enterprise Server 11 SP2

We have compiled it using --prefix as args :

./configure --prefix=/soft/pyt341

make 

make install

We check python has been properly installed:

/soft/pyt341/bin/python3 --version
Python 3.4.1


We try to import sqlite3 lib and we get this error:

/soft/pyt341/bin/python3 -c "import sqlite3"

Traceback (most recent call last):
  File "", line 1, in 
  File "/soft/pyt341/lib/python3.4/sqlite3/__init__.py", line 23, in 
from sqlite3.dbapi2 import *
  File "/soft/pyt341/lib/python3.4/sqlite3/dbapi2.py", line 26, in 
from _sqlite3 import *
ImportError: No module named '_sqlite3'

--
components: Library (Lib)
messages: 222656
nosy: alexganwd
priority: normal
severity: normal
status: open
title: import sqlite3 not running
type: crash
versions: Python 3.4

___
Python tracker 
<http://bugs.python.org/issue21950>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21950] import sqlite3 not running

2014-07-10 Thread Alejandro

Alejandro added the comment:

Yes. We have these packages installed:

rpm -qa | grep sqlite
sqlite3-3.7.6.3-1.4.4.1
libsqlite3-0-3.7.6.3-1.4.4.1
sqlite3-devel-3.7.6.3-1.4.4.1

--

___
Python tracker 
<http://bugs.python.org/issue21950>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21950] import sqlite3 not running

2014-07-10 Thread Alejandro

Alejandro added the comment:

Here you have (attached):  make.log
Thanks!

--
Added file: http://bugs.python.org/file35920/make.log

___
Python tracker 
<http://bugs.python.org/issue21950>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21950] import sqlite3 not running

2014-07-11 Thread Alejandro

Alejandro added the comment:

I've downloaded UBUNTU 12.04. I've compiled python3 and I got the same error.

Seleccionando el paquete sqlite3 previamente no seleccionado.
Desempaquetando sqlite3 (de .../sqlite3_3.7.9-2ubuntu1.1_i386.deb) ...
Procesando disparadores para man-db ...
Configurando libsqlite3-dev (3.7.9-2ubuntu1.1) ...
Configurando sqlite3 (3.7.9-2ubuntu1.1) ...
ubuntu@ubuntu:~$ python3.4 -c "import sqlite3"
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.4/sqlite3/__init__.py", line 23, in 
from sqlite3.dbapi2 import *
  File "/usr/local/lib/python3.4/sqlite3/dbapi2.py", line 26, in 
from _sqlite3 import *
ImportError: No module named '_sqlite3'

--

___
Python tracker 
<http://bugs.python.org/issue21950>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21950] import sqlite3 not running

2014-07-11 Thread Alejandro

Alejandro added the comment:

we have  /usr/local/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so but we 
didn't have it in /soft/pyt341/lib/python3.4/lib-dynload/

After copying it into /sofy/pyt341 the problem was solved!! ;)

/soft/pyt341/bin/python3 -c "import sqlite3;print(sqlite3.sqlite_version)"
3.7.6.3

In my opinion running ./configure should check if sqlite libs are properly 
satisfied and break compilation if they aren't installed. 
:)

I don't know if this issue could be considered a bug. So I will close it as 
"works for me"

Thanks for all!

--
resolution:  -> works for me
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue21950>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21950] import sqlite3 not running after configure --prefix=/alt/path; make; make install

2014-07-18 Thread Alejandro

Alejandro added the comment:

Here you have make_install.log

Thanks

--
Added file: http://bugs.python.org/file35989/make_install.log

___
Python tracker 
<http://bugs.python.org/issue21950>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6119] Confusing DeprecationWarning

2009-05-26 Thread Alejandro

New submission from Alejandro :

Comparing a lambda and a built-in by equality ("==") raises a
DeprecationWarning when the "-3" flag is used on Python 2.6.2:

$ python2.6 -3
Python 2.6.2 (r262:71600, Apr 28 2009, 16:17:29) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> (lambda x: x) == eval
__main__:1: DeprecationWarning: builtin_function_or_method inequality
comparisons not supported in 3.x
False

On Python 3.0.1 it works just fine:

$ python3.0
Python 3.0.1 (r301:69556, Apr 28 2009, 19:47:09) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> (lambda x: x) == eval
False
>>>

--
components: Interpreter Core
messages: 88394
nosy: alejolp
severity: normal
status: open
title: Confusing DeprecationWarning
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue6119>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6119] Confusing DeprecationWarning

2009-05-26 Thread Alejandro

Changes by Alejandro :


--
type:  -> behavior

___
Python tracker 
<http://bugs.python.org/issue6119>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6400] incorrect commands import

2009-07-02 Thread Alejandro

New submission from Alejandro :

I'm porting a project to Py3k wich contains a "commands.py" script on
the project's module. 

Inside "a.py" there is an "import commands" statement:

/mymodule/commands.py
/mymodule/a.py

The 2to3 tool replaces the "import commands" and all the "commands"
ocurrences with the word "subprocess".

Is is possible to adapt the fix_imports fixer to detect a local import,
like the fix_import fixer (probably_a_local_import)?

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 90010
nosy: alejolp
severity: normal
status: open
title: incorrect commands import
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue6400>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6400] incorrect commands import

2009-07-02 Thread Alejandro

Alejandro  added the comment:

The one included on Python 3.1-rc2.

--

___
Python tracker 
<http://bugs.python.org/issue6400>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12484] The Py_InitModule functions no longer exist, but remain in the docs

2011-07-03 Thread Alejandro Santos

New submission from Alejandro Santos :

While the "Py_InitModule" does not exists on Py3k it is still mentioned on the 
docs:

http://docs.python.org/py3k/extending/extending.html#keyword-parameters-for-extension-functions
http://docs.python.org/py3k/extending/windows.html#a-cookbook-approach
http://docs.python.org/py3k/faq/extending.html#what-does-systemerror-pyimport-fixupextension-module-yourmodule-not-loaded-mean

--
assignee: docs@python
components: Documentation
messages: 139728
nosy: alejolp, docs@python
priority: normal
severity: normal
status: open
title: The Py_InitModule functions no longer exist, but remain in the docs
versions: Python 3.2

___
Python tracker 
<http://bugs.python.org/issue12484>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12484] The Py_InitModule functions no longer exist, but remain in the docs

2011-07-03 Thread Alejandro Santos

Alejandro Santos  added the comment:

The call is also present on the older 3.1 and "dev" release of the docs:

http://docs.python.org/release/3.1.3/extending/extending.html#keyword-parameters-for-extension-functions
http://docs.python.org/release/3.1.3/extending/windows.html#a-cookbook-approach
http://docs.python.org/release/3.1.3/faq/extending.html#what-does-systemerror-pyimport-fixupextension-module-yourmodule-not-loaded-mean

http://docs.python.org/dev/extending/extending.html#keyword-parameters-for-extension-functions
http://docs.python.org/dev/extending/windows.html#a-cookbook-approach
http://docs.python.org/dev/faq/extending.html#what-does-systemerror-pyimport-fixupextension-module-yourmodule-not-loaded-mean

--
versions: +Python 3.1, Python 3.3

___
Python tracker 
<http://bugs.python.org/issue12484>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44906] Crash on deep call stack under Windows

2021-08-12 Thread Alejandro Reimondo


New submission from Alejandro Reimondo :

The py8.py file starts a S8 system, a Smalltalk system running on Python 
runtime, I am actually developing (in Beta).
The system is running w/o problems on OSX systems, but crash (fast exit w/o any 
information) when running on Windows.
The crash occurs while compiling a simple expression (simple but produce a deep 
recursion on parsing stage). The expression is shown in "fileMeIn.st".
The issue happens on Windows and python version Python 3.9.2
The stack depth is aprox 1800 frames.
Steps to reproduce the crash:
1.- decompress the zip file in a folder
2.- on command prompt "python -i py8.py"
3.- "Image loaded" must be shown in console
4.- evaluate "t()" to run tests that fileIn the code in "fileMeIn.st"
5.- after aprox. one minute working, the fast exit occurs and the Python VM 
exits without reporting anything on output

--
components: Windows
files: crashWin3.9-2021-08-12.zip
messages: 399487
nosy: aleReimondo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Crash on deep call stack under Windows
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50214/crashWin3.9-2021-08-12.zip

___
Python tracker 
<https://bugs.python.org/issue44906>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42360] In the namedtuple documentation, mention that typename should match the variable name for the class to be pickle-able

2020-11-15 Thread Alejandro Gonzalez


New submission from Alejandro Gonzalez :

I think the namedtuple documentation should mention that, for classes created 
with it to be pickle-able, the typename argument must match the name of the 
variable the class is being assigned to. Otherwise you get an error like this:

--
>>> Foo = namedtuple("Bar", "x,y")
>>> pickle.dumps(Foo(1, 2))
Traceback (most recent call last):
  File "", line 1, in 
_pickle.PicklingError: Can't pickle : attribute lookup 
Bar on __main__ failed
--

While it is indeed odd to do such naming in the first place, it should be 
admissible in other circumstances not involving pickling, and it is not obvious 
that pickling won't work if you do so.

The pickle documentation does mention this, though:

[...]Similarly, classes are pickled by named reference, so the same 
restrictions in the unpickling environment apply.[...]

but for someone who encounters this error it might be difficult to figure it 
out from that passage.

The added documentation in namedtuple could include a pointer to that section 
of pickle's documentation.

--
assignee: docs@python
components: Documentation
messages: 381007
nosy: alegonz, docs@python
priority: normal
severity: normal
status: open
title: In the namedtuple documentation, mention that typename should match the 
variable name for the class to be pickle-able
type: enhancement

___
Python tracker 
<https://bugs.python.org/issue42360>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-06-08 Thread Alejandro Gonzalez


Alejandro Gonzalez  added the comment:

Hello, I would like to add further on this issue.

(I'm new to bpo. Please advise if this report could be better)

Issue
-

Pickling breaks when attempting to dump an instance of a class that was defined 
by calling ABCMeta directly, because it attempts to look for the class in `abc` 
rather than the module the class was defined in.

Below is a short snippet to reproduce the issue (my environment is Python 3.7.3 
on Ubuntu 16.04)

>>> import pickle
>>> from abc import ABCMeta

>>> class Foo(metaclass=ABCMeta):
>>> pass

>>> Bar = ABCMeta('Bar', (), {})

>>> foo = Foo()
>>> bar = Bar()

>>> foo_p = pickle.dumps(foo)  # OK
>>> bar_p = pickle.dumps(bar)  # PicklingError: Can't pickle : 
>>> attribute lookup Bar on abc failed

I encountered this issue when working on a class factory to define classes 
dynamically. You can work around it if you smuggle `{'__module__': __name__}` 
when calling the metaclass, e.g.:

>>> Qux = ABCMeta('Qux', (), {'__module__': __name__})
>>> qux = Qux()
>>> qux_p = pickle.dumps(qux)  # OK

Apparently others have also stumbled upon this ABCMeta behavior before: 
https://stackoverflow.com/q/49457441

Some ideas to solve this


A. Steven's proposal seems that could work (I haven't tested it myself yet 
though).
- This, however, would be limited to ABCMeta. Any other metaclass 
subclassed from type would have to include that workaround too for it to play 
well with pickle, which leads to,

B. Do A. and include in the documentation some recipe that shows this 
workaround when subclassing from type.

C. Implement A. in type itself. (Maybe around here? 
https://github.com/python/cpython/blob/master/Objects/typeobject.c#L2603)
- I'm not familiar with the internals of CPython, but I guess this would be 
the nuclear option.

If any of above ideas (or some other idea that could come up upon discussion) 
seems sensible, please allow me to work on it. I'd be happy to contribute :)

--
nosy: +alegonz

___
Python tracker 
<https://bugs.python.org/issue28869>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-06-12 Thread Alejandro Gonzalez


Alejandro Gonzalez  added the comment:

>I think we can proceed with option A, but only if doesn't cause visible 
>slow-down for creating ABCs (which is already slower that normal classes). 
>TBH, I don't want to document A as "official" recipe (maybe however mention 
>the problem in the `pickle` module docs).

I'll try using the same approach used in namedtuple, and see if there is any 
visible slow-down.

Regarding the documentation, I see your point. Perhaps adding some section like 
"Notes on pickling dynamically-defined classes" in the `pickle` module would be 
more appropriate? That section would mention that you have to make sure to set 
the `__module__` attribute.

>Note that other "class factories" in stdlib (like collections.namedtuple) do 
>almost exactly option A.

Thanks for the tip. Indeed it does. In fact, the API defines a module argument. 
Its documentation could be improved, though. It should mention why would you 
want to pass that argument (pickling seems to be the reason that argument was 
added in the first place).

--

___
Python tracker 
<https://bugs.python.org/issue28869>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-06-16 Thread Alejandro Gonzalez


Change by Alejandro Gonzalez :


--
keywords: +patch
pull_requests: +13973
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14126

___
Python tracker 
<https://bugs.python.org/issue28869>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-06-16 Thread Alejandro Gonzalez


Alejandro Gonzalez  added the comment:

>Getting the module name from the caller's frame is an expensive operation. It 
>is safe to set __module__ to None. In such case the pickle module is able to 
>find the proper module containing the definition of the class.

Wow, indeed it works. I also tried it from another module other than `__main__` 
and it works.

Checking the source, I see the "magic" happens in pickle's `whichmodule` 
function when looping over `sys.modules` if `__module__` is not found. If that 
case, why check for `__module__` in the first place? wouldn't it be simpler to 
always loop over sys.modules? Is it to avoid looping over `sys.modules` 
whenever possible?

--

___
Python tracker 
<https://bugs.python.org/issue28869>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-06-17 Thread Alejandro Gonzalez


Alejandro Gonzalez  added the comment:

>It can be fixed in general if deduce __module__ in type.__call__() instead of 
>type.__new__().

But wouldn't we have the same problem if a metaclass overrides type.__call__ 
instead?
Also, wouldn't that reset the __module__ value anytime the class is called and 
an object is instantiated?

--

___
Python tracker 
<https://bugs.python.org/issue28869>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-07-20 Thread Alejandro Gonzalez


Alejandro Gonzalez  added the comment:

Hello,

Could anyone take a look at the PR 14126 submitted?
Sorry for the trouble and thank you in advance.

--

___
Python tracker 
<https://bugs.python.org/issue28869>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-07-22 Thread Alejandro Gonzalez

Alejandro Gonzalez  added the comment:

I see, that’s an interesting point. In that case, Serhiy’s approach is indeed 
better.

PR 14166 seems stalled. I’d like to help if there’s anything left to do, if 
possible :)

--

___
Python tracker 
<https://bugs.python.org/issue28869>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works)

2013-07-22 Thread alejandro autalan

alejandro autalan added the comment:

Hello.
I tried 'tkinter_split.patch' patch against 3.3.2, but a fix for grid_info 
function is also needed.

#test.py
import tkinter as tk

root = tk.Tk()
b = tk.Button(root, text='Button')
b.grid()
print(b.grid_info())
root.mainloop()


Here's is the script's output:

alejandro@vostro1:~/tmp$ cpython3.3 test.py 
Traceback (most recent call last):
  File "test.py", line 10, in 
print(b.grid_info())
  File "/home/alejandro/apps/cpython3.3.2/lib/python3.3/tkinter/__init__.py", 
line 2024, in grid_info
if value[:1] == '.':
TypeError: '_tkinter.Tcl_Obj' object is not subscriptable

--
nosy: +alejandroautalan

___
Python tracker 
<http://bugs.python.org/issue16809>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22041] http POST request with python 3.3 through web proxy

2014-07-22 Thread Alejandro MJ

New submission from Alejandro MJ:

I'm trying this specific method with python, in order to use a different ip 
source, to do a POST request: 

import http.client, urllib.parse
data = urllib.parse.urlencode({'QLastname': 'DIAZ HERNANDEZ', 'QFirstname': 
'JAIME'})
headers = {"Content-type": "application/x-www-form-urlencoded","Accept": 
"text/plain"}
conn = http.client.HTTPConnection("www.infobel.com",80, 
source_address=("16.19.109.51", 0))
conn.request("POST", "/es/spain/people.aspx", data, headers)
response = conn.getresponse()
print(response.status, response.reason)
data = response.read()
conn.close()

It works perfectly when I test it without a proxy, but when I try with proxy 
connection, I receive this error:

>>> conn.request("POST", "/es/spain/people.aspx", data, headers)
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python34\lib\http\client.py", line 1090, in request
self._send_request(method, url, body, headers)
  File "C:\Python34\lib\http\client.py", line 1128, in _send_request
self.endheaders(body)
  File "C:\Python34\lib\http\client.py", line 1086, in endheaders
self._send_output(message_body)
  File "C:\Python34\lib\http\client.py", line 924, in _send_output
self.send(msg)
  File "C:\Python34\lib\http\client.py", line 859, in send
self.connect()
  File "C:\Python34\lib\http\client.py", line 836, in connect
self.timeout, self.source_address)
  File "C:\Python34\lib\socket.py", line 509, in create_connection
raise err
  File "C:\Python34\lib\socket.py", line 500, in create_connection
sock.connect(sa)

TimeoutError: [WinError 10060] Se produjo un error durante el intento...

How could I follow proxy configuration in this script? 

This is the code I made to test with proxy (following the documentation of 
Python):

import http.client, urllib.parse
data = urllib.parse.urlencode({'QLastname': 'DIAZ HERNANDEZ', 'QFirstname': 
'JAIME'})
headers={"Content-Type":"application/x-www-form-urlencoded","Accept":"text/plain"}
conn = http.client.HTTPConnection(proxy_url,8080, source_address=(ipAddress, 0))
conn.set_tunnel("www.infobel.com")
conn.request("POST", "/es/spain/people.aspx", data, headers)
response = conn.getresponse()
print(response.status, response.reason)
data = response.read()
conn.close()

I could't make it work in this SO:
SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 2 

The message that proxy give us is this:

2014-07-22 08:31:49 87 16.19.109.51 23.2.2.22 - - - PROXIED "none" -  200 
TCP_ACCELERATED CONNECT - tcp www.infobel.com 80 / - - - 23.2.2.22 39 39 - 
2014-07-22 08:31:49 1  16.19.109.51 23.2.2.22 - - dns_unresolved_hostname 
PROXIED "none" -  404 TCP_ERR_MISS POST - http cachebdvg1.igrupobbva 8080 
/es/spain/people.aspx - aspx - 23.2.2.22 815 230 - 

So I tried to prove it in other SO, such as Windows, in a different computer. A 
curious thing... I've tried this with Python3.4.1 in Windows, and it didn't 
work. But when I proved with Python3.3.5 it works!! 

Thanks for help.

--
components: Windows
messages: 223688
nosy: AlexMJ
priority: normal
severity: normal
status: open
title: http POST request with python 3.3 through web proxy
type: behavior
versions: Python 3.4, Python 3.5

___
Python tracker 
<http://bugs.python.org/issue22041>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22041] http POST request with python 3.3 through web proxy

2014-07-23 Thread Alejandro Mj

Changes by Alejandro Mj :


--
nosy:  -AlexMJ

___
Python tracker 
<http://bugs.python.org/issue22041>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22041] http POST request with python 3.3 through web proxy

2014-07-25 Thread Alejandro MJ

Alejandro MJ added the comment:

Thanks a lot for your help!

I've tested it in Linux, Python version 3.3.5 and the message obtained is this: 
[404 Not Found]. The script is this one (changing of course the ip_address and 
the proxy_url values):

import http.client, urllib.parse
data = urllib.parse.urlencode({'nombre': 'HERVAS INFANTE ALBERTO'})
headers = {"Content-type": "application/x-www-form-urlencoded"}
conn = http.client.HTTPConnection(proxy_url,8080, source_address=(ip_address, 
0))
conn.set_tunnel("www.telexplorer.es",port=80)  
conn.request("POST", "/?zone=namwp",data,headers)
response = conn.getresponse()
print("Test 1: TE - ", response.status, response.reason)
data = response.read()
conn.close()


How could I test that patch attached? I suppose that I have to install 
something on Suse? As I could read in some forums, I should launch this 
sentence:

patch -p1 --dry-run < issue22041_1.patch

Could you please help me with this points? thanks!

--
nosy: +AlexMJ

___
Python tracker 
<http://bugs.python.org/issue22041>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22041] http POST request with python 3.3 through web proxy

2014-07-25 Thread Alejandro MJ

Alejandro MJ added the comment:

I've wrote these sentences on my SUSE, python is installed on path: 
/usr/local/pr/python

computer002:/usr/local/pr/python # patch -p1 --dry-run 
<http://bugs.python.org/issue22041>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22041] http POST request with python 3.3 through web proxy

2014-07-28 Thread Alejandro MJ

Alejandro MJ added the comment:

Thanks a lot for your help, as you suggested the problem was because of the 
method set_tunnel. I've tested the code that you have posted and now works 
perfectly.

I'll keep in mind this for future works. We can conclude that it's not really a 
bug of Python, so that this problem is related to proxy configuration. However, 
I'll take in count which version of Python to use if I have to do a similar job.

Regards,
Alejandro

--
resolution:  -> not a bug

___
Python tracker 
<http://bugs.python.org/issue22041>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6845] Restart support in binary upload for ftplib

2009-09-21 Thread Alejandro Santos

Changes by Alejandro Santos :


--
nosy: +alejolp

___
Python tracker 
<http://bugs.python.org/issue6845>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6400] incorrect commands import

2009-07-02 Thread Alejandro Santos

Alejandro Santos  added the comment:

Sorry. Yes, there is an "__init__.py" script on the same level as the
"commands.py". I forgot to mention it.

/mymodule/commands.py
/mymodule/a.py
/mymodule/__init__.py

This is the real repository:

http://selenic.com/repo/hg/file/b81baf9e4dd6/mercurial

--

___
Python tracker 
<http://bugs.python.org/issue6400>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6400] incorrect commands import

2009-07-02 Thread Alejandro Santos

Alejandro Santos  added the comment:

Thanks!

--

___
Python tracker 
<http://bugs.python.org/issue6400>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6406] NameError on 2to3 tool

2009-07-03 Thread Alejandro Santos

New submission from Alejandro Santos :

Using the -j switch of the 2to3 tool shiped with Python 3.1 final i'm
getting:

Traceback (most recent call last):
  File "/home/alejo/apps/local/bin/2to3", line 6, in 
sys.exit(main("lib2to3.fixes"))
  File "/home/alejo/apps/local/lib/python3.1/lib2to3/main.py", line 132,
in main
options.processes)
  File "/home/alejo/apps/local/lib/python3.1/lib2to3/refactor.py", line
553, in refactor
for i in xrange(num_processes)]
NameError: global name 'xrange' is not defined

Attached patch seems to work fine.

--
components: 2to3 (2.x to 3.0 conversion tool)
files: 2to3-xrange.patch
keywords: patch
messages: 90048
nosy: alejolp, djc
severity: normal
status: open
title: NameError on 2to3 tool
type: crash
versions: Python 3.1
Added file: http://bugs.python.org/file14436/2to3-xrange.patch

___
Python tracker 
<http://bugs.python.org/issue6406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6406] NameError on 2to3 tool

2009-07-03 Thread Alejandro Santos

Alejandro Santos  added the comment:

Thanks!!

--

___
Python tracker 
<http://bugs.python.org/issue6406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6408] 2to3: Local package import

2009-07-03 Thread Alejandro Santos

New submission from Alejandro Santos :

The 2to3 tool shipped with Python 3.1 final doesn't handle correctly a
local package import (fixer fix_import). Test case:

$ find . -name '*.py'
./__init__.py
./a.py
./b/__init__.py
./b/m.py

$ 2to3 a.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: No files need to be modified.

$ cat a.py

from b import m

m.q()


Trying to use the 2to3 tool from one level up won't work either:

$ 2to3 test2to3/a.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: No files need to be modified.

It seems to be a bug in the fixer, which is using the os.path.pathsep
constant when it should be using the os.path.sep instead. 

The probably_a_local_import function is checking if "test2to3/b:"
exists, when it should be checking against: "test2to3/b/"

Attached patch seems to be working:

$ 2to3 test2to3/a.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
--- test2to3/a.py (original)
+++ test2to3/a.py (refactored)
@@ -1,5 +1,5 @@
 
-from b import m
+from .b import m
 
 m.q()
 
RefactoringTool: Files that need to be modified:
RefactoringTool: test2to3/a.py

--
components: 2to3 (2.x to 3.0 conversion tool)
files: 2to3-os.path.sep.path
messages: 90055
nosy: alejolp, djc
severity: normal
status: open
title: 2to3: Local package import
versions: Python 3.1
Added file: http://bugs.python.org/file14437/2to3-os.path.sep.path

___
Python tracker 
<http://bugs.python.org/issue6408>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6408] 2to3: Local package import

2009-07-03 Thread Alejandro Santos

Alejandro Santos  added the comment:

Nice, Thanks!

--

___
Python tracker 
<http://bugs.python.org/issue6408>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17642] IDLE add font resizing hot keys

2013-04-28 Thread Alejandro Rodas

Alejandro Rodas added the comment:

I have made a patch to zoom in and out with  and  
events, respectively. I'll upload it soon since the test suite is giving me an 
error in test_multiprocessing, even before writing the patch.

I have taken a look at ZoomFont.py of IdleX and it also has the option to reset 
the font size to its original value, but I don't know if this feature was 
wanted to be added too. However, ZoomFont controls the size of the LineNumber 
extension, while this patch only changes the font of the editview's text widget.

--
nosy: +alex.rodas

___
Python tracker 
<http://bugs.python.org/issue17642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17642] IDLE add font resizing hot keys

2013-04-28 Thread Alejandro Rodas

Alejandro Rodas added the comment:

I have uploaded my patch as well, it doesn't make use of tkfont (just vanilla 
Tkinter methods) and it works both in Python 2.7 and 3.4 without the need of 
any import.

I think the main difference with Abhishek Kumar's version is that mine does not 
use idleConf to retrieve and set the font size. However, the original 
ZoomFont.py of IdleX does not use it. Is it really necessary?

--
Added file: http://bugs.python.org/file30053/ZoomInOut.patch

___
Python tracker 
<http://bugs.python.org/issue17642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17642] IDLE add font resizing hot keys

2013-04-28 Thread Alejandro Rodas

Changes by Alejandro Rodas :


Removed file: http://bugs.python.org/file30053/ZoomInOut.patch

___
Python tracker 
<http://bugs.python.org/issue17642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17642] IDLE add font resizing hot keys

2013-04-28 Thread Alejandro Rodas

Alejandro Rodas added the comment:

Sorry, I submitted a patch which only works on Windows. This one has been 
tested on Ubuntu too.

--

___
Python tracker 
<http://bugs.python.org/issue17642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17642] IDLE add font resizing hot keys

2013-04-29 Thread Alejandro Rodas

Changes by Alejandro Rodas :


Added file: http://bugs.python.org/file30074/ZoomInOut.patch

___
Python tracker 
<http://bugs.python.org/issue17642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3405] Add support for the new data option supported by event generate (Tk 8.5)

2013-05-04 Thread Alejandro Rodas

Changes by Alejandro Rodas :


--
nosy: +alex.rodas

___
Python tracker 
<http://bugs.python.org/issue3405>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17642] IDLE add font resizing hot keys

2013-05-13 Thread Alejandro Rodas

Alejandro Rodas added the comment:

I have merged the two patches: Now it queries the font size as I did in the 
original patch, and it also stores the position of the cursor based on Abhishek 
Kumar's modification of ZoomFont.py.

--
Added file: http://bugs.python.org/file30251/ZoomInOut.patch2

___
Python tracker 
<http://bugs.python.org/issue17642>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15392] Create a unittest framework for IDLE

2013-05-17 Thread Alejandro Rodas

Changes by Alejandro Rodas :


--
nosy: +alex.rodas

___
Python tracker 
<http://bugs.python.org/issue15392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13657] IDLE doesn't support sys.ps1 and sys.ps2.

2013-05-19 Thread Alejandro Rodas

Alejandro Rodas added the comment:

I have reviewed the patch, and apart from setting the promt, I think it would 
be possible to set it at the beginning with the same approach:

def getprompt(self):
self.interp.runcommand(textwrap.dedent("""\
try:
print(sys.ps1, end="")
except:
import sys
sys.ps1, sys.ps2 = ">>> ", "... "
print(sys.ps1, end="")"""))

What I don't know is why ps1 and ps2 are the only attributes that are missing 
in the sys module within the ModifiedInterpreter. When I try 
InteractiveInterpreter in the original interpreter, it shows the 79 attributes 
that sys has originally.

--
nosy: +alex.rodas

___
Python tracker 
<http://bugs.python.org/issue13657>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26550] documentation minor issue : "Step back: WSGI" section from "HOWTO Use Python in the web"

2016-03-12 Thread Alejandro Soini

New submission from Alejandro Soini:

Bad article usage in the following sentence from the WSGI section on HOWTO Use 
Python in the web (https://docs.python.org/2/howto/webservers.html#wsgi) :

"Authentication is another a problem easily solved using existing middleware."

suggested change:

"Authentication is another problem that is easily solved using existing 
middleware."

--
assignee: docs@python
components: Documentation
messages: 261671
nosy: Alejandro Soini, docs@python
priority: normal
severity: normal
status: open
title: documentation minor issue : "Step back: WSGI" section from "HOWTO Use 
Python in the web"
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 
<http://bugs.python.org/issue26550>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12161] StringIO AttributeError instead of ValueError after close..

2011-05-23 Thread alejandro david weil

New submission from alejandro david weil :

python 2.7 documentation: 
file:///usr/share/doc/python-doc/html/library/stringio.html#StringIO.StringIO.close
(or: http://docs.python.org/library/stringio.html#StringIO.StringIO.close )

says:

"""StringIO.close()

Free the memory buffer. Attempting to do further operations with a closed 
StringIO object will raise a ValueError."""


But this code:

def string_io_close_exception_test():
from StringIO import StringIO
s=StringIO()
s.write("asdf")
s.close()
try:
# 
file:///usr/share/doc/python-doc/html/library/stringio.html#StringIO.StringIO.close
doc = """
StringIO.close()
Free the memory buffer. Attempting to do further operations with a closed 
StringIO object will raise a ValueError.
"""
s.getvalue()
except ValueError:
print "this is the expected"
except Exception, e:
print 'this is unexpected:',type(e), e
raise

produces this output:


this is unexpected:  StringIO instance has no 
attribute 'buf'
Traceback (most recent call last):
  File "problems.py", line 192, in 
string_io()
  File "problems.py", line 184, in string_io
s.getvalue()
  File "/usr/lib/python2.7/StringIO.py", line 270, in getvalue
self.buf += ''.join(self.buflist)
AttributeError: StringIO instance has no attribute 'buf'

--
components: Library (Lib)
messages: 136692
nosy: tenuki
priority: normal
severity: normal
status: open
title: StringIO AttributeError instead of ValueError after close..
type: behavior
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue12161>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-04 Thread alejandro david weil

New submission from alejandro david weil :

Python's documentation includes 2 source codes for alternate xrange 
implementations, which, at least in my tests, give unexpected results.

# from file:///usr/share/doc/python2.6-doc/html/library/functions.html#xrange
takewhile(lambda x:xhttp://docs.python.org/library/functions.html?highlight=xrange#xrange
islice(count(start, step), (stop-start+step-1)//step)


I'll attach a file with source code showing that, and propose 3 different 
versions which seems to work fine. (I've prefer the first one, but python lacks 
of sign() function).

--
assignee: docs@python
components: Documentation
files: test_xrange.py
messages: 135159
nosy: docs@python, tenuki
priority: normal
severity: normal
status: open
title: documentation: alternate version of xrange seems to fail.
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file21887/test_xrange.py

___
Python tracker 
<http://bugs.python.org/issue12003>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-06 Thread alejandro david weil

alejandro david weil  added the comment:

Yes it is. I copied both versions but forgot to specify the second is in 2.7.

This is read in the current (2.7) documentation:
# from: http://docs.python.org/library/functions.html?highlight=xrange#xrange
islice(count(start, step), (stop-start+step-1)//step)

and test_xrange.py shows the output of this code against range(). The code 
includes 2 samples of parameters which gives the unexpected results.

--

___
Python tracker 
<http://bugs.python.org/issue12003>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-06-21 Thread alejandro david weil

alejandro david weil <[EMAIL PROTECTED]> added the comment:

Shorter trigger code..

--
nosy: +tenuki
Added file: http://bugs.python.org/file10698/test_broken3.py

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2378>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2378] UnboundLocalError when trying to raise exceptions inside execfile

2008-06-21 Thread alejandro david weil

alejandro david weil <[EMAIL PROTECTED]> added the comment:

Some debugging helper code and my conclutions of one work day:
debughelper.tgZ:
-test_broken1/2.py  
   one does triggers the bug, the other doesn't)
-rtest.sh 
   executes boths and compares its outputs
-frameobject.c.diff
   applied to Objects/frameobject.c, adds some debug info.

What I found:
1. The CustomException is disappearing from locals()
2. PyFrame_FastToLocals() (from that .c file) is updating the locals, 
and removing that exception from there.
3. In the failing case this code:
if (deref) {
assert(PyCell_Check(value));
value = PyCell_GET(value);
}
 is returning value==NULL.

Don't know why that happens.
But you could inspect out1.txt/out2.txt made with rtest.sh, and could 
discover something..

Added file: http://bugs.python.org/file10699/debughelper.tgz

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2378>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3447] itertools.izip_longest docs don't specify default fillvalue

2008-07-25 Thread Alejandro J. Cura

New submission from Alejandro J. Cura <[EMAIL PROTECTED]>:

izip_longest default fillvalue is None, but the docs don't specify it.
I'm attaching a diff that fixes this.

--
assignee: georg.brandl
components: Documentation
files: itertools.izip_longest-default-fillvalue.diff
keywords: patch
messages: 70259
nosy: alecu, georg.brandl
severity: normal
status: open
title: itertools.izip_longest docs don't specify default fillvalue
type: behavior
versions: Python 2.6
Added file: 
http://bugs.python.org/file10980/itertools.izip_longest-default-fillvalue.diff

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3447>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-03-13 Thread DAVID ALEJANDRO Pineda

DAVID ALEJANDRO Pineda added the comment:

Hello Again.

The problem can be replicated in the same structure when call the 
'functools.partial' feature

I wrote a simple example. It uses the asyncio and multiprocessing structure.

https://github.com/dpineiden/async_multiprocessing

With this dependences:

https://gitlab.com/pineiden/tasktools
https://gitlab.com/pineiden/networktools

In python 3.5.1 works fine even if in the mprocess file uncomment the 
'functools.partial'. But when i use a larger version, like 3.6, fails with the 
'weakref'

--

___
Python tracker 
<http://bugs.python.org/issue29517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16474] More code coverage for imp module

2012-11-14 Thread alejandro david weil

New submission from alejandro david weil:

Add some 5% more code-coverage for imp module in tests.

--
components: Tests
files: imp_test_patch.diff
keywords: patch
messages: 175597
nosy: brett.cannon, tenuki
priority: normal
severity: normal
status: open
title: More code coverage for imp module
versions: Python 3.3
Added file: http://bugs.python.org/file27986/imp_test_patch.diff

___
Python tracker 
<http://bugs.python.org/issue16474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16844] funcName in logging module for python 2.6

2013-01-02 Thread Alejandro Marco Ramos

New submission from Alejandro Marco Ramos:

hi, when use the param 'funcName' in the logging module (version 0.4.9.6 for 
python 2.6) the module crash. Researching in the code (__init__.py) i see that 
the code for get the function name is in method '_log' in the class 'Logger'. 
The function 'findCaller()' returns in the last value the name of the function 
(in the variable name 'func'), but this variable is not present in the caller 
function for create a 'record' object (in this case 'makeRecord'). I added code 
to fix this but i like that review this bug.

--
components: Extension Modules
messages: 178859
nosy: amarco
priority: normal
severity: normal
status: open
title: funcName in logging module for python 2.6
type: crash
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue16844>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16844] funcName in logging module for python 2.6

2013-01-02 Thread Alejandro Marco Ramos

Alejandro Marco Ramos added the comment:

is not related to 16778

--

___
Python tracker 
<http://bugs.python.org/issue16844>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16844] funcName in logging module for python 2.6

2013-01-02 Thread Alejandro Marco Ramos

Alejandro Marco Ramos added the comment:

In response to msg178860.

When use the module logging and in the definition of the format string appear 
'%(funcName)s' the module crash.
(Extract):
File 
"/Library/Python/2.6/site-packages/logging-0.4.9.6-py2.6.egg/logging/__init__.py",
 line 724, in emit
msg = self.format(record)
  File 
"/Library/Python/2.6/site-packages/logging-0.4.9.6-py2.6.egg/logging/__init__.py",
 line 610, in format
return fmt.format(record)
  File 
"/Library/Python/2.6/site-packages/logging-0.4.9.6-py2.6.egg/logging/__init__.py",
 line 403, in format
s = self._fmt % record.__dict__
KeyError: 'funcName'

The object 'record' not contain attribute 'funcName' and line 403 (s = 
self._fmt % record.__dict__) crash.

--

___
Python tracker 
<http://bugs.python.org/issue16844>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-02-09 Thread DAVID ALEJANDRO Pineda

New submission from DAVID ALEJANDRO Pineda:

Hello.

I'm working in a real time data collector project. I'm using asyncio and 
multiprocessing (run_in_executor).
In python 3.5 worked fine but in python 3.6 not, gave to me this error:
 "Traceback (most recent call last):
  File "/usr/local/lib/python3.6/multiprocessing/queues.py", line 241, in _feed
obj = _ForkingPickler.dumps(obj)
  File "/usr/local/lib/python3.6/multiprocessing/reduction.py", line 51, in 
dumps
cls(buf, protocol).dump(obj)
AttributeError: Can't pickle local object 'WeakSet.__init__.._remove'
"

I tracked and the problem is when i run some method in run_in_executor with the 
functools.partial.

Before this version the system works fine.

The main file is local.py (to run with local administration using a socket)
And the engine is in engine.py

The project (in development):
https://gitlab.com/pineiden/collector

--
components: asyncio
files: code_with_bug.png
messages: 287459
nosy: DAVID ALEJANDRO Pineda, gvanrossum, yselivanov
priority: normal
severity: normal
status: open
title: "Can't pickle local object" when uses functools.partial with method and 
args...
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file46614/code_with_bug.png

___
Python tracker 
<http://bugs.python.org/issue29517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-02-15 Thread DAVID ALEJANDRO Pineda

DAVID ALEJANDRO Pineda added the comment:

Now
I try again with different ways to run a method with args, without args works 
fine to insert in the executor.
I find there are big differences with file functools betwen versions 3.5.1 to 
3.6.0.
 Here a more simple example for test the functools:
https://github.com/dpineiden/async_multiprocessing

--

___
Python tracker 
<http://bugs.python.org/issue29517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

2019-07-12 Thread Luis Alejandro Martínez Faneyth

New submission from Luis Alejandro Martínez Faneyth 
:

Hello everyone,

I've been building some minimal python docker images for a while and a few days 
ago an error popped out in my CI when building python 3.8 on debian sid. The 
error happens when trying to install pip with the usual:

curl -fsSL https://bootstrap.pypa.io/get-pip.py | python3.8 - setuptools

The message:

ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/cli/base_command.py", line 178, 
in main
status = self.run(options, args)
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/commands/install.py", line 405, 
in run
installed = install_given_reqs(
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/req/__init__.py", line 54, in 
install_given_reqs
requirement.install(
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/req/req_install.py", line 919, 
in install
self.move_wheel_files(
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/req/req_install.py", line 440, 
in move_wheel_files
move_wheel_files(
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/wheel.py", line 318, in 
move_wheel_files
scheme = distutils_scheme(
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/locations.py", line 180, in 
distutils_scheme
i.finalize_options()
  File "/usr/lib/python3.8/distutils/command/install.py", line 306, in 
finalize_options
(prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
  File "/usr/lib/python3.8/distutils/sysconfig.py", line 501, in get_config_vars
func()
  File "/usr/lib/python3.8/distutils/sysconfig.py", line 461, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'


You can check the full CI output[0] or the building script if you need to[1].

I've checked for similar bugs and I found #28046 but I don't know if this is 
related or not.

Thanks for the great work and I'm looking forward to help you fix this issue.

Luis

[0]https://travis-ci.org/LuisAlejandro/dockershelf/jobs/557990064
[1]https://github.com/LuisAlejandro/dockershelf/blob/master/python/build-image.sh

--
messages: 347765
nosy: luisalejandro
priority: normal
severity: normal
status: open
title: ModuleNotFoundError: No module named 
'_sysconfigdata__linux_x86_64-linux-gnu'
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue37577>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

2019-07-12 Thread Luis Alejandro Martínez Faneyth

Luis Alejandro Martínez Faneyth  added the comment:

New information on this:

python3-distutils for 3.8 exists on Debian (experimental) but python3 (which is 
kind of a meta-package) for 3.8 doesn't exist. It depends on python3.8 or 
python3.7, resulting in the installation on python3.7.

Perhaps this is a bug to report on Debian instead of here, idk.

--
type:  -> crash

___
Python tracker 
<https://bugs.python.org/issue37577>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

2019-07-16 Thread Luis Alejandro Martínez Faneyth

Luis Alejandro Martínez Faneyth  added the comment:

Thanks Christian for the suggestion and Matthias.

--

___
Python tracker 
<https://bugs.python.org/issue37577>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16473] Minor difference in decoding quoted-printable text

2012-11-14 Thread Alejandro Javier Peralta Frías

New submission from Alejandro Javier Peralta Frías:

New to python-dev; I grab a beginner tasks "increase test coverage" and I 
decided to add coverage to this bit of code in the quopri module:

# quopri.py
L138while n > 0 and line[n-1:n] in b" \t\r": 
L139n = n-1

As far as I understand to get into that while-loop the line to decode should 
end in " \t\r\n".

So the I added the following test:

def test_decodestring_badly_enconded(self):
e = b"hello \t\r\n"
p = b"hello\n"
s = self.module.decodestring(e)
self.assertEqual(s, p)

but that only passes when the module doesn't use binascii. In fact I change 
test_quopri to use support.import_fresh_module to disable binascii and removed 
a decorator that was used.

The decode text when binascci is used is:

>>> quopri.decodestring("hello \t\r\n")
'hello \t\r\n'

which differs from

>>> quopri.a2b_qp = None
>>> quopri.b2a_qp = None
>>> quopri.decodestring("hello \t\r\n")
'hello\n

And what's the deal with:

>>> import quopri
>>> quopri.encodestring("hello \t\r")
'hello \t\r'
>>> "hello \t\r".encode("quopri")
'hello=20=09\r'

--
components: Tests
files: test_quopri.diff
keywords: patch
messages: 175593
nosy: aleperalta
priority: normal
severity: normal
status: open
title: Minor difference in decoding quoted-printable text
versions: Python 3.3
Added file: http://bugs.python.org/file27985/test_quopri.diff

___
Python tracker 
<http://bugs.python.org/issue16473>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16473] Minor difference in decoding quoted-printable text

2012-11-14 Thread Alejandro Javier Peralta Frías

Changes by Alejandro Javier Peralta Frías :


--
nosy: +brett.cannon

___
Python tracker 
<http://bugs.python.org/issue16473>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16473] Minor difference in decoding quoted-printable text

2012-11-14 Thread Alejandro Javier Peralta Frías

Alejandro Javier Peralta Frías added the comment:

I think I can answer your last question.  There are two quopri algorithms,
> one where spaces are allowed (message body) and one where they aren't
> (email headers).
>
> OK, thank you. Good to know.

--

___
Python tracker 
<http://bugs.python.org/issue16473>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com