Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.0.3 #776

Merged
merged 82 commits into from
Jul 29, 2023
Merged
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
5d727f8
Reenable develop
evhub May 30, 2023
bfb4029
Make multiset methods return multisets
evhub May 30, 2023
a79665f
Fix flaky test
evhub May 30, 2023
27f6ad0
Fix py2
evhub May 30, 2023
ebb44f5
Enable --line-numbers by default
evhub Jun 3, 2023
20c9157
Fix coconut-run
evhub Jun 3, 2023
dbbc383
Try to fix test flakiness
evhub Jun 3, 2023
4feb0b6
Fix py36
evhub Jun 4, 2023
a08e8e7
Add and_then and and_then_await
evhub Jun 9, 2023
4966db9
Add subscript 10 unicode alt
evhub Jun 9, 2023
1cf5574
Fix py2 errors
evhub Jun 10, 2023
8de84d5
Further fix py2
evhub Jun 11, 2023
8f31d25
Disable implicit call syntax in xonsh
evhub Jun 11, 2023
375d8fd
Improve handling of missing modules
evhub Jun 12, 2023
7871542
Fix constant overhead for functions
evhub Jun 13, 2023
7439f3e
Reduce appveyor testing
evhub Jun 14, 2023
db2dc7f
Add fat lambda support
evhub Jun 14, 2023
dc44521
Support 3.12 f str syntax
evhub Jun 20, 2023
00a4afc
Add testing for deprecated versions
evhub Jun 20, 2023
86ee301
Fix broken tests
evhub Jun 20, 2023
f148091
Remove broken tests
evhub Jun 20, 2023
d0baeb3
Fix py34
evhub Jun 20, 2023
518b57e
Update setup-python
evhub Jun 20, 2023
bd63677
Further fix py34
evhub Jun 21, 2023
6ade946
Merge branch 'develop' of https://github.com/evhub/coconut into develop
evhub Jun 21, 2023
2aceb21
Fix passthrough
evhub Jun 21, 2023
1e1f0e4
Fix low py3 vers
evhub Jun 21, 2023
28036f1
Fix py2
evhub Jun 21, 2023
6eb1c77
Fix py34
evhub Jun 22, 2023
185f001
Fix py2
evhub Jun 22, 2023
54cdffa
Fix import testing
evhub Jun 22, 2023
17735e1
Add incremental parsing support
evhub Jul 5, 2023
5eaaf4c
Improve jupyter installation, fix incremental parsing
evhub Jul 6, 2023
6ee0d04
Use incremental mode for integrations
evhub Jul 6, 2023
740b928
Improve incremental parsing usage
evhub Jul 6, 2023
66c8ad3
Use newest cPyparsing
evhub Jul 7, 2023
5ea526b
Fix jupyter, improve watching
evhub Jul 8, 2023
7c2b724
Fix ipython extension
evhub Jul 8, 2023
63403b0
Add psf target
evhub Jul 8, 2023
f84276d
Fix tests
evhub Jul 9, 2023
c891114
Fix imports test
evhub Jul 9, 2023
bac9488
Use --no-wrap-types in auto comp
evhub Jul 12, 2023
a74fb8a
Better document coconut-run
evhub Jul 15, 2023
a858e55
fix: the target name has been changed in fe648bd9
kxmh42 Jul 15, 2023
a71efdd
Merge branch 'develop' into fix/test-basic-to-test-univ-target
evhub Jul 15, 2023
4369325
Fix make target in the docs: test-basic -> test-univ (#770)
evhub Jul 15, 2023
5eed433
Allow setting auto comp args
evhub Jul 16, 2023
35efe56
Automatically set auto comp args
evhub Jul 16, 2023
cfd7709
Improve import hook testing
evhub Jul 16, 2023
162dd82
Improve auto comp
evhub Jul 16, 2023
5831223
Add comments
evhub Jul 16, 2023
f77ea72
Use cache_dir for coconut-run and auto comp
evhub Jul 16, 2023
a44b424
Fix command
evhub Jul 16, 2023
928755d
Clarify docs
evhub Jul 16, 2023
4b143e3
Add 3.13 support
evhub Jul 16, 2023
9c99cb9
Improve api, integrations
evhub Jul 16, 2023
65c470f
Fix lots of bugs
evhub Jul 16, 2023
325cd85
Fix more bugs
evhub Jul 16, 2023
0851ecf
Document fat lambdas
evhub Jul 16, 2023
234eb2f
Improve docs, types
evhub Jul 18, 2023
b851ed0
Bump reqs with cpyparsing
evhub Jul 18, 2023
ecbaf82
Fix warnings
evhub Jul 19, 2023
4adb6b4
Fix pypy error
evhub Jul 20, 2023
1d2da9a
Improve wrapping
evhub Jul 20, 2023
773be62
Improve docs
evhub Jul 20, 2023
b7d8588
Check for f-strings w/o exprs
evhub Jul 21, 2023
13fed05
Overhaul exception formatting
evhub Jul 21, 2023
1367992
Further improve exceptions
evhub Jul 21, 2023
590e28f
Fix exception test
evhub Jul 21, 2023
d70886b
Overhaul exc formatting again
evhub Jul 22, 2023
46610fb
Upgrade to new cPyparsing
evhub Jul 25, 2023
aa21691
Upgrade to newer cPyparsing
evhub Jul 25, 2023
847629a
Fix imports, exceptions
evhub Jul 26, 2023
7f13c92
Fix mypy stub installation
evhub Jul 27, 2023
e583890
Fix tests
evhub Jul 27, 2023
3012657
Further fix tests
evhub Jul 27, 2023
6927048
Fix semicolons in xonsh
evhub Jul 28, 2023
9a465eb
Clean up code
evhub Jul 28, 2023
5b82a18
Attempt to fix test setup
evhub Jul 28, 2023
1ffca4a
Add docstrings to stubs
evhub Jul 29, 2023
ea5a899
Fix appveyor
evhub Jul 29, 2023
6b6c174
Prepare for v3.0.3 release
evhub Jul 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Upgrade to new cPyparsing
evhub committed Jul 25, 2023
commit 46610fb4be8881b2c06b050015d76535eb875c28
8 changes: 6 additions & 2 deletions coconut/command/command.py
Original file line number Diff line number Diff line change
@@ -234,7 +234,11 @@ def execute_args(self, args, interact=True, original_args=None):
args.trace = args.profile = False

# set up logger
logger.quiet, logger.verbose, logger.tracing = args.quiet, args.verbose, args.trace
logger.setup(
quiet=args.quiet,
verbose=args.verbose,
tracing=args.trace,
)
if args.verbose or args.trace or args.profile:
set_grammar_names()
if args.trace or args.profile:
@@ -571,7 +575,7 @@ def compile(self, codepath, destpath=None, package=False, run=False, force=False
foundhash = None if force else self.has_hash_of(destpath, code, package_level)
if foundhash:
if show_unchanged:
logger.show_tabulated("Left unchanged", showpath(destpath), "(pass --force to override).")
logger.show_tabulated("Left unchanged", showpath(destpath), "(pass --force to overwrite).")
if self.show:
logger.print(foundhash)
if run:
11 changes: 5 additions & 6 deletions coconut/constants.py
Original file line number Diff line number Diff line change
@@ -601,18 +601,17 @@ def get_bool_env_var(env_var, default=False):
style_env_var = "COCONUT_STYLE"
vi_mode_env_var = "COCONUT_VI_MODE"
home_env_var = "COCONUT_HOME"
use_color_env_var = "COCONUT_USE_COLOR"

coconut_home = fixpath(os.getenv(home_env_var, "~"))

use_color = get_bool_env_var(use_color_env_var, default=None)
use_color = get_bool_env_var("COCONUT_USE_COLOR", None)
error_color_code = "31"
log_color_code = "93"

default_style = "default"
prompt_histfile = os.path.join(coconut_home, ".coconut_history")
prompt_multiline = False
prompt_vi_mode = get_bool_env_var(vi_mode_env_var)
prompt_vi_mode = get_bool_env_var(vi_mode_env_var, False)
prompt_wrap_lines = True
prompt_history_search = True
prompt_use_suggester = False
@@ -688,7 +687,7 @@ def get_bool_env_var(env_var, default=False):

interpreter_uses_auto_compilation = True
interpreter_uses_coconut_breakpoint = True
interpreter_uses_incremental = False
interpreter_uses_incremental = get_bool_env_var("COCONUT_INTERPRETER_INCREMENTAL_PARSING", False)

command_resources_dir = os.path.join(base_dir, "command", "resources")
coconut_pth_file = os.path.join(command_resources_dir, "zcoconut.pth")
@@ -848,7 +847,7 @@ def get_bool_env_var(env_var, default=False):
license_name = "Apache 2.0"

pure_python_env_var = "COCONUT_PURE_PYTHON"
PURE_PYTHON = get_bool_env_var(pure_python_env_var)
PURE_PYTHON = get_bool_env_var(pure_python_env_var, False)

# the different categories here are defined in requirements.py,
# tuples denote the use of environment markers
@@ -940,7 +939,7 @@ def get_bool_env_var(env_var, default=False):

# min versions are inclusive
min_versions = {
"cPyparsing": (2, 4, 7, 2, 1, 2),
"cPyparsing": (2, 4, 7, 2, 2, 0),
("pre-commit", "py3"): (3,),
("psutil", "py>=27"): (5,),
"jupyter": (1, 0),
2 changes: 1 addition & 1 deletion coconut/root.py
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
VERSION = "3.0.2"
VERSION_NAME = None
# False for release, int >= 1 for develop
DEVELOP = 29
DEVELOP = 30
ALPHA = False # for pre releases rather than post releases

assert DEVELOP is False or DEVELOP >= 1, "DEVELOP must be False or an int >= 1"
13 changes: 12 additions & 1 deletion coconut/terminal.py
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@
error_color_code,
log_color_code,
ansii_escape,
get_bool_env_var,
)
from coconut.util import (
get_clock_time,
@@ -178,7 +179,8 @@ def logging(self):

class Logger(object):
"""Container object for various logger functions and variables."""
verbose = False
force_verbose = get_bool_env_var("COCONUT_FORCE_VERBOSE", False)
verbose = force_verbose
quiet = False
path = None
name = None
@@ -215,6 +217,15 @@ def copy(self):
"""Make a copy of the logger."""
return Logger(self)

def setup(self, quiet=None, verbose=None, tracing=None):
"""Set up the logger with the given parameters."""
if quiet is not None:
self.quiet = quiet
if not self.force_verbose and verbose is not None:
self.verbose = verbose
if tracing is not None:
self.tracing = tracing

def display(
self,
messages,