[issue19257] Sub-optimal error message when importing a non-package
Éric Araujo added the comment: That makes a lot of sense. I guess this is Brett’s call. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19257 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20265] Bring Windows docs up to date
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file34386/windowsDoc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20265 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20265] Bring Windows docs up to date
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file34403/windowsDoc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20265 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k
Andreas Schwab added the comment: I have modified the patch to include a configure check to set HAVE_GCC_ASM_FOR_MC68881 and use that instead of __mc68000__. -- Added file: http://bugs.python.org/file34412/m68k-float-prec.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20904 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20922] Global variables
New submission from VIJAY KANSAL: Inside functions: 1. Python allows access to global variables. 2. Python allows creation of local variable with the same name as that of of some of the global variable. Keeping the above two statements in mind, I believe that Python must allow following sequential statements in a function: 1. Accessing global variable 2. Creating local variable with the same name as that of some of the global variable name. But, it seems that the above is not allowed. The below code has the following output: Printing: 12 Throwing Error: Traceback (most recent call last): File ./bug.py, line 14, in module func2() File ./bug.py, line 9, in func2 print 'Throwing Error: ', var UnboundLocalError: local variable 'var' referenced before assignment CODE: var = 12 def func1(): print 'Printing: ', var def func2(): print 'Throwing Error: ', var var = 10 print 'Unreachable Code: ', var func1() func2() -- messages: 213520 nosy: vijay_kansal priority: normal severity: normal status: open title: Global variables type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20922] Global variables and Local Variables with same name
Changes by VIJAY KANSAL vijaykans...@gmail.com: -- title: Global variables - Global variables and Local Variables with same name ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20922] Global variables and Local Variables with same name
Ezio Melotti added the comment: This is by design, see http://docs.python.org/3/faq/programming.html#why-am-i-getting-an-unboundlocalerror-when-the-variable-has-a-value -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20916] ssl.enum_certificates() will not return all certificates trusted by Windows
Martin v. Löwis added the comment: I notice that this issue doesn't contain actual problem statement; Adam only reported what he did and what happened, but not what should have happened instead. I personally don't think that the problem stated in the title (ssl.enum_certificates() will not return all certificates trusted by Windows) is a bug - this is correct behavior. It would be unreasonable to expect that enum_certificates() triggers a download of the entire MS root list, when Microsoft has established as a policy that download should be on demand, triggered by verification. What I would agree *is* a bug is that the certificate verification fails; it should trigger the root download, as is platform convention (hopefully then also conforming to the group policy setting where you can disable root certificate download). Please leave out unrelated bugs (e.g. a failure to fetch certain certificate attributes) from this bug report. Report them separately instead. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20916 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20905] Adapt heapq push/pop/replace to allow passing a comparator.
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20905 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20918] LogRecord.__init__ should handle exception if % operation fails
Vinay Sajip added the comment: Shouldn't any fix also be applied to 3.3? According to PEP 398, there will be a 3.3.6 release after 3.4 is released (around May 2014). -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20918] LogRecord.__init__ should handle exception if % operation fails
Vinay Sajip added the comment: I've looked into it further, and IMO this is not a bug. The rationale is this: when an exception is raised during logging, it is passed to a handleError method, see http://hg.python.org/cpython/file/67ada6ab7fe2/Lib/logging/__init__.py#l786 This swallows the exception if logging.raiseExceptions is false or if there is no sys.stderr, otherwise it just writes the original traceback to sys.stderr and ignores any I/O errors which result during that write. ISTM RDM's analysis is not quite right: logging doesn't try to re-print the arguments. The key indicator is the line Logged from file stdin, line 1 which appears in the traceback shown, indicating that there is no exception in the handleError method itself. The suggestion by the.mulhern is also based on an incorrect assumption: logging applies the formatting lazily (i.e. late, rather than early), so it would be premature to do anything in LogRecord.__init__. The exception-causing code is called after determining that the record must be processed, and a formatter is asked to format it. This is by design. Note that logging doesn't crash: if the script class Junk: def __repr__(self): raise AttributeError('junk') import logging; logging.warning('%r', Junk()) print('Done.') is run, it prints Traceback (most recent call last): File /home/vinay/projects/python/2.7/Lib/logging/__init__.py, line 851, in emit msg = self.format(record) File /home/vinay/projects/python/2.7/Lib/logging/__init__.py, line 724, in format return fmt.format(record) File /home/vinay/projects/python/2.7/Lib/logging/__init__.py, line 464, in format record.message = record.getMessage() File /home/vinay/projects/python/2.7/Lib/logging/__init__.py, line 328, in getMessage msg = msg % self.args File logtest3.py, line 3, in __repr__ raise AttributeError('junk') AttributeError: junk Logged from file logtest3.py, line 5 Done. That last Done. shows that logging keeps going: while it prints the exception traceback to sys.stderr (so it looks like it's failing) it is not actually failing, and the code after the logging call continues normally even if there is a formatting failure (or other exception during emission of a logging message). Closing as invalid, unless you come up with something else :-) -- assignee: - vinay.sajip resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17855] Implement introspection of logger hierarchy
Vinay Sajip added the comment: Taking Brandon's advice re. creating a separate API. However, note the reasons for not documenting all the attributes and hiding them behind functions: logging's design pre-dates properties (it's of Python 1.5.2 vintage) and implementation details should remain as hidden as they can be, given Python's essentially non-private nature (even though they are unlikely to change after all this time, you never know ...) -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17855 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19359] reversed() does not work with weakref.proxy of sequences
Raymond Hettinger added the comment: Thanks for looking at this. Putting in a special case for weak references isn't the way to go. The problem is that _PyObject_LookupSpecial isn't working well with weakref proxies. A solution for reversed() could be to replace ``PyObject_GetAttrString(seq, __reversed__)`` with the slower call to ``_PyObject_LookupSpecial(seq, __reversed__, reversed_cache);``. The unfortunate downside is that this would slow down the common cases. Another solution is to patch _PyObject_LookupSpecial to make it smarter with respect to weakref objects or possibly use a fallback to PyObject_GetAttrString when a method isn't found using the speedy lookup. The advantage of fixing _PyObject_LookupSpecial is that it fixes all uses of _PyObject_LookupSpecial not just reversed(). Also, it would keep the current speed benefit for the common case. I'm reassigning to Benjamin because it was his optimized that broke the ability to find the __reversed__ method on a proxy object. Another issue that needs to be looked at is whether PySequence_Check() needs to be made aware of weakref proxies. -- assignee: rhettinger - benjamin.peterson nosy: +benjamin.peterson, haypo priority: low - normal stage: - needs patch type: enhancement - behavior versions: +Python 2.7, Python 3.4 Added file: http://bugs.python.org/file34413/reversed_list_proxy_test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19359 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20785] Missing symbols in Python27.lib (Windows 64bit)
Victor Lazzarini added the comment: That did the trick! Apparently we can't link to MSVC dlls http://sourceforge.net/apps/trac/mingw-w64/wiki/Answer%2064%20bit%20MSVC-generated%20x64%20.lib Creating a *.a fixes it. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20785 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19359] reversed() does not work with weakref.proxy of sequences
Antoine Pitrou added the comment: I suppose Benjamin's commit is afd62eb1692e. Claudiu, that doesn't look like the best approach to me. Instead of hardcoding a weakref.proxy check in reversed(), why not implement __reversed__ on weakref.proxy? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19359 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19359] reversed() does not work with weakref.proxy of sequences
Antoine Pitrou added the comment: It would also perhaps be practical to have some kind of proxy mixin that everyone can re-use to avoid having to reimplement __special__ methods by hand. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19359 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19359] reversed() does not work with weakref.proxy of sequences
Antoine Pitrou added the comment: Another possible idea is to introduce a proxy protocol (__proxy__ / tp_proxy) that would be used as a fallback by PyObject_LookupSpecial to fetch the lookup target, i.e.: def PyObject_LookupSpecial(obj, name): tp = type(obj) try: return getattr(tp, name) except AttributeError: return getattr(tp.tp_proxy(), name) (not sure that makes sense, I haven't thought very hard about it) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19359 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k
Antoine Pitrou added the comment: I don't think fixing bugs on a specific architecture counts as a new feature. Does Python still officially support m68k? Certainly not. We haven't had any 68k buildbot in ages (not sure we ever had any, actually). Andreas, have you signed a contributor's agreement? You can do it online at http://www.python.org/psf/contrib/contrib-form/ -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20904 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20916] ssl.enum_certificates() will not return all certificates trusted by Windows
Antoine Pitrou added the comment: If this is a Microsoft decision, perhaps it should be documented, then. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20916 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17006] Warn users about hashing secrets?
Raymond Hettinger added the comment: If something gets added, please follow the dev-guide and word it affirmatively (here the recommended practices) instead of continuing to fill the docs with warnings and danger signs. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17006 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17006] Add advice on best practices for hashing secrets
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- title: Warn users about hashing secrets? - Add advice on best practices for hashing secrets ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17006 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6766] Cannot modify dictionaries inside dictionaries using Managers from multiprocessing
Richard Fothergill added the comment: I'm getting these results on both: Python 3.2.3 (default, Apr 10 2013, 06:11:55) [GCC 4.6.3] on linux2 and Python 2.7.3 (default, Apr 10 2013, 06:20:15) [GCC 4.6.3] on linux2 The symptoms are exactly as Terrence described. Nesting proxied containers is supposed to be a supported use case! From the documentation: http://docs.python.org/2/library/multiprocessing.html#proxy-objects a = manager.list() b = manager.list() a.append(b) # referent of a now contains referent of b print a, b [[]] [] b.append('hello') print a, b [['hello']] ['hello'] The documented code works as expected, but: a[0].append('world') # Appends to b? print a, b [['hello']] ['hello'] I've attached my reproduction as a script. -- nosy: +Richard.Fothergill versions: +Python 3.2 Added file: http://bugs.python.org/file34414/nesting.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6766 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20913] Standard Library documentation needs SSL security best practices doc.
Antoine Pitrou added the comment: It is true that, while the ssl docs have (I think) an appropriate discussion of security considerations, higher-level APIs (i.e. applicative protocols) don't provide any recommendations. I don't know where we should put them. The recommendations will be similar for most protocols, so it sounds wrong to paste them in every module doc. Perhaps there should be a FAQ entry or a HOWTO? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20913 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19257] Sub-optimal error message when importing a non-package
Antoine Pitrou added the comment: If you only had the latter exception all you would know is Python doesn't consider datetime a package but you wouldn't know why that is unless you knew the exact definition (the __path__ attribute exists). Having the former exception helps make that a bit more obvious if you didn't already know it. I don't think someone who doesn't know about __path__ would be very enlightened by the error message. Also, I don't think error messages have a role in teaching about the implementation details of features, so I'd vote for removing the __context__ here. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19257 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20913] Standard Library documentation needs SSL security best practices doc.
Christian Heimes added the comment: http://docs.python.org/3.4/library/ssl.html#ssl-security doesn't mention http://docs.python.org/3.4/library/ssl.html#ssl.create_default_context and http://docs.python.org/3.4/library/ssl.html#ssl.SSLContext.check_hostname . I planed to write a paragraph about context but my personal life got into my way (new job, relocation, new apartment). Can somebody please write a few sentences that explain that: * no stdlib module verifies SSL cert chain and hostname (except for asyncio) * developers must pass a correctly configured context to stdlib modules to get validation and hostname matching * ssl.create_default_context() returns a context with sensible default settings *and* pre-loaded root CA certs on most systems. Example: import ssl, smtplib smtp = smtplib.SMTP(mail.python.org, port=587) context = ssl.create_default_context() smtp.starttls(context=context) (220, b'2.0.0 Ready to start TLS') Example with missing root CA: smtp = smtplib.SMTP(mail.python.org, port=587) context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) context.verify_mode = ssl.CERT_REQUIRED smtp.starttls(context=context) Traceback (most recent call last): ... ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20913 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20913] Standard Library documentation needs SSL security best practices doc.
Antoine Pitrou added the comment: Here is a patch adding the requested information to the ssl docs. It doesn't touch the pages for higher-level modules, I'll let someone else decide how to do that. -- keywords: +patch Added file: http://bugs.python.org/file34415/ssl_best_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20913 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20918] Logging of logging exceptions can fail in 3.4 if args are unprintable
R. David Murray added the comment: Yes on 3.3 fixes, but you are right that it doesn't need fixed there. This appears to be a 3.4 regression. I used exactly the test you suggest to reproduce it on 3.4...there there is a chained traceback and Done does not get printed. So, the original report is indeed invalid, but we've uncovered a regression. Fortunately it is a low impact regression. I'm guessing this arises from the improvements you made to the fallback logging of these errors. -- keywords: +3.4regression resolution: invalid - status: closed - open title: LogRecord.__init__ should handle exception if % operation fails - Logging of logging exceptions can fail in 3.4 if args are unprintable versions: -Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k
Larry Hastings added the comment: I'm happy to accept the change for 3.4.1, but I'm not going to cherry-pick a fix for an unsupported platform after rc3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20904 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17006] Add advice on best practices for hashing secrets
R. David Murray added the comment: Good point. There is an existing warning for hash weaknesses...the whole thing could be rephrased as Please see the security considerations section for important information on the considerations involved in using the various hashing algorithms, and notes on best practices for message and password hashing. The whole thing could then be turned into a note...except that there is a reason that it is a warning, because some of the hashes have known weaknesses yet still must be used for certain things. So probably it should stay a warning in this particular case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17006 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19257] Sub-optimal error message when importing a non-package
R. David Murray added the comment: Antoine: down that path lies Microsoft's An error has occurred error messages. The point of the extra information is not to inform the end user, it is to make it possible for an expert to solve the problem, and for it to be findable in a web search. Now, whether or not there are enough different things that the second error could be chained off of to make that worthwhile in this case is something Brett or Eric will have to answer. My guess is that there *potentially* are, even though this one is the most common, but that's just a guess since I haven't studied importlib. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19257 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20918] Logging of logging exceptions can fail in 3.4 if args are unprintable
the mulhern added the comment: Yes, I really misinterpreted what I saw. So glad it's a bug anyway and I'm not just wasting your time ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19257] Sub-optimal error message when importing a non-package
Antoine Pitrou added the comment: Antoine: down that path lies Microsoft's An error has occurred error messages. The point of the extra information is not to inform the end user, it is to make it possible for an expert to solve the problem, and for it to be findable in a web search. I don't know how that's related. Here the error is trying to import from a package while the module isn't a package. The solution is either to change the import to something else, or to turn the non-package into a package. None of these involve doing anything explicitly with __path__, so the original error is a distraction. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19257 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17006] Add advice on best practices for hashing secrets
Raymond Hettinger added the comment: So probably it should stay a warning in this particular case. Please don't. Python's docs have become cluttered with warning and danger signs. This stands in marked contrast with the docs for other languages which are much cleaner. Our docs have also started to become preachy, telling people how we think they should write programs rather than documenting what the language does. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17006 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20920] Turtle module transparency.
R. David Murray added the comment: From a little researching it isn't clear whether it is just tkinter that doesn't support alpha, or if TK itself has issues...but I'm hoping it is just the former (I found discussions of alpha for images, and it sounds like the Tk canvas supports displaying such images, but I couldn't find anything definitive about non-image support for alpha values). If Tk doesn't have full support, you'd have to take a step farther back and get the needed RGBA support into TK itself. Using a graphics package other than TK is a non-starter for the standard library. So, assuming TK supports it, this is two feature requests: tkinter alpha channel support, and Turtle RGBA support. As a feature request it can only go into 3.5. The tkinter piece should be split out into another issue, with this one depending on it. There are some people interested in improving tkinter (mostly in the IDLE context currently), but unless you can submit patches yourself probably the best hope for this is for it to get picked up in the GSOC or OPW context as a student project. -- components: +Library (Lib) -Extension Modules nosy: +r.david.murray type: behavior - enhancement versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20921] DeprecationWarning: The Windows bytes API has been deprecated, use Unicode filenames instead st = os.stat(path)
R. David Murray added the comment: Can you clarify what it is you are reporting as a bug, please? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17006] Add advice on best practices for hashing secrets
R. David Murray added the comment: Raymond: I'm not talking about *adding* a warning. Is it your opinion that the existing warning should be removed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17006 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20918] Logging of logging exceptions can fail in 3.4 if args are unprintable
Roundup Robot added the comment: New changeset 73c2a70e4b35 by Vinay Sajip in branch 'default': Closes #20918: Added handling for exceptions during fallback output of logging exceptions. http://hg.python.org/cpython/rev/73c2a70e4b35 -- nosy: +python-dev resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze
Roundup Robot added the comment: New changeset b626f4978a28 by Brett Cannon in branch 'default': Issue #20884: whatsnew: Frozen modules don't set __file__ anymore. http://hg.python.org/cpython/rev/b626f4978a28 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20884 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze
Brett Cannon added the comment: Step 1 was just checked in. Step 2: Jurko can you see if the uploaded patch fixes things for you? -- assignee: - brett.cannon keywords: +patch Added file: http://bugs.python.org/file34416/frozen_file.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20884 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20918] Logging of logging exceptions can fail in 3.4 if args are unprintable
Vinay Sajip added the comment: This fix doesn't seem to meet the criteria for cherry-picking for 3.4 - Only important interface changes, new features, or bugfixes should be checked in now - so I haven't created a separate cherry-pick issue for it. But I will add larry to nosy in case he thinks I should do so for 73c2a70e4b35. -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20918] Logging of logging exceptions can fail in 3.4 if args are unprintable
R. David Murray added the comment: At this point only things that would make it a brown bag release (broken out of the box) would get cherry picked. I agree that this doesn't qualify...having repr raise is a pretty unusual occurrence. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20923] ConfigParser should be greedy when parsing section name
New submission from Miloš Komarčević: It would be good if ConfigParser supported angled brackets in section names by being greedy when parsing. For example, section: [Test[2]_foo] gets parsed as: Test[2 -- messages: 213554 nosy: miloskomarcevic priority: normal severity: normal status: open title: ConfigParser should be greedy when parsing section name type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20923 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20924] openssl init 100% CPU utilization
New submission from bob bob: We have written a server on Python 2.7.6 that uses openssl 0.9.8y running on Windows box. Time to time our server freezes utilizing 100% CPU on ssl_init (C routine). The following is the process stack: 0021ee80 10036d19 0176d259 0013 msvcr90+0x3b35d 0021ee9c 10022a22 0021ef1c 0176d218 1001bf62 _ssl!init_ssl+0x33b59 0021ef74 10073920 0176a158 0177ba18 00952a78 _ssl!init_ssl+0x1f862 0021ef84 10001714 0176a158 0147b350 _ssl!init_ssl+0x70760 0021ef88 0176a158 0147b350 00952a78 _ssl+0x1714 0021ef8c 0147b350 00952a78 0x176a158 0021ef90 00952a78 100d3038 0x147b350 This problem occurs when client connects to our server using slow modem channel. In this case client sends duplicated SYN TCP packet. When second SYN packet arrives to the server after SYN_ACK server's packet we have a trouble. Like this trace from server side: 140 38.80741 172.16.35.6 192.168.52.1 TCP 74 44697 20444 [SYN] Seq=0 Win=14600 Len=0 MSS=1314 SACK_PERM=1 TSval=495224007 TSecr=0 WS=16 141 38.807428000 192.168.52.1 172.16.35.6 TCP 78 20444 44697 [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1460 WS=1 TSval=0 TSecr=0 SACK_PERM=1 148 39.288557000 172.16.35.6 192.168.52.1 TCP 74 44697 20444 [SYN] Seq=0 Win=14600 Len=0 MSS=1314 SACK_PERM=1 TSval=495224257 TSecr=0 WS=16 -- components: Library (Lib), Windows messages: 213555 nosy: bob.bob priority: normal severity: normal status: open title: openssl init 100% CPU utilization type: resource usage versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20923] ConfigParser should be greedy when parsing section name
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20923 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze
Jurko Gospodnetić added the comment: Step 2: Jurko can you see if the uploaded patch fixes things for you? Yup. That's exactly how we were working around the issue before reporting it here. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20884 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20910] Make sleep configurable in tests
Zachary Ware added the comment: Victor Stinner wrote: Is it a virtual machine or a physical machine? Was your Windows busy? Did you run tests in parallel? Physical, not really other than the tests, and I ran with -j0 (on a machine with 2 single core CPUs). I'm not sure what I think of the TEST_SLEEP/TEST_SHORT_SLEEP scheme, but I do like the idea behind support.check_time_delta. I've come up with a couple of alternative ideas (which may or may not actually be worth anything :) in the same vein as the TEST_SLEEP constants: 1) define a support.sleep function that multiplies the value given by some definable constant (default of 1) before passing the value to time.sleep. 2) define a support.sleep_until function, which would sleep for a given interval repeatedly until some condition is satisfied or a timeout is reached. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20910 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20913] Standard Library documentation needs SSL security best practices doc.
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20913 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17006] Add advice on best practices for hashing secrets
Christian Heimes added the comment: Raymond makes a good point. We mustn't clutter the docs with warnings. People are going to skip warning boxes if they occur too often. The documentation of the hashlib module contains three note boxes and one warning box. That's far too many. The first note box could be moved to see also. The other two note could be removed and their content added to the documentation of update(). The warning box should follow the example of the ssl module and all further security considerations should be moved into a new section. The Python stdlib documentation is the wrong place to teach users about crypto and security stuff. But in my opinion good documentation should point out that something is dangerous or may lure a user into false sense of security. Perhaps I should start a howto with common security-related issues in Python software for 3.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17006 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20925] Update TLS version connection table
New submission from Christian Heimes: The table at http://docs.python.org/3.4/library/ssl.html#ssl.wrap_socket doesn't contain information for TLS 1.1 and 1.2. I've attached a script that tests connection between all supported SSL protocol versions. (Note: my OpenSSL doesn't support SSLv2). server client can connect = = === SSLv23 SSLv23 True SSLv23 SSLv3 True SSLv23 TLSv1 True SSLv23 TLSv1_1True SSLv23 TLSv1_2True SSLv3 SSLv23 True SSLv3 SSLv3 True SSLv3 TLSv1 False SSLv3 TLSv1_1False SSLv3 TLSv1_2False TLSv1 SSLv23 True TLSv1 SSLv3 False TLSv1 TLSv1 True TLSv1 TLSv1_1False TLSv1 TLSv1_2False TLSv1_1SSLv23 True TLSv1_1SSLv3 False TLSv1_1TLSv1 False TLSv1_1TLSv1_1True TLSv1_1TLSv1_2False TLSv1_2SSLv23 False TLSv1_2SSLv3 False TLSv1_2TLSv1 False TLSv1_2TLSv1_1False TLSv1_2TLSv1_2True -- assignee: docs@python components: Documentation files: ssltest.py messages: 213559 nosy: christian.heimes, docs@python priority: normal severity: normal stage: needs patch status: open title: Update TLS version connection table type: enhancement versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file34417/ssltest.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20925 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20925] Update TLS version connection table
STINNER Victor added the comment: The table at http://docs.python.org/3.4/library/ssl.html#ssl.wrap_socket doesn't contain information for TLS 1.1 and 1.2. Ah? I see TLSv1 TLSv1.1 TLSv1.2 columns and rows. What is missing? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20925 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20910] Make sleep configurable in tests
STINNER Victor added the comment: Victor Stinner wrote: Is it a virtual machine or a physical machine? Was your Windows busy? Did you run tests in parallel? Physical, not really other than the tests, and I ran with -j0 (on a machine with 2 single core CPUs). Ah yes, I missed the -j0. I didn't try with -j0. Some tests should be fixed to support shorter sleep, or default sleep should be increased. I'm not sure what I think of the TEST_SLEEP/TEST_SHORT_SLEEP scheme, but I do like the idea behind support.check_time_delta. If we cannot agree on the whole patch, I will split it in two parts: check_time_delta() and TEST_SLEEP/TEST_SHORT_SLEEP. 1) define a support.sleep function that multiplies the value given by some definable constant (default of 1) before passing the value to time.sleep. Oh, I like this idea. It's closer to what is done currently. 2) define a support.sleep_until function, which would sleep for a given interval repeatedly until some condition is satisfied or a timeout is reached. I'm not sure that such helper will provide useful debug info if the test fails. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20910 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19359] reversed() does not work with weakref.proxy of sequences
Benjamin Peterson added the comment: afd62eb1692e wasn't a matter of speed, but a matter of correctness. Special methods should be looked up on the type on the instance as was done before. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19359 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17006] Add advice on best practices for hashing secrets
A.M. Kuchling added the comment: +1 to reducing the number of notes, and to a security HOWTO. (Christian: if you need writing help, please let me know; I'd be happy to help.) -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17006 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20879] base64 module of Python 3.4 uses 920 kB of memory
STINNER Victor added the comment: urlparse_lazy_init.patch looks good, but you should add a comment explaining your change. See my review: http://bugs.python.org/review/20879/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20925] Update TLS version connection table
Christian Heimes added the comment: D'oh. I guess I looked at the http://docs.python.org/3/ docs which still forward to 3.3 and then posted the link to 3.4 ... :| -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20925 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20879] base64 module of Python 3.4 uses 920 kB of memory
STINNER Victor added the comment: I combined the two patches and I tried to address all comments: base64_urlparse_lazy_init-2.patch. -- Added file: http://bugs.python.org/file34418/base64_urlparse_lazy_init-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20926] Enhance Quick Start portion of instructions for Windows
New submission from Kathleen Weaver: Current text reads: On Windows, open the solution file PCbuild\pcbuild.sln in Visual Studio, select Debug, and Build ‣ Build Solution. Run Tools\buildbot\external.bat or Tools\buildbot\external-amd64.bat to download and compile 3rd party libraries. While it works correctly, this does generate errors in the build process which can be confusing. This is documented in the read me, and the Getting Started. I believe it should be mentioned here in the quick start -- components: Devguide messages: 213567 nosy: ezio.melotti, kathweaver priority: normal severity: normal status: open title: Enhance Quick Start portion of instructions for Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20926] Enhance Quick Start portion of instructions for Windows
Kathleen Weaver added the comment: Added sentence to indicate errors are thrown but it still works. -- keywords: +patch Added file: http://bugs.python.org/file34419/kweaver.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20926] Debguide: Enhance Quick Start portion of instructions for Windows
Changes by Martin v. Löwis mar...@v.loewis.de: -- title: Enhance Quick Start portion of instructions for Windows - Debguide: Enhance Quick Start portion of instructions for Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20926] Devguide: Enhance Quick Start portion of instructions for Windows
Changes by Martin v. Löwis mar...@v.loewis.de: -- title: Debguide: Enhance Quick Start portion of instructions for Windows - Devguide: Enhance Quick Start portion of instructions for Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError
Changes by Sreepriya Chalakkal sreepriya1...@gmail.com: Added file: http://bugs.python.org/file34420/doc18566.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18566 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20879] base64 module of Python 3.4 uses 920 kB of memory
STINNER Victor added the comment: Serhiy wrote on Rietveld: As far as this constant is repeated twice, it wastes memory and errorprone. Oh, I expected marshal to be smart and use references, but it does not. Here is a simpler patch which initialize all base85 tables at once using a b85alphabet variable which simplify also the initialization of the decoder table. -- Added file: http://bugs.python.org/file34421/base64_urlparse_lazy_init-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20927] Different behaviour on Posix and Windows when using subprocess.Popen(..., cwd=path)
New submission from Jovik: This works on Linux as expected: import subprocess proc = subprocess.Popen([./app], stdout=subprocess.PIPE, cwd=workspace) but on Windows I get: FileNotFoundError: [WinError 2] The system cannot find the file specified To successfully execute it on Windows I need to set shell=True first: proc = subprocess.Popen([app.exe], stdout=subprocess.PIPE, cwd=workspace, shell=True) which is odd since by default it should use cwd when searching for binary: If cwd is not None, the function changes the working directory to cwd before executing the child. In particular, the function looks for executable (or for the first item in args) relative to cwd if the executable path is a relative path. from http://docs.python.org/3.3/library/subprocess.html -- assignee: docs@python components: Documentation messages: 213570 nosy: Jovik, docs@python priority: normal severity: normal status: open title: Different behaviour on Posix and Windows when using subprocess.Popen(..., cwd=path) type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20927 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20927] Different behaviour on Posix and Windows when using subprocess.Popen(..., cwd=path)
R. David Murray added the comment: Your cwd is relative. What happens if you make it absolute? (What I'm thinking is that the non-shell starting cwd may be different on windows than it is on unix...but I don't know windows very well, so this may be irrelevant...) -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20927 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20692] Tutorial section 9.4 and FAQ: how to call a method on an int
Antoine Pitrou added the comment: I am not a native English speaker, but Sreepriya's latest patch looks ok to me (I am not sure the link from classes.rst is useful, though). Sreepriya, have you already signed the contributor's agreement? Otherwise, you can sign it online at http://www.python.org/psf/contrib/contrib-form/ -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20692 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20924] openssl init 100% CPU utilization
Antoine Pitrou added the comment: Have you tried reporting this to the OpenSSL project? This doesn't sound like a bug in Python. Also, 0.9.8y is the current latest version in the 0.9.8 line, and we are unlikely to switch the 2.7 Windows builds to OpenSSL 1.x, I think (but ultimately that's Martin call). -- nosy: +loewis, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20879] base64 module of Python 3.4 uses 920 kB of memory
STINNER Victor added the comment: Sorry, it took me many tries to write the perfect patch :-) The current code has artificial dependencies between variables and has references to variables when they are not needed in fact. base64_urlparse_lazy_init-4.patch should be even simpler. -- Added file: http://bugs.python.org/file34422/base64_urlparse_lazy_init-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20924] openssl init 100% CPU utilization
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17006] Add advice on best practices for hashing secrets
Antoine Pitrou added the comment: Note boxes have nothing to do with warnings, we should discuss them separately if needed. (I see nothing wrong with multiple notes, given that a note is generally something ancillary and optional) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17006 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20879] base64 module of Python 3.4 uses 920 kB of memory
Serhiy Storchaka added the comment: I don't like base64_urlparse_lazy_init-3.patch at all. It waste memory and time for initializing of non-needed tables in case when only encoding or only decoding is used. Here is new patch based on base64_urlparse_lazy_init-2.patch. Unlike to my patch, it delays initialization of small tables too. Unlike to Victor's patches it initializes only needed tables and delays initialization of b32 tables. -- Added file: http://bugs.python.org/file34423/base64_urlparse_lazy_init-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20926] Devguide: Enhance Quick Start portion of instructions for Windows
Antoine Pitrou added the comment: Thanks for the patch! You will also have to sign a contributor's agreement at http://www.python.org/psf/contrib/contrib-form/ A nit: there's a dedicated note markup tag that you can use: http://docutils.sourceforge.net/docs/ref/rst/directives.html#specific-admonitions. When you say Visual Studio will throw errors, does it occur in all cases, or in specific circumstances? (e.g. Visual Studio will throw errors if some optional third-party libraries are missing) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20879] base64 module of Python 3.4 uses 920 kB of memory
Serhiy Storchaka added the comment: Well, our patches are almost same so your patch LGTM (and it has more comments). But note that my initialization of _b32tab2 is a little faster (bytes() is called 32 times instead of 1024). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20924] openssl init 100% CPU utilization
Martin v. Löwis added the comment: Antoine: init_ssl would be the entry function of _ssl.c, not code from OpenSSL. bob: It's doubtful though that the stack trace is right, since init_ssl doesn't call itself. Did you install the Python PDB files for 2.7.6 before obtaining this stack trace? There are two things you could try to diagnose this further 1. Capture the complete packets using tcpdump or wireshark, for use by tcpreplay. Then see whether a replay will reliably trigger this problem, and allow for others to diagnose this further - upload a Python script and the wireshark dump here. 2. (Alternatively) Debug this yourself. Build Python in debug mode, see whether the problem still reproduces, then find out the life lock in the Visual Studio debugger. Please also report the Windows version you are using. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20927] Different behaviour on Posix and Windows when using subprocess.Popen(..., cwd=path)
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20927 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20785] Missing symbols in Python27.lib (Windows 64bit)
Martin v. Löwis added the comment: If somebody would contribute a patch for msi.py that builds the file, and instructs me what tools I need installed, I'd be willing to include this in future releases (also for 2.7). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20785 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20867] fix_import in 2to3 adds spurious relative import (windows)
Éric Araujo added the comment: Hello, thanks for the report. Is this the same issue as #19510? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20867 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20785] Missing symbols in Python27.lib (Windows 64bit)
Victor Lazzarini added the comment: I don't know how to patch the installer, but here are the commands for someone who does. You need gendef and dlltool, which should come with the standard mingw64 installation. From python27.dll: $ gendef python27.dll $ dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libpython27.a --input-def python27.def -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20785 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20913] Standard Library documentation needs SSL security best practices doc.
Martin v. Löwis added the comment: I'd add a sentence to this paragraph If a client certificate is needed for the connection, it can be added with context.load_cert_chain(path_to_certificate, path_to_private_key) Then, in all places where a context and cert/key parameters are allowed (e.g. SMTP_SSL and starttls()), I'd remove the sentence saying that context is an alternative way to provide a private key, and say instead See link to best defaults for configuring parameters of the TLS connection, such as validation of the server certificate, using the context parameter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20913 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20692] Tutorial section 9.4 and FAQ: how to call a method on an int
R. David Murray added the comment: I might tweak a couple words for flow, but it looks good. I do wonder about the repetition of the bit about parenthesis or whitespace that now exists. I wonder if the first occurrence of it should now be dropped. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20692 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20692] Tutorial and FAQ: how to call a method on an int
Terry J. Reedy added the comment: I agree with Antoine about the particular cross-link and would drop that one. Is there somewhere earlier in the tutorial that discusses .attribute access? That would be the place to mention the ints and dotted names. Rather than a link, I would just mention that ints need to be separated from the period. I also agree with David. Here is a condensed answer that I think says just what is needed. --- This is because the Python parser sees an integer literal followed by a period as a float literal and a float literal followed by a name, ``5. __class__``, is a syntax error. To look up an attribute on an integer literal, separate the integer from the period with either a space or parentheses. 5 .__class__ class 'int' (5).__class__ type 'int' -- stage: needs patch - patch review title: Tutorial section 9.4 and FAQ: how to call a method on an int - Tutorial and FAQ: how to call a method on an int ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20692 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1704474] optparse tests fail under Jython
Changes by Nilovna Bascunan-Vasquez cont...@nilovna.com: -- nosy: +nilovna ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1704474 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10367] python setup.py sdist upload --show-response can fail with UnboundLocalError: local variable 'result' referenced before assignment
Changes by Nilovna Bascunan-Vasquez cont...@nilovna.com: -- nosy: +nilovna ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10367 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20867] fix_import in 2to3 adds spurious relative import (windows)
Claudio Canepa added the comment: No. #19510 is about 2 to 3 confused when the same import line has some modules that should be 'relativized' and others that not. The present issue is about 2to3 incorrectly 'relativize' a module / package by forgetting that module names are case-sensitive but filenames are case-insensitive in windows. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20867 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19510] lib2to3.fixes.fix_import gets confused if implicit relative imports and absolute imports are on the same line
Éric Araujo added the comment: To be fair to 2to3, that line disrespects some Python best practices (use explicit relative imports (2.5+), put one import per line, group imports by stdlib/non-stdlib). It’s still a bug though :) -- nosy: +benjamin.peterson, eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19510 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9364] some problems with the documentation of pydoc
Changes by Nilovna Bascunan-Vasquez cont...@nilovna.com: -- nosy: +nilovna ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9364 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11122] bdist_rpm should use rpmbuild, not rpm
Peter Eisentraut added the comment: No, the second use should not be converted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11122 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20928] xml.etree.ElementInclude does not include nested xincludes
New submission from James Bailey: After xml.etree.ElementInclude.include inserts an Xinclude'd href it does not walk the just-inserted subtree to see if it contains any Xincludes itself. I think the behaviour should be modified to walk the included subtree and perform any Xincludes contained. -- components: Library (Lib), XML messages: 213589 nosy: James.Bailey priority: normal severity: normal status: open title: xml.etree.ElementInclude does not include nested xincludes type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20928 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20866] segfailt with os.popen and SIGPIPE
Terry J. Reedy added the comment: Your example is ambiguous at to which of two pipings causes the problem. First you cat a large file into the script, which reads it in its entirety with data = sys.stdin.read(). If that causes the segfault, they everything that follows is irrelevant. If that works and it is the second piping out that is the problem, then the rigamarole with creating an external file and piping it in irrelevant. data = '0123456789' * 1 would be sufficient. In 2.6/7, os.popen is deprecated in favor of using subprocess. In 3.x, popen was, I have been told, re-written to use subprocess. So if popen is the problem here, then the fix is to use subprocess explicitly in 2.7. -- nosy: +terry.reedy stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20866 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20692] Tutorial and FAQ: how to call a method on an int
Sreepriya Chalakkal added the comment: In tutorials, under section 3.1.1 - Numbers, it is mentioned about the type of integers. And also a statement as we will see more about numeric types later in the tutorial. May be we can mention about type class there. But it might be too early to mention about classes under Numbers for a learner. Otherwise, I also agree that the cross link is not very essential and could be dropped. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20692 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20895] Add bytes.empty_buffer and deprecate bytes(17) for the same purpose
Josh Rosenberg added the comment: I would think the argument for deprecation is that usually, people type bytes(7) or bytes(somesmallintvalue) expecting to create a length one bytes object using that value (happens by accident if you iterate a bytes object and forget it's an iterable of ints, not an iterable of len 1 bytes). It's really easy to forget to make it bytes([7]) or bytes((7,)) or what have you. If you make the same mistake with str, list, tuple, etc., you get an error, because they only accept iterables. But bytes silently behaves in a way that is inconsistent with the other sequence types. Given that b'\0' * 7 is usually faster in any event (by avoiding lookup costs to find the bytes constructor) and more intuitive to people familiar with the Python sequence idiom, I could definitely see this as a redundancy that does nothing but confuse. -- nosy: +josh.rosenberg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20927] Different behaviour on Posix and Windows when using subprocess.Popen(..., cwd=path)
Jovik added the comment: I did a test with cwd being set to full path, but the result was the same (still had to use shell=True to execute a command). Let me know if I can provide any more details. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20927 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20853] pdb args crashes when an arg is not printable
Jurjen N.E. Bos added the comment: Maybe we could use Pdb._getval_except(arg, frame=None) in the routine do_args. If I understand the code, do_args does quite some work to get the value of name in the context of the current frame, maybe just calling self._getval_except(name, frame=self.curframe) plus or minus some code would do the job? I guess the code would actually become shorter... I'll try to figure it out. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20926] Devguide: Enhance Quick Start portion of instructions for Windows
Kathleen Weaver added the comment: I like the mark up but I don't think this warrants quite that much attention. I changed the wording to may throw errors -- Added file: http://bugs.python.org/file34424/kweaver.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20926] Devguide: Enhance Quick Start portion of instructions for Windows
Changes by Kathleen Weaver kathl...@kweaver.org: Removed file: http://bugs.python.org/file34419/kweaver.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20895] Add bytes.empty_buffer and deprecate bytes(17) for the same purpose
Terry J. Reedy added the comment: I agree with Serhiy that the method is not needed in any case. I was about to post the same missing rationale: people misunderstand 'bytes(7)' and write it expecting to get bytes([7]) == b(\x07'), so it would be better to make bytes(7) raise instead of silently accepting a buggy usage. I was thinking that one rationale for bytes(n) might be that it is faster than b'\0' * n. Since Josh claimed the contrary, I tried to test with timeit.repeat (both console and Idle) and got this error message TypeError: source code string cannot contain null bytes Both eval and compile emit this message. So it seems that one justification for bytes(n) is to avoid putting null bytes in source strings. I think this issue should be closed. Deprecation ideas should really be posted of python-ideas and ultimately pydev for discussion and approval. If Ethan wants to pursue the idea, he should research the design discussions for bytes() (probably on the py3k list) and whether Guido directly approved of bytes(n) or if someone else 'snuck' it in after the initial approval. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20895] Add bytes.empty_buffer and deprecate bytes(17) for the same purpose
Josh Rosenberg added the comment: Terry: You forgot to use a raw string for your timeit.repeat check, which is why it blew up. It was evaluating the \0 when you defined the statement string itself, not the contents. If you use r'b\0 * 7' it works just fine by deferring backslash escape processing until the string is actually eval-ed, rather than when you create the string. For example, on my (admittedly underpowered) laptop (Win7 x64, Py 3.3.0 64-bit): min(timeit.repeat(r'b\0 * 7')) 0.07514287752866267 min(timeit.repeat(r'bytes(7)')) 0.7210309422814021 min(timeit.repeat(r'b\0 * 7000')) 0.8994351749659302 min(timeit.repeat(r'bytes(7000)')) 2.06750710129117 For a short bytes, the difference is enormous (as I suspected, the lookup of bytes dominates the runtime). For much longer bytes, it's still winning by a lot, because the cost of having the short literal first, then multiplying it, is still trivial next to the lookup cost. P.S. I made a mistake: str does accept an int argument (obviously), but it has completely different meaning. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20895] Add bytes.empty_buffer and deprecate bytes(17) for the same purpose
Ethan Furman added the comment: I'm inclined to leave it open while I do the suggested research. Thanks for the tips, Terry, and the numbers, Josh. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20895 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20928] xml.etree.ElementInclude does not include nested xincludes
Changes by Ned Deily n...@acm.org: -- nosy: +eli.bendersky, scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20928 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1034] [patch] Add 2to3 support for displaying warnings as Python comments
Éric Araujo added the comment: (2to3 is an exception and can get improvements in stable versions.) -- nosy: +eric.araujo versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1034 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20897] @abstractmethod does not enforce method signatures
Terry J. Reedy added the comment: Unless the behavior contradicts the docs, it is not a bug. If the looser behavior in 3.x is intentional, a request to reverse direction will likely be rejected. Like many enhancement requests, I think this would better be discussed on python-ideas first, along with asking if the 2.x to 3.x change is intentional. -- nosy: +terry.reedy stage: - needs patch type: behavior - enhancement versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20897 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com