[issue23103] ipaddress should be Flyweight
Serhiy Storchaka added the comment: Here is a patch which makes IPv4Address and IPv6Address more lightweight (for other classes the size is not so important). It makes _version the class attribute and adds __slots__. -- keywords: +patch resolution: wont fix - stage: - patch review status: closed - open versions: +Python 3.5 -Python 3.4 Added file: http://bugs.python.org/file37539/ipaddress_lightweight.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23108] pysha3 fails with obscure internal error
New submission from Lukas Barth: Hi! Since there is no separate bug tracker for pysha3 (and it is being discussed in some other bug on this tracker), I figured that this is the right place to file this bug. I hope I'm right. I'm trying to import pysha3, and it fails with the error undefined symbol: _PyUnicode_CheckConsistency (full backtrace here: http://pastebin.com/ueXDAwu6 ) I can't find anything useful about this error using Google etc. I'm using Python 3.3.5 on a current Gentoo Linux. I'm running in a virtualenv, so there should not be too much getting in the way. I basically have Django and pysha3 installed. Full output of 'pip freeze': http://pastebin.com/Z7DF96Z0 Full output of 'python -v': http://pastebin.com/1HeSJJ8p -- components: Extension Modules, Interpreter Core messages: 233075 nosy: tinLoaf priority: normal severity: normal status: open title: pysha3 fails with obscure internal error type: crash versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23108 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23109] French quotes in the documentation are often ungrammatical
New submission from Clément: From https://docs.python.org/3/howto/unicode.html: For a while people just wrote programs that didn’t display accents. In the mid-1980s an Apple II BASIC program written by a French speaker might have lines like these: PRINT FICHIER EST COMPLETE. PRINT CARACTERE NON ACCEPTE. Those messages should contain accents (completé, caractère, accepté), and they just look wrong to someone who can read French. One of the reasons the message looks wrong is that FICHIER EST COMPLETE in ungrammatical in French. Google has 16 hits for that query, half of which are from the Python documentation. The second one is better. I imagine the first one comes from the English FILE IS COMPLETE, but I'm not even sure what that meant, so it's hard to give a better translation :/ Instead, here are a few examples that could work: MISE A JOUR TERMINEE (Update completed − missing à and é in terminée) VEUILLEZ REDEMARRER (Please reboot − missing é in redémarrer) PARAMETRES ENREGISTRES (Settings saved − missing è in paramètre and é in enregistrés) Similarly, https://docs.python.org/3/library/email-examples.html#examples-using-the-provisional-api: msg['Subject'] = Ayons asperges pour le déjeuner I imagine this comes from the English Let's have asparagus for lunch!, but the translation reads Possess asparagus for lunch we. A proper idiomatic French version would be Ça te dirait de manger des asperges à midi? (Would you like to eat asparagus for lunch?) Again further on the same page: Cela ressemble à un excellent recipie[1] déjeuner. Could this mean This looks like a delicious lunch recipie? The typo in recipie would have prevented the machine translation from picking up recipie, which survived in the French version? This currently reads This look like recipie lunch a excellent. A proper French version (adjusted to have accents) might be J'ai trouvé une recette sympa: [1] (I found a nice recipe: [1]). Not sure why using French is needed though; English already has a few accented words: a message with subject Résumé attached, and body Here's my résumé would probably work just as well, and might not divert the reader's attention as much. Side note: in the example Pépé writes to Fabrette and Penelope. Aren't they the same character? Clément. -- assignee: docs@python components: Documentation messages: 233076 nosy: cpitcla, docs@python priority: normal severity: normal status: open title: French quotes in the documentation are often ungrammatical versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23109 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue433030] SRE: Atomic Grouping (?...) is not supported
Changes by irdb dalba.w...@gmail.com: -- nosy: +irdb ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue433030 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23109] French quotes in the documentation are often ungrammatical
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +haypo, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23109 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23108] pysha3 fails with obscure internal error
Benjamin Peterson added the comment: pysha3 has been compiled against a debug build of Python and you are running an non-debug one. -- nosy: +benjamin.peterson resolution: - third party status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23108 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23108] pysha3 fails with obscure internal error
Lukas Barth added the comment: D'Oh. Thanks for the hint. So, is it on purpose that there is some piece of software that's only working on debug builds installable via pip? There was no warning whatsoever when I installed pysha3 via pip.. -- resolution: third party - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23108 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23109] French quotes in the documentation are often ungrammatical
R. David Murray added the comment: Heh, I never claimed I understood French, but none of our French speakers decided to review my fake-french examples :) (I can't speak to the examples from the unicode howto.) -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23109 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23108] pysha3 fails with obscure internal error
R. David Murray added the comment: I doubt that it is on purpose, but it is not a CPython bug. You have one bug in pysha3 (a third party product) and one possible bug (I don't know enough to know if it is one) in pip, which has its own tracker (we track *ensurepip* bugs here, but not pip bugs). -- nosy: +r.david.murray resolution: - third party stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23108 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23110] Document if argument to Py_SetPath requires static storage.
New submission from Robert Snoeberger: The documentation for the Py_SetPath API does not indicate if the argument should point to a wide character array in static storage. However, the documentation for Py_GetPath says, The returned string points into static storage; the caller should not modify its value. This leads me to believe that static storage is required for Py_SetPath. The documentation for similar API functions, Py_SetPythonHome and Py_SetProgramName, indicates, The argument should point to a zero-terminated wide character string in static storage whose contents will not change -- assignee: docs@python components: Documentation messages: 233081 nosy: docs@python, snoeberger priority: normal severity: normal status: open title: Document if argument to Py_SetPath requires static storage. type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23110 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23110] Document if argument to Py_SetPath requires static storage.
Roundup Robot added the comment: New changeset 08972a47f710 by Benjamin Peterson in branch '3.4': doucment that Py_SetPath copies its argument (closes #23110) https://hg.python.org/cpython/rev/08972a47f710 New changeset edf4ea3cfe68 by Benjamin Peterson in branch 'default': merge 3.4 (#23110) https://hg.python.org/cpython/rev/edf4ea3cfe68 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23110 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19776] Provide expanduser() on Path objects
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23103] ipaddress should be Flyweight
Eric Snow added the comment: @sbromberger, there's no need for your own package. Just use something like this: _addr_cache = {} def ipaddr(addr): try: return _addr_cache[addr] except KeyError: _addr_cache[addr] = ipaddress.ipaddress(addr) return _addr_cache[addr] You could even throw weakrefs in there if your use case demanded it. -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23103] ipaddress should be Flyweight
Josh Rosenberg added the comment: Serhiy: I believe you need to add a bunch of __slots__ = () to various base classes in the module, even though they lack member variables. Every link in the inheritance chain must declare __slots__, or the child class will have __dict__ and __weakref__. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22269] Resolve distutils option conflicts with priorities
sorin added the comment: Can't we do something about this bug? I think that most python devs are ignoring the severity of this one, especially because it does break distribution of packages (or at least their testing) On OS X the experience is awful as --user doesn't work at all and as a maintainer of many python packages I end-up with a case where installing packages for the current user doesn't work. It works well on all other platforms but not on OS X (when you have the brew python). We cannot really expect all the package developers to spend a lot of time creating new scenarios only for trying to bypass this bug. For the sake of our Python users let's fix this and make the Python experience a good one, especially for people that do not have much experience with python. Maybe Santa will get my message ;) Wish you happy holidays! -- nosy: +sorin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22269 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header
Changes by Éric Araujo mer...@netwok.org: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23109] French quotes in the documentation are often ungrammatical
Roundup Robot added the comment: New changeset 55462210ba2d by Benjamin Peterson in branch '2.7': improve incorrect French (#23109) https://hg.python.org/cpython/rev/55462210ba2d New changeset 2c87dd2d821e by Benjamin Peterson in branch '3.4': improve incorrect French (#23109) https://hg.python.org/cpython/rev/2c87dd2d821e New changeset c5603b77df68 by Benjamin Peterson in branch 'default': merge 3.4 (#23109) https://hg.python.org/cpython/rev/c5603b77df68 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23109 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23111] ftplib.FTP_TLS's default constructor does not work with TLSv1.1 or TLSv1.2
New submission from varde: When trying to connect to a server which only supports TLS version 1.1 or 1.2, the following error is raised: ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:598) For some reason, the SSL version is set to ssl.PROTOCOL_TLSv1 before initialisation and an SSL context is created in __init__, making any subsequent change to ssl_version useless. The only way to establish a successful connection is to pass a custom SSL context to the constructor. I think ssl_version should be settable at construction time before the context is created. I'm not sure exposing ssl_version is useful either, the documentation mentions it but it has no use after initialisation. The following lines should also be changed: if self.ssl_version == ssl.PROTOCOL_TLSv1: resp = self.voidcmd('AUTH TLS') -- components: Library (Lib) messages: 233087 nosy: varde priority: normal severity: normal status: open title: ftplib.FTP_TLS's default constructor does not work with TLSv1.1 or TLSv1.2 type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23111 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23109] French quotes in the documentation are often ungrammatical
Roundup Robot added the comment: New changeset 181dfe9288d4 by Benjamin Peterson in branch '3.4': update correct French examples (#23109) https://hg.python.org/cpython/rev/181dfe9288d4 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23109 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23040] Better documentation for the urlencode safe parameter
Roundup Robot added the comment: New changeset 126aff7c6a33 by R David Murray in branch '3.4': #23040: Clarify treatment of encoding and errors when component is bytes. https://hg.python.org/cpython/rev/126aff7c6a33 New changeset 367ba031a743 by R David Murray in branch 'default': Merge: #23040: Clarify treatment of encoding and errors when component is bytes. https://hg.python.org/cpython/rev/367ba031a743 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23040 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23040] Better documentation for the urlencode safe parameter
R. David Murray added the comment: Thanks, Wojtek. -- resolution: - fixed stage: - resolved status: open - closed versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23040 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22932] email.utils.formatdate uses unreliable time.timezone constant
R. David Murray added the comment: Is there any way to write a test for this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22932 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1703178] link_objects in setup.cfg crashes build
R. David Murray added the comment: This issue is marked for 2.7, 3.4, and 3.5, but the test runs only on 3.5. -- assignee: - eric.araujo nosy: +r.david.murray stage: commit review - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1703178 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22932] email.utils.formatdate uses unreliable time.timezone constant
Changes by Akira Li 4kir4...@gmail.com: -- nosy: +akira ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22932 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22673] document the special features (eg: fdclose=False) of the standard streams
Akira Li added the comment: Two minor details: 1. It is possible that `fileno(stdout) != 1` even in C [1]. I don't know what happens if the code from the answer is run on Windows. In principle, it may break eryksun's workaround. I don't know how likely it is in practice. 2. you can redirect at the file descriptor level in Python [2] using os.dup2(). I don't know whether the code in the answer works on Windows. [1] http://stackoverflow.com/questions/25516375/is-it-possible-that-filenostdout-1-on-a-posix-system [2] http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python/22434262#22434262 -- nosy: +akira ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22673 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com