[issue4470] smtplib SMTP_SSL not working.

2011-06-13 Thread Torsten Bronger

Torsten Bronger  added the comment:

I still have to apply Catucci's patch (or a modification of) after every Ubuntu 
installation or upgrade.  Otherwise, I get

  ...
  File "/usr/lib/python2.7/smtplib.py", line 752, in __init__
SMTP.__init__(self, host, port, local_hostname, timeout)
  File "/usr/lib/python2.7/smtplib.py", line 239, in __init__
(code, msg) = self.connect(host, port)
  File "/usr/lib/python2.7/smtplib.py", line 295, in connect
self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python2.7/smtplib.py", line 757, in _get_socket
new_socket = socket.create_connection((host, port), timeout)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
raise err
socket.error: [Errno 111] Connection refused

But isn't it that #4066 should have solved the critical part this issue pair 
4066/4470?

--
nosy: +bronger

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



[issue4470] smtplib SMTP_SSL not working.

2011-06-17 Thread Torsten Bronger

Torsten Bronger  added the comment:

No, I don't know how to do that.  All I can provide is a minimal version of my 
code that triggers the above mentioned traceback.  It is:

import smtplib

s = smtplib.SMTP_SSL("relay-auth.rwth-aachen.de")
s.login("***", "***")
s.sendmail("bron...@physik.rwth-aachen.de", "bronger.ran...@googlemail.com"], 
"Hello")

I hope it helps to understand what I mean.

--

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



[issue4470] smtplib SMTP_SSL not working.

2011-06-17 Thread Torsten Bronger

Torsten Bronger  added the comment:

Sorry, it must be:

import smtplib

s = smtplib.SMTP_SSL("relay-auth.rwth-aachen.de")
s.login("***", "***")
s.sendmail("bron...@physik.rwth-aachen.de", ["bronger.ran...@googlemail.com"], 
"Hello")

(A bracket was missing.)

--

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



[issue4470] smtplib SMTP_SSL not working.

2011-06-17 Thread Torsten Bronger

Torsten Bronger  added the comment:

My Python version is "Python 2.7.1+" and the package is called "python2.7 
2.7.1-5ubuntu2" (Ubuntu Natty).

--

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



[issue1596321] KeyError at exit after 'import threading' in other thread

2010-03-29 Thread Torsten Bronger

Changes by Torsten Bronger :


--
nosy: +bronger

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



[issue992389] attribute error after non-from import

2008-04-10 Thread Torsten Bronger

Torsten Bronger <[EMAIL PROTECTED]> added the comment:

I have a very similar issue (maybe the same?) at the moment.

Assume the follwing package structure:

main.py
package/
__init__.py   [empty]
moduleX.py
moduleY.py

main.py says:

from package import moduleX

moduleX.py says:

from . import moduleY

and moduleY.py says:

from . import moduleX

However, this doesn't work:

[EMAIL PROTECTED]:~/temp/packages-test$ python main.py
Traceback (most recent call last):
  File "main.py", line 1, in 
from package import moduleX
  File "/home/bronger/temp/packages-test/package/moduleX.py", line
1, in 
from . import moduleY
  File "/home/bronger/temp/packages-test/package/moduleY.py", line
1, in 
from . import moduleX
ImportError: cannot import name moduleX

If I turn the relative imports to absolutes ones, it works.  But I'd
prefer the relative notation for intra-package imports.  That's their
purpose after all.

