[issue45902] Bytes and bytesarrays can be sorted with a much faster count sort.

2021-11-26 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue45902> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21761] [doc] language reference describes the role of module.__file__ inaccurately

2021-12-06 Thread Brett Cannon
Brett Cannon added the comment: > "Ultimately, the loader set the values of __file__ and/or __cached__" Change it to "sets" and +1 from me! -- ___ Python tracker <https://

[issue21762] update the import machinery to only use __spec__

2021-12-07 Thread Brett Cannon
Change by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <https://bugs.python.org/issue21762> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38773] Fatal Python error: Aborted

2019-11-12 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-12 Thread Brett Cannon
Brett Cannon added the comment: I would like to bring this issue back on topic as this about how to expose PEP 523 support in Python 3.8, not whether Fabio should be using a different approach when he has been something sanctioned in an accepted PEP and was previously doable that was

[issue26467] Add async magic method support to unittest.mock.Mock

2019-11-12 Thread Brett Cannon
Brett Cannon added the comment: Adding Lisa to potentially add the PR from Ilya. -- assignee: -> lisroach ___ Python tracker <https://bugs.python.org/issu

[issue38782] Convert importlib.abc to use typing.Protocol

2019-11-12 Thread Brett Cannon
New submission from Brett Cannon : Now that typing.Protocol exists we should convert the ABCs in importlib over to protocols as the import system functions off of structural typing and not nominal typing. -- components: Library (Lib) messages: 356501 nosy: brett.cannon priority: low

[issue38793] pathlib.Path.resolve(strict=False) strips final path components

2019-11-14 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue38793> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-15 Thread Brett Cannon
Brett Cannon added the comment: Just an FYI a raised exception isn't considered a crash. For us a crash is a C-level crash like a segfault. -- nosy: +brett.cannon type: crash -> behavior ___ Python tracker <https://bugs.python.org

[issue34572] C unpickling bypasses import thread safety

2019-11-15 Thread Brett Cannon
Brett Cannon added the comment: 3.6 and 3.5 are in security mode, so unless there's a security risk due to this bug the fix will not be backported to those older versions (https://devguide.python.org/#status-of-python-branches). -- ___ P

[issue38818] Modify PyInterpreterState.eval_frame to pass tstate (PyThreadState)

2019-11-18 Thread Brett Cannon
Brett Cannon added the comment: I think bpo-38500 needs to get resolved first before this as that will affect whether this is acceptable or not as an API-breaking change. -- ___ Python tracker <https://bugs.python.org/issue38

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-11-19 Thread Brett Cannon
Brett Cannon added the comment: I've assigned this to Joannah to decide if she wants to backport this. -- assignee: -> nanjekyejoannah nosy: +nanjekyejoannah ___ Python tracker <https://bugs.python.org

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-19 Thread Brett Cannon
Brett Cannon added the comment: I think the real question is whether this is part of the CPython public API or the CPython internal API. @Fabio how burdensome would it be if we placed this in the internal API that you can get access to but we don't make backwards-compatibility guara

[issue38839] Fix some unused functions in test suite

2019-11-19 Thread Brett Cannon
Change by Brett Cannon : -- title: Some unused functions in test suite -> Fix some unused functions in test suite ___ Python tracker <https://bugs.python.org/issu

[issue38839] Fix some unused functions in test suite

2019-11-19 Thread Brett Cannon
Brett Cannon added the comment: New changeset 892221bfa04a41cf581f988ba19dc263f557e157 by Brett Cannon (Adam Johnson) in branch 'master': bpo-38839: Fix some unused functions in tests (GH-17189) https://github.com/python/cpython/commit/892221bfa04a41cf581f988ba19dc2

[issue38839] Fix some unused functions in test suite

2019-11-19 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38839> ___

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-20 Thread Brett Cannon
Brett Cannon added the comment: OK, then my vote is to provide getter and setter methods that are underscore-prefixed to mark them as "internal" with clear comments specifying that they are part of PEP 523 and thus should not be needlessly broken in a bugf

