[issue4766] email documentation needs to be precise about strings/bytes

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : Documentation for the email package needs to be more clear about the usage of strings and bytes. In particular: 1. All operations that parse email messages such as message_from_file() or message_from_string() operate on *text*, not binary data. So

[issue4767] email.mime incorrectly documented (or implemented)

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : The documentation describes classes such as email.mime.MIMEText() email.mime.MIMEMultipart() email.mime.MIMEApplication() etc... However, it's confusing because none of these classes are actually found in email.mime. Suggest either using the full p

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : The email.generator.Generator class does not work correctly message objects created with binary data (MIMEImage, MIMEAudio, MIMEApplication, etc.). For example: >>> from email.mime.image import MIMEImage >>> data = open("IMG.

[issue4769] b64decode should accept strings or bytes

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : The whole point of base64 encoding is to safely encode binary data into text characters. Thus, the base64.b64decode() function should equally accept text strings or binary strings as input. For example, there is a reasonable expectation that something

[issue4769] b64decode should accept strings or bytes

2008-12-29 Thread David M. Beazley
David M. Beazley added the comment: Note: This problem applies to all of the other decoders/encoders in the base64 too (b16, b32, etc.) ___ Python tracker <http://bugs.python.org/issue4

[issue4770] binascii module, crazy error messages, unexpected behavior

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : See Issue 4869 for a related bug. Most of the functions in binascii are meant to go from binary data to textual representations (hex digits, base64, binhex, etc.). There are numerous problems: 1. Misleading error messages. For example

[issue4770] binascii module, crazy error messages, unexpected behavior

2008-12-29 Thread David M. Beazley
David M. Beazley added the comment: Given the low-level nature of this module, I can understand the motivation to make it all bytes. However, I'm going to respectfully disagree with that and claim that making binascii all bytes really goes against the whole spirit of what Python 3.

[issue4771] Bad examples in hashlib documentation

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : The hashlib documentation has incorrect examples showing the use of the hexdigest() method: >>> hashlib.sha224(b"Nobody inspects the spammish repetition").hexdigest() b'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2&#

[issue4771] Bad examples in hashlib documentation

2008-12-29 Thread David M. Beazley
David M. Beazley added the comment: The digest() method of hashes does produce bytes (correct). The hexdigest() method produces a string, but it is also shown as producing bytes in the examples. ___ Python tracker <http://bugs.python.org/issue4

[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley : A file-like object u returned by the urlopen() function in both Python 2.6/3.0 has a method info() that returns a 'HTTPMessage' object. For example: ::: Python 2.6 >>> from urllib2 import urlopen >>> u = urlopen("ht

[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0

2008-12-29 Thread David M. Beazley
David M. Beazley added the comment: Verified that 2to3 does not fix this. ___ Python tracker <http://bugs.python.org/issue4773> ___ ___ Python-bugs-list mailing list Unsub

[issue4782] json documentation missing load(), loads()

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley : Documentation for the json module in Python 2.6 and Python 3.0 doesn't have any description for load() or loads() even though both functions are used in the examples. -- assignee: georg.brandl components: Documentation messages: 78542

[issue4783] json documentation needs a BAWM (Big A** Warning Message)

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley : The json module is described as having an interface similar to pickle: json.dump() json.dumps() json.load() json.loads() I think it would be a WISE idea to add a huge warning message to the documentation that these functions should *NOT

[issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley : The strict parameter to JSONDecoder() is undocumented and is confusing because someone might assume it has something to do with the encoding parameter or the general handling of parsing errors (which it doesn't). As far as I can determine by readin

[issue4769] b64decode should accept strings or bytes

2008-12-30 Thread David M. Beazley
David M. Beazley added the comment: One more followup. The quopri module (which is highly related to base64 in that quopri and base64 are often used together within MIME) does accept both unicode and byte strings when decoding. For example, this works: >>> quopri.decodestri

[issue4783] json documentation needs a BAWM (Big A** Warning Message)

2008-12-30 Thread David M. Beazley
David M. Beazley added the comment: Just consider me to be an impartial outside reviewer. Hypothetically, let's say I'm a Python programmer who knows a thing or two about standard library modules (like pickle), but I'm new to JSON so I come looking at the json module docum

[issue4783] json documentation needs a BAWM (Big A** Warning Message)

2008-12-30 Thread David M. Beazley
David M. Beazley added the comment: Thanks! Hopefully I'm not giving you too much work to do :-). Cheers, Dave ___ Python tracker <http://bugs.python.org/i

[issue4786] xml.etree.ElementTree module name in Python 3

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley : Not a bug, but a question to developers: Is xml.etree.ElementTree going to be the only standard library module in Python 3.0 that doesn't follow the standard Python 3.0 module naming conventions? (e.g., socketserver, configparser, etc.). Are ther

[issue4820] ctypes.util.find_library incorrectly documented

2009-01-03 Thread David M. Beazley
New submission from David M. Beazley : In the "ctypes reference / Finding shared libraries" section of the ctypes documentation, the find_library() function is described as being located in ctypes.util. However, it's formal description right below that lists it as ctyp

[issue4831] exec() behavior - revisited

2009-01-04 Thread David M. Beazley
David M. Beazley added the comment: One further followup just to make sure I'm clear. Is it always safe to pass the result of locals() into exec and extract the result as shown in my example? Since I'm writing about this in a book, I just want to make absolutely certain I k

[issue4831] exec() behavior - revisited

2009-01-04 Thread David M. Beazley
New submission from David M. Beazley : Please forgive me, but I'm really trying to wrap my brain around the behavior of exec() in Python 3. Here's a quote from the documentation: "In all cases, if the optional parts are omitted, the code is executed in the current s

[issue4903] binascii.crc32()

2009-01-09 Thread David M. Beazley
New submission from David M. Beazley : The result of binascii.crc32() is different on the same input in Python 2.6/3.0. For example: Python 2.6: >>> binascii.crc32('Hello') -137262718 Python 3.0: >>> binascii.crc32(b'Hello') 4157704578 -- com

[issue4903] binascii.crc32()

2009-01-09 Thread David M. Beazley
David M. Beazley added the comment: Can someone PLEASE make sure this gets documented someplace. ___ Python tracker <http://bugs.python.org/issue4903> ___ ___ Python-bug

[issue4903] binascii.crc32()

2009-01-10 Thread David M. Beazley
David M. Beazley added the comment: Placing a note in the standard library documentation would be a start. Just say in Python 3.0 it always returns the result as an unsigned integer whereas in Python 2.6 a 32-bit signed integer is returned. Although the numerical value may differ between

[issue4471] IMAP4 missing support for starttls

2009-02-02 Thread Lorenzo M. Catucci
Lorenzo M. Catucci added the comment: I just found out that the gmail servers don't support connections on the standard pop3/imapv4 ports, but only on the SSL wrapped ones. I'm unsure if cmu.edu anonymous imap server admin's would be happy with their server becoming python'

[issue4471] IMAP4 missing support for starttls

2009-02-02 Thread Lorenzo M. Catucci
Lorenzo M. Catucci added the comment: Thanks for following-up, Bill. While I fully understand the need for unit-testing, I don't have the guts to start writing a dummy imap server from scratch. I tested my changes on a couple of servers I manage, one running uw-imapd and the other ru

[issue4471] IMAP4 missing support for starttls

2009-02-06 Thread Lorenzo M. Catucci
Lorenzo M. Catucci added the comment: As the tests are new, I hope sending the real file is the right way to proceed. Added file: http://bugs.python.org/file12963/test_imapnet.py ___ Python tracker <http://bugs.python.org/issue4

[issue4470] smtplib SMTP_SSL not working.

2009-02-06 Thread Lorenzo M. Catucci
Changes by Lorenzo M. Catucci : Added file: http://bugs.python.org/file12964/test_smtpnet.py ___ Python tracker <http://bugs.python.org/issue4470> ___ ___ Python-bug

[issue4473] POP3 missing support for starttls

2009-02-06 Thread Lorenzo M. Catucci
Changes by Lorenzo M. Catucci : Added file: http://bugs.python.org/file12965/test_popnet.py ___ Python tracker <http://bugs.python.org/issue4473> ___ ___ Python-bug

[issue4473] POP3 missing support for starttls

2009-02-06 Thread Lorenzo M. Catucci
Changes by Lorenzo M. Catucci : -- components: +Library (Lib) ___ Python tracker <http://bugs.python.org/issue4473> ___ ___ Python-bugs-list mailing list Unsub

[issue4473] POP3 missing support for starttls

2009-02-06 Thread Lorenzo M. Catucci
Lorenzo M. Catucci added the comment: There is a problem I forgot to state with test_anonlogin: since I try and test both SSL and starttls, the DoS checker at cmu kicks in and refuse the login attempt in PopSSLTest. Since I'd rather avoid cheating, I'm leaning to try logging in as Som

[issue4473] POP3 missing support for starttls

2009-02-06 Thread Lorenzo M. Catucci
Lorenzo M. Catucci added the comment: I'm enclosing the expected-failure version of test_popnet. It's much simpler to talk and comment about something you can see! Added file: http://bugs.python.org/file12966/test_popnet.py ___ Python trac

[issue38060] precedence (relational, logical operator)not working with single value

2019-09-08 Thread Sangeeta M Chauhan
New submission from Sangeeta M Chauhan : precendence betweeen relational and logical operators not working properly if expression contains single values instead of sub expressions. . Please see attached file -- components: Interpreter Core files: pythonBug.py messages: 351344 nosy

[issue38060] precedence (relational, logical operator)not working with single value

2019-09-08 Thread Sangeeta M Chauhan
Sangeeta M Chauhan added the comment: i am not satisfied ..with your answer . as in the following expression 9 or 7 > "str" precedence must be given to relational operator . why is is executing logical operator first?? if we write 4>9 or 7> "str&quo

[issue38060] precedence (relational, logical operator)not working with single value

2019-09-10 Thread Sangeeta M Chauhan
Sangeeta M Chauhan added the comment: Sir, I was expecting that the precedence should be given to relational operator ( 7>"str") and according to that instead of printing 9 it should give error. On Mon, Sep 9, 2019 at 8:38 PM Tim Peters wrote: > > Tim Peters

[issue32996] Improve What's New in 3.7

2019-10-08 Thread M. Eric Irrgang
Change by M. Eric Irrgang : -- pull_requests: +16231 pull_request: https://github.com/python/cpython/pull/16648 ___ Python tracker <https://bugs.python.org/issue32

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 10:17, STINNER Victor wrote: > > New submission from STINNER Victor : > > I propose to add two new functions: > > * locale.get_locale_encoding(): it's exactly the same than > locale.getpreferredencoding(False). > > * locale.get_current_locale_encoding(): always get the current lo

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 11:36, STINNER Victor wrote: > > STINNER Victor added the comment: > >> locale.getencoding() >> >> which interfaces to nl_langinfo(CODESET) or the Windows code >> page and does not try to do any magic, ie. does *not* call >> setlocale(). It needs to return what the lib C currently

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 12:05, STINNER Victor wrote: > I'm not sure what to do with locale.getdefaultlocale(). Should we deprecate > it? I never used this function. How is it used? For which purpose? > > I undertand that in 2000, locale.getdefaultlocale() was interesting to avoid > calling setlocale(LC_CTY

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 12:26, STINNER Victor wrote: > > STINNER Victor added the comment: > > Recently, I spent some days to document properly encodings used by Python. Thanks for documenting this. I would prefer to leave the locale module to really just an interface to the lib C locale logic and not a

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 12:35, Eryk Sun wrote: > > Eryk Sun added the comment: > >> Read the ANSI code page on Windows, > > I don't see why the Windows implementation is inconsistent with POSIX here. > If it were changed to be consistent, the default encoding at startup would > remain the same, since s

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 14:47, STINNER Victor wrote: > > STINNER Victor added the comment: > >> - If you add "current", people will rightly ask: then what do all the >> other APIs in the locale module return ? Of course, they all return >> the current state of settings :-) So this is unnecessary as well.

Re: [issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread M.-A. Lemburg
On 19.03.2021 14:57, Inada Naoki wrote: > > Background: PEP 597 adds new `encoding="locale"`option to open() and > TextIOWrapper(). It is same to `encoding=None` for now, but it means using > "locale encoding" explicitly. > > But this is wrong in UTF-8 mode. Please address UTF-8 mode explicitl

Re: [issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-31 Thread M.-A. Lemburg
On 31.03.2021 11:30, STINNER Victor wrote: > > To me, it sounds really weird to accept an encoding when a file is opened in > binary mode. open(filename, "rb", encoding="locale") looks like a bug. Same here. If encoding is used as an argument and then not used, this is a bug, not a feature :-)

Re: [issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread M.-A. Lemburg
On 04.05.2021 22:07, Steve Dower wrote: > > Perhaps what I'm suggesting here is that I don't see any reason for "sudo pip > install ..." into a distro-installed Python to ever need to work, and would > be quite happy for it to just fail miserably every time (which is already the > case for the

[issue44639] [sqlite3] Confusing typo "transation"

2021-07-14 Thread John M. Boger
New submission from John M. Boger : In the documentation for sqlite3.executescript() in python 3.9+, the pseudoword "transation" appears. I am reasonably sure "transaction" is meant, although it could be "translation". -- assignee: docs@python comp

[issue34990] year 2038 problem in compileall.py

2020-01-19 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: ping. Another 19th of January passed. I'd still like to see progress on this, because this hinders my other y2038 bug discovery work. -- versions: +Python 3.5, Python 3.8, Python 3.9 ___ Python tr

[issue39560] PyUnicode_FromKindAndData kind transformation is not documented

2020-02-05 Thread Santiago M. Mola
New submission from Santiago M. Mola : PyUnicode_FromKindAndData copies input data and transforms it to the most compact representation. This behavior is not documented. Proposed wording: > The input buffer is copied and transformed into the canonical representation, > if necessar

[issue35083] Fix documentation for __instancecheck__

2020-12-15 Thread M. Eric Irrgang
Change by M. Eric Irrgang : -- nosy: +eirrgang ___ Python tracker <https://bugs.python.org/issue35083> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35083] Fix documentation for __instancecheck__

2020-12-15 Thread M. Eric Irrgang
M. Eric Irrgang added the comment: The optimization appears to have been made without this level of discussion. The change to PEP 3119 was likely overlooked. The intended PEP 3119 behavior seems clear and reasonable. r61575 was a small part of the SVN merge that became git commit

[issue35083] Fix documentation for __instancecheck__

2020-12-15 Thread M. Eric Irrgang
M. Eric Irrgang added the comment: Actually, it looks like performance concerns were raised as issues [2303](https://bugs.python.org/issue2303) and [2534](https://bugs.python.org/issue2534). For #2534, the issue was different. For issue #2303, behavior-changing optimization was proposed

Re: [issue42967] Web cache poisoning - `;` as a query args separator

2021-01-20 Thread M.-A. Lemburg
On 20.01.2021 12:07, STINNER Victor wrote: > Maybe we should even go further in Python 3.10 and only split at "&" by > default, but let the caller to opt-in for ";" separator as well. +1. Personally, I've never seen URLs encoded with ";" as query parameter separator in practice on the server sid

Re: [issue43115] locale.getlocale fails if locale is set

2021-02-17 Thread M.-A. Lemburg
On 17.02.2021 10:55, Anders Munch wrote: import locale locale.setlocale(locale.LC_ALL, 'en_DE') > 'en_DE' locale.getlocale() > Traceback (most recent call last): > File "", line 1, in > File "C:\flonidan\env\Python38-64\lib\locale.py", line 591, in getlocale > return _parse_

Re: [issue43115] locale.getlocale fails if locale is set

2021-02-18 Thread M.-A. Lemburg
On 17.02.2021 15:02, Anders Munch wrote: >> BTW: What is wxWidgets doing with the returned values ? > > wxWidgets doesn't call getlocale, it's a C++ library (wrapped by wxPython) > that uses C setlocale. > > What does use getlocale is time.strptime and datetime.datetime.strptime, so > when getl

[issue41666] Problem in tutorial/introduction.html#strings

2020-08-30 Thread M-o-T
New submission from M-o-T : Hi, I found a problem with this address https://docs.python.org/3/tutorial/introduction.html#strings In here >>> word[0:2] # characters from position 0 (included) to 2 (excluded) 'Py' >>> word[2:5] # characters from position 2 (include

[issue41666] Problem in tutorial/introduction.html#strings

2020-08-30 Thread M-o-T
Change by M-o-T : -- nosy: -mohammadtavakoli1378 ___ Python tracker <https://bugs.python.org/issue41666> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41666] fix

2020-08-30 Thread M-o-T
Change by M-o-T : -- title: Problem in tutorial/introduction.html#strings -> fix ___ Python tracker <https://bugs.python.org/issue41666> ___ ___ Python-

[issue41740] string concatenation via `sum`

2020-09-07 Thread Phillip M. Feldman
New submission from Phillip M. Feldman : I'm not sure whether this is a bug or a feature request, but it seems as though the following should produce the same result: In [1]: 'a' + 'b' + 'c' Out[1]: 'abc' In [2]: sum(('a', 'b',

[issue41740] Improve error message for string concatenation via `sum`

2020-09-07 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: I'd forgotten about ''.join; this is a good solution. I withdraw my comment. On Mon, Sep 7, 2020 at 3:25 PM Steven D'Aprano wrote: > > Steven D'Aprano added the comment: > > Marco, sum should be as fast as pos

Re: [issue41842] Add codecs.unregister() to unregister a codec search function

2020-09-23 Thread M.-A. Lemburg
On 23.09.2020 14:56, STINNER Victor wrote: > Marc-Andre Lemburg explained: > > "There is no API to unregister a codec search function, since deregistration > would break the codec cache used by the registry to speedup codec > lookup." > > One simple solution would be to clear the cache > (PyInte

Re: [issue41842] Add codecs.unregister() to unregister a codec search function

2020-09-23 Thread M.-A. Lemburg
Just found an internal API which already takes care of unregistering a search function: _PyCodec_Forget(). All that needs to be done is to expose this as codecs.unregister() and add the clearing of the lookup cache. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the

[issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes

2020-09-28 Thread Ian M. Hoffman
New submission from Ian M. Hoffman : A description of the problem, complete example code for reproducing it, and a work-around are available on SO at the link: https://stackoverflow.com/questions/64083376/python-memory-corruption-after-successful-return-from-a-ctypes-foreign-function In

[issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes

2020-09-29 Thread Ian M. Hoffman
Ian M. Hoffman added the comment: You are correct. After further review, I found an older ctypes issue #12836 which was then enshrined in a workaround in the numpy.ndarray.ctypes interface to vanilla ctypes. https://numpy.org/doc/stable/reference/generated/numpy.ndarray.ctypes.html Numpy

[issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes

2020-09-30 Thread Ian M. Hoffman
Ian M. Hoffman added the comment: I agree with you. When I wrote "desired behavior" I intended it to mean "my selfishly desired outcome of not loading my struct with a dangling pointer." This issue seems to have descended into workarounds that treat the symptoms; I&#x

[issue41978] numpy, scipy packages failed to install via pip - Windows 10 Pro 64 bit

2020-10-08 Thread Thomas M. Alldread
New submission from Thomas M. Alldread : Several attempts to install numpy/scipy packages failed. Pip reported pages of error information. Reverting back to version 3.8.5 resolved the issue using the exact same procedure. -- components: Extension Modules, Installation, Windows

[issue42173] Drop Solaris support

2020-10-29 Thread Joshua M. Clulow
Joshua M. Clulow added the comment: Hi! I'm a member of the illumos core team, and I'm also pretty keen for us to keep Python support! Some of our core OS build and packaging tooling is written in Python, and certainly applications like Synapse (Matrix) and Review Board are im

Re: [issue28468] Add platform.freedesktop_os_release()

2020-11-25 Thread M.-A. Lemburg
On 25.11.2020 11:13, STINNER Victor wrote: > Platform was always a thin wrapper to OS functions. For example, there is no > unified API to retrieve OS name and version on Windows, macOS or Linux. You > need to pick the proper function. For me, freedesktop_os_release() just > follows this trend.

[issue19820] docs are missing info about module attributes

2019-07-14 Thread M. Anil Tuncel
M. Anil Tuncel added the comment: Are they still missing? inspect.ismodule() seems to be there at least. https://docs.python.org/3/library/inspect.html -- nosy: +anilbey ___ Python tracker <https://bugs.python.org/issue19

[issue7940] re.finditer and re.findall should support negative end positions

2019-07-15 Thread M. Anil Tuncel
M. Anil Tuncel added the comment: I guess the use of negative indices serve the same purpose here as in lists or strings. Though as Ezio pointed out, the current behaviour is already accepting negative indices but providing inconsistent results in comparison to various other Python modules

[issue30693] tarfile add uses random order

2017-06-17 Thread Bernhard M. Wiedemann
New submission from Bernhard M. Wiedemann: Filesystems do not give any guarantees about ordering of files returned in directory listings, thus tarfile.add adds files in random order, when using os.listdir in recursion. See also https://reproducible-builds.org/docs/stable-inputs/ on that topic

[issue30693] tarfile add uses random order

2017-06-17 Thread Bernhard M. Wiedemann
Changes by Bernhard M. Wiedemann : -- pull_requests: +2313 ___ Python tracker <http://bugs.python.org/issue30693> ___ ___ Python-bugs-list mailing list Unsub

[issue30693] tarfile add uses random order

2017-06-19 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: note: recent GNU tar versions (1.28?) added an option --sort=name and the overhead of sorting (e.g. I measured 4ms for 1 files) is negligible compared to the other processing done on the files here

Re: [issue31530] [2.7] Python 2.7 readahead feature of file objects is not thread safe

2017-09-20 Thread M.-A. Lemburg
Why not simply document the fact that read ahead in Python 2.7 is not thread-safe and leave it at that ? .next() and .readline() already don't work well together, so this would just add one more case. -- Marc-Andre Lemburg eGenix.com ___ Python-bugs-l

[issue29708] support reproducible Python builds

2017-03-03 Thread Bernhard M. Wiedemann
New submission from Bernhard M. Wiedemann: See https://reproducible-builds.org/ and https://reproducible-builds.org/docs/buy-in/ for why this is a good thing to have in general. Fedora, openSUSE and possibly other Linux distributions package .pyc files as part of their binary rpm packages

[issue29708] support reproducible Python builds

2017-03-03 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: backports are optional. It can help reduce duplicated work for the various distributions. Currently, I think master and 2.7 are the most relevant targets. -- versions: +Python 3.7 ___ Python tracker <h

[issue30276] import hashlib makes many programs slow

2017-05-04 Thread Bernhard M. Wiedemann
New submission from Bernhard M. Wiedemann: Steps to Reproduce: echo import hashlib > test.py time python -m cProfile -s tottime test.py 2>&1 | head Actual Results: shows 27ms spent in hashlib.py The problem goes away when dropping everything after line 133 in hashlib.py see also i

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: traced it down a bit further. nearly all that time is spent in import _hashlib which probably means, it is spent in functions like PyInit__hashlib in Modules/_hashopenssl.c I can see in strace that after loading libssl, libcrypto and libz, it calls

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: I'm running openSUSE Tumbleweed with python-2.7.13 and python3-3.6.1 on an Intel Pentium N3530 with linux-4.10.12 There the total time of the "import _hashlib" oneliner varies between 100 and 250 ms (python3 is a bit slower and the machine

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: This might work in some places, but if you look at real-world users like urllib3/util/ssl_.py > from hashlib import md5, sha1, sha256 or twisted/words/protocols/jabber/xmlstream.py > from hashlib import sha1 It would probably not need any openssl

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: getting to a similar size on Debian, so I'll move this into the openSUSE bugtracker to find out why it is so slow there. -- resolution: -> third party stage: -> resolved status: open -> closed

[issue30276] import hashlib makes many programs slow

2017-05-12 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: Tracking this in https://bugzilla.opensuse.org/show_bug.cgi?id=1038906 now. It turned out to be a problem with (our?) openssl-1.0.2 which Debian stable does not have yet and Debian/9 (stretch) has openssl-1.1.0 without this problem The nicest python

[issue30461] glob returns results in undeterministic order

2017-05-24 Thread Bernhard M. Wiedemann
New submission from Bernhard M. Wiedemann: because POSIX readdir does not guarantee any order glob often gives unexpectedly random results. Some background: for openSUSE Linux we build packages in the Open Build Service (OBS) which tracks dependencies, so when e.g. a new glibc is submitted, all

[issue30461] glob returns results in undeterministic order

2017-05-24 Thread Bernhard M. Wiedemann
Changes by Bernhard M. Wiedemann : -- pull_requests: +1877 ___ Python tracker <http://bugs.python.org/issue30461> ___ ___ Python-bugs-list mailing list Unsub

[issue30461] glob returns results in undeterministic order

2017-06-04 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: >From my performance measurements, the overhead was negligible (not even >counting the processing done on files returned by glob). And also glob in C, bash, perl all do sort by default and these are generally pretty fast languages, yet they still

[issue36266] Which module could not be found?

2019-03-11 Thread Phillip M. Feldman
New submission from Phillip M. Feldman : I have a module that contains an import statement that imports a large number of items. This import was failing with the following error message: ImportError: DLL load failed: The specified module could not be found. The message would be so much more

[issue36266] Which module could not be found?

2019-03-13 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Hello Steve, I'm buying only 50 percent of this. The Python interpreter must know what module it was trying to import, and can at least be able to report that. Phillip On Tue, Mar 12, 2019 at 8:42 AM Steve Dower wrote: > > Steve Dower

[issue36266] Which module could not be found?

2019-03-13 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: 'Should include "_ssl" somewhere in the message?' Exactly so. If a given import statement imports 30 items, it would be helpful to know which one caused the hickup. Thanks! On Wed, Mar 13, 2019 at 12:28 PM Steve Dower wrote: &g

[issue34033] distutils is not reproducible

2019-03-15 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: unreproducible .pyc files are still one of the major headaches for my work on openSUSE reproducible builds. There is also one aspect where i586 builds end up with different .pyc files than x86_64 builds. And then we randomly chose one of them for our

[issue36302] distutils creates unreproducible .so files

2019-03-15 Thread Bernhard M. Wiedemann
New submission from Bernhard M. Wiedemann : While working on reproducible builds for openSUSE, I found countless python modules that come with binary .so files that did not build reproducibly from non-deterministic filesystem readdir order. One contributing factor is bpo-30461 that will not

[issue36302] distutils creates unreproducible .so files

2019-03-15 Thread Bernhard M. Wiedemann
Change by Bernhard M. Wiedemann : -- keywords: +patch pull_requests: +12308 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue29708] support reproducible Python builds

2018-01-15 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: I think, there is no single nice and clean solution with time-based .pyc files, but to get a whole distribution to build reproducibly, there are two other ways: 1) if the SOURCE_DATE_EPOCH environment variable is set, make hash-based .pyc files the

[issue29708] support reproducible Python builds

2018-01-16 Thread Bernhard M. Wiedemann
Change by Bernhard M. Wiedemann : -- keywords: +patch pull_requests: +5054 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue29708> ___ _

[issue29708] support reproducible Python builds

2018-01-31 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: Any chance we can get the (somewhat related) patch for https://bugs.python.org/issue30693 also merged? -- ___ Python tracker <https://bugs.python.org/issue29

[issue30693] tarfile add uses random order

2018-01-31 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: @Serhiy IMHO, just because we fix one problem, we do not have to fix all other problems at the same time. You can still open a pull-request for the others, but I know too little about those to test them. And having commits pending for 7 months is not

[issue30693] tarfile add uses random order

2018-02-05 Thread Bernhard M. Wiedemann
Change by Bernhard M. Wiedemann : -- keywords: +patch pull_requests: +5379 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue30693] tarfile add uses random order

2018-02-05 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: Serhiy, can you test https://github.com/python/cpython/pull/5557 -- ___ Python tracker <https://bugs.python.org/issue30

[issue32959] zipimport fails when the ZIP archive contains more than 65535 files

2018-02-26 Thread Mariano M. Chouza
New submission from Mariano M. Chouza : When trying to import a module from a ZIP archive containing more than 65535 files, the import process fails: $ python3 -VV Python 3.6.4 (default, Jan 6 2018, 11:49:38) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] $ cat create_zips.py

[issue32986] multiprocessing, default assumption of Pool size unhelpful

2018-03-02 Thread M J Harvey
New submission from M J Harvey : Hi, multiprocessing's default assumption about Pool size is os.cpu_count() ie all the cores visible to the OS. This is tremendously unhelpful when running multiprocessing code inside an HPC batch system (PBS Pro in my case), as there's no way to h

Re: [issue31744] Python 2.7.14 Fails to compile on CentOS/RHEL7

2017-10-10 Thread M.-A. Lemburg
I'm not sure whether this is related, but your quoting for --rpath doesn't appear to work: On 10.10.2017 14:17, Brian Sidebotham wrote: > LDFLAGS='-Wl,-rpath=$\\$$ORIGIN/../lib' \ > ... > gcc -pthread -Wl,-rpath=RIGIN/../lib -fprofile-generate -Xlinker > -export-dynamic -o python \ >

[issue24132] Direct sub-classing of pathlib.Path

2017-11-07 Thread Stephen M. Gava
Stephen M. Gava added the comment: Using a set of paths with special properties and formats in a project, thought "the cleanest oop way to do this is try out python's oop paths in pathlib". Subclassed Path to implement my extra (non platfor specific) properties and fell at t

<    1   2   3   4   5   >