If you split a large module into chunks, cyclic imports are hardly
avoidable (and there's nothing bad about it; it worked fine before PEP 328).

Note that "import absolute.path.to.module as short" doesn't work either.
 So currently, in presence of cyclic imports in a package, the only
remedy is to use the full absolute paths everywhere in the source code,
which is really awkward in my opinion.

--
nosy: +bronger


Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue992389>

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



[issue992389] attribute error after non-from import

2008-04-13 Thread Torsten Bronger

Torsten Bronger <[EMAIL PROTECTED]> added the comment:

I dare to make a follow-up although I have no idea at all about the
internal processes in the Python interpreter.  But I've experimented
with circular imports a lot recently.  Just two points:

First, I think that circular imports don't necessarily exhibit a
sub-opimal programming style.  I had a large parser module which I just
wanted to split in order to get handy file sizes.  However, the parser
parses human documents, and layout element A defined in module A may
contain element B from module B and vice versa.  In a language with
declarations, you just include a big header file but in Python, you end
up with circular imports.  Or, you must stay with large files.

So, while I think that this clean error message Nick suggests is a good
provisional solution, it should not make the impression that the
circular import is a flaw by itself.

And secondly, the problem with modules that are not yet populated with
objects is how circular imports have worked in Python anyway.  You can
easily cope with it by not referencing the imported module's objects in
the top-level code of the importing module (but only in functions and
methods).


Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue992389>

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



[issue2504] Add gettext.pgettext() and variants support

2008-05-03 Thread Torsten Bronger

Changes by Torsten Bronger <[EMAIL PROTECTED]>:


--
nosy: +bronger

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



[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2009-01-21 Thread Torsten Bronger

Torsten Bronger  added the comment:

I ran into this problem today when writing python data structures into a
database.  Only ASCII is safe in this situation.  I understood the
Python docs that protocol 0 was ASCII-only.

I use pickle+base64 now, however, this makes debugging more difficult.

Anyway, I think that the docs should clearly say that protocol 8 is not
ASCII-only because this is important in the Python world.  For example,
I saw this issue because Django makes an implicit unicode() conversion
with my input which fails with non-ASCII.

--
nosy: +bronger

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



[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2009-01-21 Thread Torsten Bronger

Torsten Bronger  added the comment:

"protocol 8" --> "protocol 0" of course.

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



[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2009-01-21 Thread Torsten Bronger

Torsten Bronger  added the comment:

Well, Django doesn't story binary data at all but wants you to store
image files etc in the file system.  Whether this was a good design
decision, is beyond the scope of this issue.  My points actually are
only these:

a) the docs strongly suggest that protocol 0 is ASCII-only and this
should be clarified (one sentence would be fully sufficient I think)

b) currently, there is no way in the standard lib to serialise data in a
debuggable, ASCII-only format

Probably b) is not important.  *I* want to have it currently but this
doesn't mean much.

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



[issue24132] Direct sub-classing of pathlib.Path

2018-01-30 Thread Torsten Bronger

Change by Torsten Bronger :


--
nosy: +bronger

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



[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2013-02-12 Thread Torsten Bronger

Changes by Torsten Bronger :


--
nosy: +bronger

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



[issue992389] attribute error after non-from import

2009-03-31 Thread Torsten Bronger

Torsten Bronger  added the comment:

Maybe it's better to leave it open, waiting for someone to pick it up,
even if this is some time in the future?

In my opinion, this is suprising behaviour without an actual rationale,
and a current implementation feature.  I'd be a pitty for me to see it
becoming an official part of the language.

What bothers me most is that

from . import moduleX

doesn't work but

import package.moduleX

does work.  So the circular import itself works without problems,
however, not with a handy identifier.  This is would be an odd
asymmetry, I think.

--

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



[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2009-04-22 Thread Torsten Bronger

Torsten Bronger  added the comment:

The "problem" is the pickle result.  It's not about debugging the
pickler itself.

--

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



[issue4470] smtplib SMTP_SSL not working.

2013-05-19 Thread Torsten Bronger

Torsten Bronger added the comment:

For five Ubuntu releases now, I apply this patch.  In contrast to Catalin's 
statement, it is not solved for me unless the upstream changes of two years ago 
haven't yet found their way into Ubuntu.  I'm currently using Python 2.7.4 on 
Ubuntu 13.04.  That said, the patch solves my issue every time.

--

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



[issue4470] smtplib SMTP_SSL not working.

2013-05-19 Thread Torsten Bronger

Torsten Bronger added the comment:

Sorry, after having had another look at it, I realised that I have a different 
SSMTP issue now, non-Python-related.  So for me, Ubuntu 13.04 indeed solves my 
old issue.

--

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



[issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc

2015-06-17 Thread Torsten Bronger

Changes by Torsten Bronger :


--
nosy: +bronger

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



[issue22570] Better stdlib support for Path objects

2015-10-17 Thread Torsten Bronger

Changes by Torsten Bronger :


--
nosy: +bronger

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



[issue22570] Better stdlib support for Path objects

2015-10-17 Thread Torsten Bronger

Torsten Bronger added the comment:

Please be conservative with adding methods to Path.

FWIW, my own experiences with pathlib have shown that utility methods have the 
disadvantage of duplicating well-established Python idioms.  This reduces code 
readability in my opinion.  While it is desirable that the rather inconvenient 
os.path may be superseded by pathlib in the long run,  utility methods like 
Path.glob, Path.open, Path.mkdir, and Path.readtext have convenient stdlib 
counterparts with long tradition, and using the methods seems disruptive and 
confusing to me.

This is a further argument for having a path protocol instead IMO.

--

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



[issue22005] datetime.__setstate__ fails decoding python2 pickle

2016-04-30 Thread Torsten Bronger

Changes by Torsten Bronger :


--
nosy: +bronger

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