[issue38765] `ast.AST._attributes` is used by `ast.dump()` but not documented

2019-11-20 Thread Brett Cannon
Brett Cannon added the comment: It's also possible the leading underscore was used to prevent name collisions. Unfortunately I don't know the history of _attributes, so without someone digging through the git history or personally knowing the reason behind it I don't know wh

[issue38021] pep425 tag for AIX is inadequate

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: I'm not in a good position to review distutils stuff. -- ___ Python tracker <https://bugs.python.org/issue38021> ___ ___

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: I can't reproduce in Python 3.8.0: >>> import os >>> class A(os.PathLike): pass ... >>> class B: ... def __fspath__(self): pass ... >>> issubclass(B, A) True Did you check against an older version of Python? -

[issue38885] Have os.PathLike inherit from typing.Protocol

2019-11-21 Thread Brett Cannon
New submission from Brett Cannon : Since os.PathLike explicitly defines a a protocol, it would make sense to have it inherit from typing.Protocol instead of abc.ABC. -- components: Library (Lib) messages: 357206 nosy: brett.cannon priority: normal severity: normal status: open title

[issue38885] Have os.PathLike inherit from typing.Protocol

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: Closing as importing 'typing' in 'os' is probably too much and would impact start-up time. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python trac

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: @Mark > PEP 523 makes no mention of adding a getter or setter. > Adding them is a big change to Python semantics and shouldn't, IMO, be done > without a PEP that explicit states they are going to be added. Adding getters or setters for some

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: Posted https://mail.python.org/archives/list/python-...@python.org/thread/4UZJYAZL3NHRAGN5WAMJC4IHAHEXF3QF/ to see if anyone else wants to weigh in. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38884] __import__ is not thread-safe on Python 3

2019-11-21 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker <https://bugs.python.org/issue38884> ___ ___ Python-bugs-list mailin

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: Ah, your `assert` call threw me since it does succeed so it isn't acting as a test case. -- resolution: not a bug -> status: closed -> open ___ Python tracker <https://bugs.python.

[issue38884] __import__ is not thread-safe on Python 3

2019-11-21 Thread Brett Cannon
Brett Cannon added the comment: Can you test this with a package that isn't tensorflow (e.g. something else in the stdlib or something created manually; basically a smaller reproducer)? It's hard to diagnose if this is really Python or not without a smaller reproducer as tensorflo

[issue38870] Expose ast.unparse in the ast module

2019-11-21 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue38870> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38883] Path.home() should ignore HOME env var like os.path.expanduser()

2019-11-21 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue38883> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-22 Thread Brett Cannon
Brett Cannon added the comment: @greg I hope this goes into 3.8.1 since it was a breaking change. @victor if we are going to ask folks to start using a setter and getter I say we might as well get it right the first time and start taking the tstate now

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-11-22 Thread Brett Cannon
Brett Cannon added the comment: I just realized one problem with this is it explicitly requires subclassing the ABC while os.PathLike is supposed to represent a protocol (before typing.Protocol was a thing). So why is it bad that in the example class B is considered a "subclas

[issue38899] Document that virtual environment activation for fish should use `source`

2019-11-22 Thread Brett Cannon
New submission from Brett Cannon : https://fishshell.com/docs/current/commands.html#source -- assignee: brett.cannon components: Documentation messages: 357346 nosy: brett.cannon priority: low severity: normal status: open title: Document that virtual environment activation for fish

[issue38899] Document that virtual environment activation for fish should use `source`

2019-11-22 Thread Brett Cannon
Change by Brett Cannon : -- keywords: +patch pull_requests: +16844 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17359 ___ Python tracker <https://bugs.python.org/issu

[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-11-22 Thread Brett Cannon
Brett Cannon added the comment: Is this best served in the stdlib or in an external tool like how virtualenvwrapper is separate from virtualenv? While I get the convenience of not having to install another tool to do this, it does bring in some complexity that does not directly tie into the

[issue38899] Document that virtual environment activation for fish should use `source`

2019-11-23 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38901] Add a CLI flag to venv to use the pwd basename as the prompt

2019-11-23 Thread Brett Cannon
New submission from Brett Cannon : I did a Twitter poll to see if there was consistent naming of the directory people created a virtual environment into when done locally to code (the answer is no). But a common theme was people not liking that the prompt defaults to the name of the

[issue38901] Add a CLI flag to venv to use the pwd basename as the prompt

2019-11-25 Thread Brett Cannon
Brett Cannon added the comment: @Vinay you got exactly what I mean. I had to actually teach a ton of people that shell trick with basename and pwd on Twitter, that trick doesn't seem to be something people know about, and yet a ton of people seem to be creating virtual environments

[issue21063] Touch up one-line descriptions of modules for module index

2019-11-25 Thread Brett Cannon
Brett Cannon added the comment: New changeset f8a6316778faff3991144c3aec4fa92d7b30a72b by Brett Cannon (Sanchit Khurana) in branch 'master': bpo-21063: Improve module synopsis for distutils (GH-17363) https://github.com/python/cpython/commit/f8a6316778faff3991144c3aec4fa9

[issue21063] Touch up one-line descriptions of modules for module index

2019-11-25 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38916] Remove array.fromstring

2019-11-26 Thread Brett Cannon
Brett Cannon added the comment: If it was documented as deprecated and raising a deprecation warning then 3.2 is definitely far enough back to warrant removing it. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38916] Remove array.fromstring

2019-11-26 Thread Brett Cannon
Brett Cannon added the comment: Although I will admit we have not had a discussion on python-dev about removing stuff that was left for Python 2.7 compatibility, so that discussion should probably occur first before we go ripping stuff out

[issue21063] Touch up one-line descriptions of modules for module index

2019-11-26 Thread Brett Cannon
Brett Cannon added the comment: New changeset 2f2489310d89f589a091aa09ac1eb973d9a383d8 by Brett Cannon (Miss Islington (bot)) in branch '3.7': bpo-21063: Improve module synopsis for distutils (GH-17363) (#17381) https://github.com/python/cpyt

[issue38924] pathlib paths .normalize()

2019-11-27 Thread Brett Cannon
Brett Cannon added the comment: Do note that Path inherits from PurePath, so providing a normalize() method on the latter means it will end up on the former. -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue38

[issue38927] venv --upgrade_deps fails on Windows

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +vinay.sajip ___ Python tracker <https://bugs.python.org/issue38927> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38928] EnvBuilder.upgrade_dependencies() does not exist on 3.8

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +vinay.sajip ___ Python tracker <https://bugs.python.org/issue38928> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38931] pathlib.Path on Windows - parser issue

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue38931> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- versions: +Python 3.9 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue35003> ___ ___ Python-bugs-list mailing list Unsub

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +vinay.sajip ___ Python tracker <https://bugs.python.org/issue35003> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38916] Remove array.fromstring

2019-11-27 Thread Brett Cannon
Brett Cannon added the comment: > there's no harm to keeping it (it's not broken) ... for now. :) There's always the risk that will change if we keep the code around. > The other deprecation in the array module says, "Deprecated since version > 3.3, w

[issue38021] pep425 tag for AIX is inadequate

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue38021> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38649] tkinter messagebox is sloppy

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue38649> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32856] Optimize the `for y in [x]` idiom in comprehensions

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue32856> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38593] Python 3.7 does not catch infinite recursion for some values of sys.getrecursionlimit()

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue38593> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38569] Unknown distribution option: 'license_files'

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue38569> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34309] Trouble when reloading extension modules.

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue34309> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7980] time.strptime not thread safe

2019-11-27 Thread Brett Cannon
Brett Cannon added the comment: As per Paul's suggestion, closing as "won't fix" as this only pertains to Python 2.7 and it will not be changing. -- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed _

[issue11664] Add patch method to unittest.TestCase

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue11664> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16079] list duplicate test names with patchcheck

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue16079> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38079] _PyObject_VAR_SIZE should avoid arithmetic overflow

2019-11-27 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue38079> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38916] Remove array.fromstring

2019-11-28 Thread Brett Cannon
Brett Cannon added the comment: > How about note it in the documentation and logging rather than removing them? Yep, docs and raising DeprecationWarning should be good. -- ___ Python tracker <https://bugs.python.org/issu

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-11-28 Thread Brett Cannon
Brett Cannon added the comment: I've personally never come across Scripts in any other situation than virtual environments, but that isn't saying much about my Windows exposure either. :) Basically activation is the biggest stumbling block I find with new users when it comes to

[issue38939] Using Python as a Calculator

2019-11-29 Thread Brett Cannon
Brett Cannon added the comment: If you're using Python 2.7 then that would explain what you're seeing. You can either upgrade to Python 3 or use `from __future__ import division` to get the result you're after. -- nosy: +brett.cannon resolution: -> not a bug s

[issue38940] Add a new functools.cast() function

2019-11-29 Thread Brett Cannon
Brett Cannon added the comment: First off, thanks for the suggestion! But there are two things to say about this. One, that isn't actually casting as Python doesn't have the concept of casting like in statically typed languages since everything is dynamically typed. Two, the solu

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-11-29 Thread Brett Cannon
Brett Cannon added the comment: > Surely "on native Windows you run venv-path\Scripts\activate[.ps1], on POSIX > you use source venv-path/bin/activate" isn't *that* hard for new users to > grok, and would cover the vast majority of users? Sure, but how many times d

[issue38924] pathlib paths .normalize()

2019-11-29 Thread Brett Cannon
Brett Cannon added the comment: > From my experience in the past the intention has been to keep the API minimal Correct, all of os.path and shutils does not need to end up in pathlib. :) Hence why the request to add things is always tough as we have to try and strike a balance of useful

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-12-02 Thread Brett Cannon
Brett Cannon added the comment: > If venv is run in a child process of the shell, how does it set those > variables in the parent shell? You can't. Tools like `pipenv shell` and `conda shell` end up with a new shell running instead of changing the current she

[issue38924] pathlib paths .normalize()

2019-12-02 Thread Brett Cannon
Brett Cannon added the comment: I'm going with Serhiy's recommendation and closing this. Sorry, IonuČ›. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-12-03 Thread Brett Cannon
Brett Cannon added the comment: > Are you proposing to bring that functionality, which these third-party tools > perform currently, into the stdlib? I was hoping to, but it turns out you can't make this work under Windows without inspecting the parent process (PowerShell and Com

[issue38924] pathlib paths .normalize()

2019-12-03 Thread Brett Cannon
Brett Cannon added the comment: While I understand you're disappointed, do realize that the tone of your response isn't necessary. I'm going to assume you didn't mean for it to come off as confrontational and still provide a reply. > you do realise there are no

[issue38972] Link to instructions to change PowerShell execution policy for venv activation

2019-12-04 Thread Brett Cannon
New submission from Brett Cannon : It would probably be good to add a note in the venv docs about execution policies, why it needs to change for environment activation, and how to do it -- especially now that we sign Activate.ps1 -- so there's less of a chance of people being caugh

[issue38974] using tkinter.filedialog.askopenfilename() freezes python 3.8

2019-12-04 Thread Brett Cannon
Change by Brett Cannon : -- title: using filedialog.askopenfilename() freezes python 3.8 -> using tkinter.filedialog.askopenfilename() freezes python 3.8 ___ Python tracker <https://bugs.python.org/issu

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-12-04 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue38878> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38972] Link to instructions to change PowerShell execution policy for venv activation

2019-12-04 Thread Brett Cannon
Brett Cannon added the comment: And where this has come up as an issue: https://github.com/microsoft/vscode-python/issues/2559. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38544] test_venv: test_isolation() failed on AMD64 Windows7 SP1 3.x: directory not empty: Scripts\

2019-12-06 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +vinay.sajip ___ Python tracker <https://bugs.python.org/issue38544> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38901] Add a CLI flag to venv to use the pwd basename as the prompt

2019-12-08 Thread Brett Cannon
Brett Cannon added the comment: If it were `.` would we then always check if the prompt was a folder and then use the folder's name in that case? Or would it only apply to `.`? As for `__curdir__`, it could work, but I don't know how easy would that be to remember or explain to

[issue38990] Import genericpath fails with python -S

2019-12-09 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the report, Brittany, but I'm closing as "won't fix" as the only way to make this happen is to import genericpath directly which one shouldn't do (it's undocumented on purpose); always get a hold of this module vi

[issue25160] Stop using deprecated imp module; imp should now emit a real DeprecationWarning

2019-12-09 Thread Brett Cannon
Brett Cannon added the comment: > Any reason to keep imp there? Nope, not anymore. -- ___ Python tracker <https://bugs.python.org/issue25160> ___ ___ Python-

[issue39037] Wrong trial order of __exit__ and __enter__ in the with statement

2019-12-13 Thread Brett Cannon
Brett Cannon added the comment: @Gery please do open a documentation PR! :) -- nosy: +brett.cannon ___ Python tracker <https://bugs.python.org/issue39

[issue36406] doctest.testmod(empty_package) raises TypeError in 3.7 (and no errors in 3.6)

2019-12-13 Thread Brett Cannon
Brett Cannon added the comment: New changeset 8289e27393395ee903bd096d42e07c112d7f15c6 by Brett Cannon (Xtreak) in branch 'master': bpo-36406: Handle namespace packages in doctest (GH-12520) https://github.com/python/cpython/commit/8289e27393395ee903bd096d42e07c112d7f15c6 -

[issue36406] doctest.testmod(empty_package) raises TypeError in 3.7 (and no errors in 3.6)

2019-12-13 Thread Brett Cannon
Brett Cannon added the comment: New changeset d3212036aa2510b9e133ba4bfaf1262d6bcbe7f0 by Brett Cannon (Miss Islington (bot)) in branch '3.7': bpo-36406: Handle namespace packages in doctest (GH-12520) (GH-17592) https://github.com/python/cpyt

[issue36406] doctest.testmod(empty_package) raises TypeError in 3.7 (and no errors in 3.6)

2019-12-13 Thread Brett Cannon
Brett Cannon added the comment: New changeset aa74a53ad61134911ac7904f24fd2630aeaa8ac8 by Brett Cannon (Miss Islington (bot)) in branch '3.8': bpo-36406: Handle namespace packages in doctest (GH-12520) (GH-17591) https://github.com/python/cpyt

[issue39081] pathlib '/' operator does not resolve Enums with str mixin as expected

2019-12-18 Thread Brett Cannon
Brett Cannon added the comment: Karthikeyan is right and this is working as expected. If you want the semantics you're after you can either implement __fspath__ as was suggested or get the 'value' attribute of the enum when constructing your path. -- nosy: +brett.ca

[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2019-12-18 Thread Brett Cannon
New submission from Brett Cannon : The question on how best to get an absolute path from a pathlib.Path object keeps coming up (see https://bugs.python.org/issue29688, https://discuss.python.org/t/add-absolute-name-to-pathlib-path/2882/, and https://discuss.python.org/t/pathlib-absolute-vs

[issue29688] Add support for Path.absolute()

2019-12-18 Thread Brett Cannon
Brett Cannon added the comment: I have opened https://bugs.python.org/issue39090 to track updating the pathlib docs to have a section on getting the absolute path in various ways along with what the trade-offs are for each approach. -- ___ Python

[issue900092] hotshot.stats.load fails with AssertionError

2019-12-18 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue900092> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1116520] Prefix search is filesystem-centric

2019-12-18 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue1116520> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1298835] Add a vendor-packages directory for system-supplied modules

2019-12-18 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue1298835> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39103] [linux] strftime renders %Y with only 3 characters

2019-12-20 Thread Brett Cannon
Brett Cannon added the comment: Due note, though, that there's a difference in the implementation of strftime versus strptime, as the former (at least the last time I looked ages ago) uses the libc version of the function and thus probably doesn't try to smooth out differences

[issue39111] Misleading documentation

2019-12-20 Thread Brett Cannon
Brett Cannon added the comment: This is because your class implicitly inherits from object and object.__eq__() is implemented and does not return NotImplemented. -- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -&g

[issue39111] Misleading documentation

2019-12-20 Thread Brett Cannon
Brett Cannon added the comment: And to be more specific, == is guaranteed to work by falling back to object.__eq__() which falls back to object identity if the object doesn't have a custom __eq__() method. -- ___ Python tracker &

[issue39111] Misleading documentation for NotImplemented

2019-12-24 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <https://bugs.python.org/issue39111> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34444] Module's __file__ should be absolute always ("." in sys.path)

2019-12-24 Thread Brett Cannon
Brett Cannon added the comment: So if you were to insert '.' via PYTHONPATH it would be made absolute as the site module makes all entries in sys.path absolute during startup. And changing this to have to check every time import runs if an entry in sys.path is absolute would

[issue34444] Module's __file__ should be absolute always ("." in sys.path)

2020-01-02 Thread Brett Cannon
Brett Cannon added the comment: RE: "This could be done when inserting something into `sys.path` maybe then only?" That would require a custom object instead of a standard list for sys.path which could detect insertion and then do the automatic absolute path resolution which as y

[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2020-01-02 Thread Brett Cannon
Brett Cannon added the comment: Yep, it looks like this is fixed, Batuhan. Thanks for letting us know! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39226] venv does not include pythonXX.lib

2020-01-06 Thread Brett Cannon
Brett Cannon added the comment: When have you seen this work previously? On my Windows 10 machine there is no Scripts\libs directory for Python 3.7, let alone a python37.lib file in any directory that I can find. -- nosy: +brett.cannon, vinay.sajip

[issue39225] Python should warn when a global/local has the same name as a builtin

2020-01-06 Thread Brett Cannon
Brett Cannon added the comment: I agree with Eric that this is the realm of linters as there are legitimate reasons sometimes to mask and redefine built-ins. Thanks for the idea, Reuven, but I'm closing the issue. -- nosy: +brett.cannon resolution: -> rejected stage: -&g

[issue39204] Automate adding Type Annotations to Documentation

2020-01-06 Thread Brett Cannon
Brett Cannon added the comment: I think a bigger thing is to simply get type annotations to be used in the stdlib first, then we can worry about documenting them as part of the API. :) -- nosy: +brett.cannon ___ Python tracker <ht

[issue38623] Python documentation should mention how to find site-packages

2020-01-06 Thread Brett Cannon
Brett Cannon added the comment: I agree with Inada-san that pointing out how to get the file path on a module is a better solution then explaining directory layouts which are borderline implementation details. -- ___ Python tracker <ht

[issue39236] Adding a .gitignore file to virtual environments

2020-01-06 Thread Brett Cannon
New submission from Brett Cannon : In a discussion on Twitter, the idea of having venv lay down a .gitignore file in a newly created virtual environment that consisted of nothing but `*` came up (https://twitter.com/codewithanthony/status/1213680829530099713). The purpose would be to help

[issue39236] [venv] Adding a .gitignore file to virtual environments

2020-01-06 Thread Brett Cannon
Change by Brett Cannon : -- title: Adding a .gitignore file to virtual environments -> [venv] Adding a .gitignore file to virtual environments ___ Python tracker <https://bugs.python.org/issu

<    11   12   13   14   15   16   17   18   19   20   >