Deprecate project in favor of original Ladda

Just tested how current version of the original Ladda works with Bootstrap and found that it works really well:
https://jsfiddle.net/terales/p3efcqw7/
@msurguy what do you think about adding deprecation messages, close issues and navigating people to the original Ladda?

Or maybe this project would be a connector to fix some Bootstrap related edge cases like #65?

@terales yeah, there is no reason to maintain this repo if all problems have been solved by original Ladda plugin.
What you can do is to create a couple PRs with clear examples of using Bootstrap 3 and Bootstrap 4 with Ladda so that people have an easy reference about how to use Ladda with Bootstrap. By doing that you can essentially clear the confusion that my repo was trying to solve and you can provide solutions to specific edge cases like #65 as well.
Does that sound good?

Yeah!
Here is a PR for adding Bootstrap 3 and 4 to the test cases inside Ladda: https://github.com/hakimel/Ladda/pull/76
Do you think about adding examples into the repository home page? I think I could help

@terales I think you'd have to consult with @hakimel about that in Ladda repo and ask him whether he thinks it's a good idea.
Thanks for your PRs!


Aimbot suggestion. - Viridian#1613

'I think the best way to 'fix' the aimbot right now is to limit the angle that the aimbot searches in again like how it worked in the older versions'
'Since right now it prioritizes all enemies in any angle which means it won't focus enemies where you're (roughly) aiming  at
I believe Bubbet said the angle was approx. 20 degrees in the direction the player is looking at before'

The aimbot in the dev release works miles better than the current one. Personally I don't even think it needs the filter.

Added with Aerolt 4.0.0


ccls-initialization-options  can't be specified in ~/.doom.d/config.el

What did you expect to happen?
~/.doom.d/config.el
(setq ccls-initialization-options `(:copmileDefinitionsDirectory "build"))

What actually happened?
That configuration doesn't work.
It was broken with: https://github.com/hlissner/doom-emacs/pull/3879
We need to call
(setq ccls-initialization-options
      (append ccls-initialization-options
...

@gagbo

If you want to overwrite it use (after! ccls (setq ccls-initialization-options …)).
In anycase there's no easy function to merge those plist properly (i.e. what happens if you want to add/change some keys in :index). So if you want to change the init options, it's best to wrap them in after! ccls (or in .dir-locals.el) and assume that you want to overwrite everything

As gagbo suggested, it must be wrapped in (after! ccls ...). The canonical way to configure packages (and have your configuration override defaults) has always been to use (after! PACKAGE ...).
If keystrokes are the issue, you could do one of the following (should be wrapped in (after! ccls ...)):

(plist-put ccls-initialization-options :compileDefinitionsDirectory "build")
(appendq! ccls-initialization-options '(:compileDefinitionsDirectory "build"))

As this isn't a bug I will close this.
Hope that helps!

Thanks a lot!

@hlissner , @gagbo  I can't use after! because  options are applied at  :config
as a result my after! configuration is executed before and overridden with the default settings
(use-package! ccls
  :when (featurep! +lsp)
  :unless (featurep! :tools lsp +eglot)
  :after lsp-mode
  :init
  (after! projectile
...
  :config
  (add-hook 'lsp-after-open-hook #'ccls-code-lens-mode)
  (set-evil-initial-state! 'ccls-tree-mode 'emacs)
  (setq ccls-sem-highlight-method 'font-lock)
  (when (or IS-MAC IS-LINUX)
    (let ((cpu-count-command (cond (IS-MAC '("sysctl" "-n" "hw.ncpu"))
                                   (IS-LINUX '("nproc"))
                                   (t (error "unreachable code")))))
      (setq ccls-initialization-options
            `(:index (:trackDependency 1
                      :threads ,(max 1 (/ (string-to-number (cdr (apply #'doom-call-process cpu-count-command))) 2)))))))
  (when IS-MAC
...

@myrgy Please update Doom, this was fixed yesterday.

Works fine for me. Thanks!


Push pre-built Python 3.11 wheels [ENH]

It would be great to have pre-built Python 3.11 wheels for dask-sql to avoid needing Rust compiler everywhere dask-sql is used with 3.11

@m1n0 Totally agree. Takes 13 minutes to build. Would save a lot of time in CI/CD pipline.


Should tonne have t as its short name?

According to https://en.wikipedia.org/wiki/Metric_ton, the tonne has a symbol of t, not ton. ton can also easily lead to confusion with the various other units all named "ton".

We have t for ton in Insect: https://github.com/sharkdp/insect/blob/6c3dd0e4308913a98fcbdad161c5c750974336d4/src/Insect/Parser.purs#L305-L307
Unfortunately, I don't remember why I reverted it here in this library: https://github.com/sharkdp/purescript-quantities/commit/558c85b9f17574d05249ebe61b2f66e8cd3ac812 Should have noted that in the commit message. Probably because I wanted it to display as "ton" in Insect, even if someone types t.
I'm happy to discuss this again. Actually might be in favor of changing it.

Well, a good way to avoid the confusion is to display it as "tonne" instead of "ton", as "tonne" refers unambiguously to a metric ton, unlike "ton". "Metric ton" can fulfill that role well too (arguably even better than "tonne"), but I lean a little towards "tonne." Both are fine by me though.


Support feature flags via CLI close #60

Checklist

[ ] Updated CHANGELOG.md describing pertinent changes.
[ ] Updated README.md with pertinent info (may not always apply).
[ ] Squash down commits to one or two logical commits which clearly describe the work you've done.

Notice
This is (obviously) a work-in-progress.
I'll be using (and modifying) the work done in #166 and introduce --all-features and --no-default-features.
In a future PR, I may even add support for that via a <link data-trunk> tag (extending #166 to "all" and "no-default").

@thedodd You'll have to add #60 to the "Linked issues" list of this PR, since I haven't created it (the issue) myself.

I converted this back to a draft to work on the conflicts in the files

src/config/mod.rs
src/config/rt.rs
src/pipelines/rust_app.rs

Btw, @thedodd, what do you mean with

I want to add -Z as well, however that has a slightly more complex command structure, and it might be best to leave that off for now as extra credit.

As in, what would -Z do? For what would it be an alias? See https://github.com/thedodd/trunk/issues/60#issuecomment-702720664

This PR addressing #60 is now again ready to be reviewed.
Once @thedodd approves (or I fix all things he'd like me to change and then approves), I'll squash and #60 can be closed by merging this.

Hey! Is there any update on this?I'd love to use this feature, so I can reduce my wasm binary size (using build-std).

Hey! Is there any update on this?I'd love to use this feature, so I can reduce my wasm binary size (using build-std).

I'll try to get this PR up-to-date with master in the next 24h.
I've done this a couple of  times now  already, but it's never been merged so far.

ping @thedodd @dnaka91

I just pushed changes to CHANGELOG.md and to assets.md to reflect changes made to data-cargo attributes - see commit 1b26c12 for details.
Two things:

Let me know when to squash
Should we introduce tests for this functionality?

I've just squashed the commits on my branch support_feature_flags_issue-60 into one commit.
The old commits are still available on support_feature_flags_issue-60_no-squash, in case somebody wants to see them.
I now consider this ready-to-merge; awaiting feedback.

Friendly reminder for @thedodd
This is ready-to-merge see https://github.com/thedodd/trunk/pull/183#issuecomment-1159025719:

(1st round of ) Requested changes implemented
Changelog amended for new features
Blog post explaining the features amended
Squashed down into one commit

Please let me know if you'd like me to make further changes.


added max_distance check when filling in no-data forcing; updated read_obslog.m utility

Clarified and improved subroutines check_nodata_forcing() and check_nodata_forcing_2():

Added "max_distance" check when using forcing data from "next" tile when encountering no-data-value in forcing.
Clarified comments about compile-time switch "create_ExcludeList".

Updated utility read_obslog.m:

Existing version was outdated and could not handle post-launch format of obslog files.

I successfully compiled the branch but did not test.  I'm confident it is zero-diff.  The forcing datasets used in the Nightly tests should be insensitive to the new "max_distance" check.
@biljanaorescanin : Please (i) take a look at the revisions in the context of your ERA5 forcing reader and (ii) run the Nightly tests.
cc: @gmao-jkolassa @weiyuan-jiang @rdkoster

(i) Additions align well with ERA5 forcing reader.
(II) I ran Nightly tests and as you expected its a zero diff.


Not able to import rke1 clusters into the rancher server

Rancher Server Setup

Rancher version: v2.6-head 44b8030
Installation option (Docker install/Helm Chart): Docker install & HA

If Helm Chart, Kubernetes Info: k3s & RKE1
Cluster Type (RKE1, RKE2, k3s, EKS, etc):
Node Setup: 1 node
Version: v1.21.3+k3s1 & v1.22.3-rancher1-1

Proxy/Cert Details: self-signed

Information about the Cluster

Kubernetes version:  v1.21.6 , v1.22.3 and v1.18.20
Cluster Type (Local/Downstream): Imported RKE1 cluster 3 nodes all roles

Describe the bug
After importing an rke1 cluster into the rancher server, the cluster is stuck in Unavailable state and won't come up active
To Reproduce

Create an rke1 cluster with any k8s, I tried with k8s 1.22.3, 1.21.6 and 1.18.20
Run the curl command against the kubeconfig file of this cluster.

Result
Cluster is stuck in unavailable state for HA installation and on docker install, it is flapping between Active and Unavailable state.
Following error was seen on the cluster
Cluster agent is not connected

From the cluster agent pod logs, we see the following:
time="2021-11-23T22:18:02Z" level=error msg="Failed to connect to proxy. Empty dialer response" error="dial tcp<redacted>:443: i/o timeout"
time="2021-11-23T22:18:02Z" level=error msg="Remotedialer proxy error" error="dial tcp <redacted>:443: i/o timeout"
time="2021-11-23T22:18:12Z" level=info msg="Connecting to wss://<redacted>/v3/connect with token starting with<redacted>"
time="2021-11-23T22:18:12Z" level=info msg="Connecting to proxy" **url="wss://<redacted>/v3/connect"**

Expected Result
Expected the cluster to come up active
Additional context
Issue is not seen for imported RKE2 clusters

Most likely related to https://github.com/rancher/rancher/issues/35546

We understand reason its breaking now, just need to find a new fix.

For the first cluster agent deployed through template generated by cluster import handler, CATTLE_FEATURES is empty  so rancher isn't running. Without secret and aggregation controllers running, session with clientKey "stv-cluster-{clusterName}" never gets added for clusters.
hasSession will always remain false until cluster agent is redeployed (during redeploy, CATTLE_FEATURES is set) and then connected becomes true. But we blocked redeploy if connected is false, so that's why imported cluster is stuck in the disconnected state.
Can fix this by either:

run rancher in the first agent by passing CATTLE_FEATURES
deploy cluster agent even if connected is false - so basically remove this line https://github.com/rancher/rancher/blob/release/v2.6/pkg/controllers/management/clusterdeploy/clusterdeploy.go#L96

2.6-head 9295d4f

Verified importing rke1 clusters on versions v1.21.4-ranher1-1, 1.21.7-rancher1-1, v1.18.20-rancher1-3 on HA rancher with local on k8s v1.21.7-rancher1-1
Ran validation checks and the checks look good.


Remove meaningless test

Please merge #335 first before merging this.
Description

Remove meaningless test.
should apply 200px carousel width when element has 200px width
Motivation and Context

Code coverage remained the same despite removing this test.
Negating the assertion does not cause the test to fail.
PR #335 Coveralls
PR #337 Coveralls
How Has This Been Tested?

precommit passed.

Good stuff, feel free to remove any other tests you see that aren't actually working. I'll wait until we merge #335, since you've branched off of that for this PR

Rebased with new changes in #335.

Updated the branch for your changes with #335 and fixed a small merge conflict


[BUG] The file become empty when click the right menu of 'pull current file'

this happened ONLY in the open document.

open a document.
click the right menu on the opened document.
click the pull current file menu item

it happened every 'pull current file' menu, but not always,  just sometimes, i'm not sure when or how

@fanshengshuai if you use FTP for deploy, try to use jsftp engine, check #65.


smimesign and gpgsm compability

It's seems for me that signatures made by smimesign cannot be verified by gpgsm. gpgsm uses for ID string like this 0x85B45FC2 and smimesign just cert fingerprint. So gpgsm simply cannot found this cert:
gpgsm: Signature made 2022-08-02 08:31:38 UTC
gpgsm:                using rsa1024 key 1330B26E34290E780CF1B34E14E0D06F85B45FC2
gpgsm: certificate not found: No public key
gpgsm: certificate #7C0015897CCB1524C0A9128ADE00000015897C/CN=test,DC=test
gpgsm: checking the CRL failed: Not found
gpgsm: invalid certification chain: Not found

Oh, after day of research I've understood that you need to manually import root and intermediate certs to gpgsm.
$ gpgsm --import ca.crt
$ gpgsm --import int.crt

You also need to create ~/.gnupg/trustlist.txt file with fingerprint of your CA:
2B:00:80:0B:B7:A7:62:E6:9B:D4:11:27:7F:CF:5C:59:14:65:C3:25 S


Updates are installing successfully but still shows up when looking for updates after installing them

Probably this is a bug, I think it should be reported and that's what I'm doing...

Atualização de segurança do Windows XP (KB2485663)
Atualização de segurança do Windows XP (KB979687)
Atualização de segurança do Windows XP (KB973904)
Atualização de segurança para o Windows XP (KB923561)

KB952069 for Windows 2000 also does the exact same thing.

Must be broken "is installed" logic for those updates on Microsoft's side. Basically Windows Update determines if an update is installed by looking at DLL versions and registry keys. If the server is sending the wrong logic, an installed update will show up in search results again.
I could possibly implement a fix on the server. I currently don't do any modification of the requests to/responses from the Microsoft server, but I might be able to do a find-and-replace if there's an easy fix.
For KB952069 I did find this thread confirming the same behavior.

Try purge C:\Windows\SoftwareDistribution and then reboot. This is working on modern systems, which also have this bug. Microsoft haven't fixed the problem even in latest OSes. I've seen this bug in 2000, XP ten years ago and in 8.1, 10 almost just now. Strange that have not seen in Win11, but may be this is just a luck. :)

Going to close as it’s not strictly a Legacy Update bug, but I’ll keep this in mind in case I ever see it happen myself so I can investigate.


Persistent 422 Error

Our team has been having an issue with exporting tokens to our github token library. We've generated new github access tokens and that hasn't changed anything. Any tips on how to alleviate this issue or this is a bug? Response message says "client payload is too large" but the exported json file is only around 77kb.
Fetched file is pasted below as well

Fetch.txt

The problem is that 50kb is the max for dispatches.
I am not an actions expert, maybe there is a different way like sending the data to a bitbucket and letting this trigger github?
I am happy to help with this, but I have no solution at hand, so if you have an idea, let me know.

There is now another option to remove $extension property which may help.


pyuserinput can not bu installed

Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.
Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.
Make sure to mention your debugging experience if the documented solution failed.
pyuserinput can not bu installed
my pipenv version is the latest 2020.11.15.I execute command pipenv install pyuserinput, but fail.
$ pipenv install pyuserinput
Installing pyuserinput...
Adding pyuserinput to Pipfile's [packages]...
Installation Succeeded
Pipfile.lock (8d5ac7) out of date, updating to (53d193)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
 Locking...Building requirements...

[ResolutionFailure]:   File "c:/python36/lib/site-packages/pipenv/resolver.py", line 741, in _main
[ResolutionFailure]:       resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
[ResolutionFailure]:   File "c:/python36/lib/site-packages/pipenv/resolver.py", line 709, in resolve_packages
[ResolutionFailure]:       requirements_dir=requirements_dir,
[ResolutionFailure]:   File "c:/python36/lib/site-packages/pipenv/resolver.py", line 692, in resolve
[ResolutionFailure]:       req_dir=requirements_dir
[ResolutionFailure]:   File "c:\python36\lib\site-packages\pipenv\utils.py", line 1403, in resolve_deps
[ResolutionFailure]:       req_dir=req_dir,
[ResolutionFailure]:   File "c:\python36\lib\site-packages\pipenv\utils.py", line 1108, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "c:\python36\lib\site-packages\pipenv\utils.py", line 833, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Could not find a version that matches pyhook (from pyuserinput==0.1.11->-r C:\Users\lei\AppData\Local\Temp\pipenvropv8m4_requirements\pipenv-rly3dllt-constraints.txt (line 14))
No versions found
Was https://pypi.tuna.tsinghua.edu.cn/simple reachable?

pyuserinput install correctly

Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.
If you're on macOS, run the following:
$ pipenv --support | pbcopy

If you're on Windows, run the following:
> pipenv --support | clip

If you're on Linux, run the following:
$ pipenv --support | xclip

It is not Pipenv's fault, pyuserinput depends on pyHook which has no candidates.
https://github.com/PyUserInput/PyUserInput/blob/a45c9a920b44e0952e2bb08e4771b4885dcec1fe/setup.py#L20

It is not Pipenv's fault, pyuserinput depends on pyHook which has no candidates.
https://github.com/PyUserInput/PyUserInput/blob/a45c9a920b44e0952e2bb08e4771b4885dcec1fe/setup.py#L20


[Hotfix][CI] fix deadlink

Purpose of this pull request

Check list

[ ] Code changed are covered with tests, or it does not need tests for reason:
[ ] If any new Jar binary package adding in your PR, please add License Notice according
New License Guide
[ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
[ ] If you are contributing the connector code, please check that the following files are updated:

Update change log that in connector document. For more details you can refer to connector-v2
Update plugin-mapping.properties and add new connector information in it
Update the pom file of seatunnel-dist

https://github.com/apache/incubator-seatunnel/pull/3625/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5，I had changed these files

https://github.com/apache/incubator-seatunnel/pull/3625/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5，I had changed these files


Iatr/wait

This PR adds a wait for WAN IP before the attempt to download a certificate.

@alexjhawk ,  testing complete. I confirmed the issue with 1.3.4 and then tested that 1.3.5 will wait for WAN connection on a cellular device.
here is 1.3.4

and here is 1.3.5


restructure views

restructured views by adding folders user, portfolio, and game
deleted all HTML files since we are not using them


Remark plugin using TypeScript

📚 Subject area/topic
Recipes
📋 Suggested page
We have a recipe for a Remark plugin that would add the modified time to the Astro frontmatter.
https://github.com/withastro/docs/blob/e20c47fa0726207051b00aa26269ff2066420027/src/content/docs/en/recipes/modified-time.mdx
This recipe uses JavaScript and does not contain types.
📋 General description or bullet points (if proposing new content)
A plugin written in TypeScript would be help TS users.
🖥 Reproduction of code samples in StackBlitz
No response

Thank you for mentioning this! We do have plans to add more TypeScript examples throughout the docs. Right now, we have focused on all examples using JavaScript only so that they are most accessible to all our users, even the ones not using TypeScript.
We do also want to show TypeScript alternatives for many pages, and we appreciate hearing that this would be valuable for you! I am closing this as an issue, since we will be planning to review our documentation to better support TypeScript, and thank you for letting us know your preference!


Error running terraformer-google: fork/exec : no such file or directory

/opt/terraformer/terraformer-google import google --resources="*" --projects=project --regions=us-central1
google importing project project region us-central1
Attempting an import of ALL resources in google
fork/exec : no such file or directory
Linux version: Linux 5.11.0-41-generic #45~20.04.1-Ubuntu x86_64 x86_64 x86_64 GNU/Linux

Hi @webpwnized ,
This is the missing terraform google provider plugin problem afaik. (at least I had similar issue with aws)
So basically you need to get google terraform provider plugin in place either using terraform init or manually unzip it to dir ~/.terraform.d/plugins/linux_amd64 (this is for linux).
Cheers, Zoltan


Wiki

https://github.com/sctb/lumen/wiki redirects to https://github.com/sctb/lumen
Some sort of wiki might be important.  Want to change the project settings to make https://github.com/sctb/lumen/wiki available?
It's a pretty big commitment, though.  Maybe I should create an unofficial wiki elsewhere, which the project links to?
FWIW, I'm volunteering to maintain the wiki.  But if I get hit by a bus, suddenly you'll have a wiki to worry about.  So it's up to you.

Outline of planned wiki content:

Benchmark comparisons

Examples of projects built with Lumen

Quickstart: a "hello, world" console app; how to deploy it to npm

Tutorial: Writing a webserver using Node's http module; how to deploy using Heroku

Troubleshooting: Illustrate various common (but unexpected) corner cases I've run into, show why they happen

Contribution guidelines:  What's expected of a pull request.
"Run this script which rebuilds Lumen 3 times on all three hosts,"
maybe some tooling to measure performance regressions introduced by the PR.

Community:
Where to seek help
(chatrooms,  mailing lists)

Current work that would be valuable to do
Documentation, walkthroughs
Translate the Computer Language Benchmarks Game benchmarks into Lumen equivalents

Some commentary about working with "foreign" code
How to import an npm module
How to use luajit to interface with C
How to work with luvit

This sounds like a good idea for an unofficial (for now) wiki.


docs: adding missing commas to config setup examples

Noticed these commas were missing while doing some copy-pasting, they are in place correctly in lua/trouble/config.lua

Development on the main branch is EOL.
Trouble has been rewritten and will be merged in main soon.
For more info, see https://github.com/folke/trouble.nvim/tree/dev


Infinity for Reddit is using Markwon! awesome

Please provide the following:

Infinity for Reddit
https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforreddit
https://play-lh.googleusercontent.com/m6jSo9ki-Vga40SDj0bJrZHW7ma0h56EtNPfoNqYjzW_ehlrXodWpBsK8f_IH1p3VA=s180-rw
🙌

I did not find a way to label this issue as "awesome".

Awesome!

Awesome!


Support parallel evaluation on CUDA systems

When attempting to run parallel batch recommendation on CUDA-enabled systems, it fails with a CUDA initialization error in the worker process:
Traceback (most recent call last):
  File "/home/MICHAELEKSTRAND/mambaforge/envs/lkimp/lib/python3.10/concurrent/futures/process.py", line 246, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/home/MICHAELEKSTRAND/mambaforge/envs/lkimp/lib/python3.10/concurrent/futures/process.py", line 205, in _process_chunk
    return [fn(*args) for args in chunk]
  File "/home/MICHAELEKSTRAND/mambaforge/envs/lkimp/lib/python3.10/concurrent/futures/process.py", line 205, in <listcomp>
    return [fn(*args) for args in chunk]
  File "/home/MICHAELEKSTRAND/mambaforge/envs/lkimp/lib/python3.10/site-packages/lenskit/util/parallel.py", line 130, in _mp_invoke_worker
    return __work_func(model, *args)
  File "/home/MICHAELEKSTRAND/mambaforge/envs/lkimp/lib/python3.10/site-packages/lenskit/batch/_recommend.py", line 19, in _recommend_user
    res = algo.recommend(user, n, candidates)
  File "/home/MICHAELEKSTRAND/LensKit/lenskit-implicit/lenskit_implicit/implicit.py", line 69, in recommend
    recs, scores = self.delegate.recommend(uid, matrix, N=i_n)
  File "/home/MICHAELEKSTRAND/mambaforge/envs/lkimp/lib/python3.10/site-packages/implicit/gpu/matrix_factorization_base.py", line 87, in recommend
    ids, scores = self.knn.topk(
  File "/home/MICHAELEKSTRAND/mambaforge/envs/lkimp/lib/python3.10/site-packages/implicit/gpu/matrix_factorization_base.py", line 122, in knn
    self._knn = implicit.gpu.KnnQuery()
  File "_cuda.pyx", line 47, in implicit.gpu._cuda.KnnQuery.__cinit__
RuntimeError: cublas error: CUBLAS_STATUS_NOT_INITIALIZED (/tmp/pip-req-build-b0ax806a/implicit/gpu/knn.cu:87)

Tagging @benfred in case he has any insight here.
Things to test

[ ] Deserializing in a new process with no concurrency involved

The line where its failing is on initializing CUBLAS CHECK_CUBLAS(cublasCreate(&blas_handle));
Whats the GPU memory usage like when running this? According to https://discuss.pytorch.org/t/cuda-error-cublas-status-not-initialized-when-calling-cublascreate-handle/125450 - this call can fail if there is insufficient GPU memory available

It also might be worth trying out multiprocessing.set_start_method("spawn") - https://pytorch.org/docs/stable/notes/multiprocessing.html#cuda-in-multiprocessing

@benfred Already doing that :) (although through a more indirect method — process pools are set up with a custom context that inherits from multiprocessing's SpawnContext).

I'm going to go ahead and cut an initial release without this, so I can get this released and have (rough) 0.14 parity before working on more substantial LensKit 0.15 changes.

It's currently running correctly in my perf-monitor project, so this might be fixed.


Update OptimiseAlgebra to comply with recent Matlab versions

Matlab warns that support for variable names that are not allowed will be removed. SF(2) is not allowed as a variable name, so it has been renamed to SF_l_2_r_ to comply. Mcode is correctly restored as SF(2).

@flyingk  Thank you for the solution three years ago, which makes me work fine in matlab2018/2019
:+1:  :1st_place_medal:


Obtain currentInput length

Thanks for the nifty plugin!
I was wondering if there is any way I can obtain the length of the currentInput or 'character count left' value from the onSafeCount() or onOverCount() functions?
Right now, when the counter is over the limit it displays a negative value. I would want to obtain the value and display it as a positive with a changed message, such as: '5 characters over the limit' rather than '-5 characters left'.
Thanks in advance!

Sorry to re-open but are you asking for us (the people) to add this to your (core) code or is do you have the ability to add plugins to maxlength?


I am chanadu

Closes: #1
updated validations.py python script
Fixed the behaviour of validate_user function in validations.py.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

@googlebot I signed !


Setup tests in presence tracker

AB#1055

closing in favor of https://github.com/microsoft/FluidFramework/pull/16274


Custom metrics?

Are the metrics gathered by this extension "custom metrics" and thus potentially subject to charges (after a certain level) from April 2019?
https://azure.microsoft.com/en-us/pricing/details/monitor/
This statement seems to suggest that that would be the case:
"Publish custom metrics from your Windows virtual machines using Windows Diagnostic Extension (WAD)."
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-collection#sources-of-metric-data
Perhaps this is in the backlog already but if that is correct, please update this and the Linux page to indicate that the collection of these metrics may not be free.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 1004d268-8e8b-a08c-f31d-5b099cb38132
Version Independent ID: 732f5f54-eb4b-97f3-a46a-d07825bd3e34
Content: Use Azure PowerShell to enable diagnostics on a Windows VM
Content Source: articles/virtual-machines/extensions/diagnostics-windows.md
Service: virtual-machines-windows
GitHub Login: @sbtron
Microsoft Alias: saurabh

@Karishma-Tiwari-MSFT this should be assigned to @anirudhcavale

@dcbrown16 so yes, they will flow as custom metrics and be chargeable. The pricing has not gone into effect yet, and that April 2019 date should have been updated to reflect a much later date (Q4 of CY 2019)

Thanks @anirudhcavale . The pricing page has been updated to December since then.
I think it would be useful to indicate on this page that these are considered custom metrics, particularly given that this is something of a change from the classic metrics setup iirc.

We are currently closing out long standing backlog in order to better determine which issues are still valid and which have been addressed. If you are still seeing a specific problem with this document please open a new issue so we can properly assign the feedback to the correct author and get it addressed ASAP.
#please-close


Have Channel Overrides Return Null Instead of Throwing NullPointerException

Hey, this is just a quick suggestion. Often I find it hard to code when everything I'm trying to work with throws a NullPointerException. I wish the stuff in channel overrides would instead return null so the api itself is easier to work with. Let me know if this is possible.

You completely ignored the issue template and your description is too vague to understand. I have no idea what you are talking about when all you use to describe your issue is "stuff in X throws Y". Providing a stack trace and related code would make the issue usable.

Since this is neither a bug report nor a feature request I advice you to ask for support in our discord server instead. Invite
If you disagree, feel free to open a proper issue with enough information to interpret as a bug report or feature request.


Cannot create tray Error: Cannot find build dir

Added the repository via dnf and installing the latest joplin package (version: 1.7.11-1.fc33.taw.x86_64).
Then started joplin, but it gets an exception and is not starting.
OS: Fedora 33
Error:
Cannot create tray Error: Cannot find build dir
    at ElectronAppWrapper.buildDir (/usr/share/org.joplinapp.joplin/desktop/resources/app.asar/ElectronAppWrapper.js:232:23)
    at ElectronAppWrapper.createTray (/usr/share/org.joplinapp.joplin/desktop/resources/app.asar/ElectronAppWrapper.js:252:43)
    at electron/js2c/browser_init.js:213:7789
    at IpcMainImpl.<anonymous> (electron/js2c/browser_init.js:213:4246)
    at IpcMainImpl.emit (events.js:310:20)
    at WebContents.<anonymous> (electron/js2c/browser_init.js:157:8848)
    at WebContents.emit (events.js:310:20)
Cannot create tray Error: Cannot find build dir
    at ElectronAppWrapper.buildDir (/usr/share/org.joplinapp.joplin/desktop/resources/app.asar/ElectronAppWrapper.js:232:23)
    at ElectronAppWrapper.createTray (/usr/share/org.joplinapp.joplin/desktop/resources/app.asar/ElectronAppWrapper.js:252:43)
    at electron/js2c/browser_init.js:213:7789
    at IpcMainImpl.<anonymous> (electron/js2c/browser_init.js:213:4246)
    at IpcMainImpl.emit (events.js:310:20)
    at WebContents.<anonymous> (electron/js2c/browser_init.js:157:8848)
    at WebContents.emit (events.js:310:20)

Do you maybe know a solution?

This is a very old issue. Apologies. Closing because I suspect it is a moot point.


More og improvements

Fixing an incorrect site name tag (apologies!)
Example of a custom share title and description on project#show

Closing this since #17 was similar and more comprehensive. Thank you, and if I missed something please let me know!


[Feature]: Plausible deniability

Library name
No response
Describe your feature request
Please extend the plausible deniability feature of the wallets ( https://www.ledger.com/academy/passphrase-an-advanced-security-feature ) into ledger Live. Like requested here (why didn't this feature request get migrated?): https://github.com/LedgerHQ/ledger-live-desktop/issues/954
Reasoning: The passphrase feature is useless if the $5 wrench attacker forces you to open ledger live. Deleting accounts every time is cumbersome if you have a lot of them, requires dicipline a lot of people lack, and on-disk traces might remain after deletion (altough I didn't check this).
Possible solutions:

Multipe passphrases, each connected to different ledger accounts. Just like the pin codes. A best practice could be a 'daily' account with little capital, and a 'savings' account with more capital. Either on the same ledger device using passphrases, or on another.
Option to not persistently sync certain accounts, like the 'savings' account the attacker shouldn't know. So there is no indication of another account on disk
Entering the 'savings' password should trigger a sync, which should take place in-memory
Alternative: On-disk syncs may be an option as well, as long as plausible deniability is intact. Perhaps encrypt the data per-account using the account password, so it can't be distinguished from random data. Necessary to always write some amount of random data in that case though, so the mere precense of random data doesn't indicate the existence of another account.

Would be an awsome security feature if you'd ask me.

pointless response from Ledger - just use Trezor, does this out of the box

Cool! Between this complete missing important feature and the way Ledger is handling the community over the last 6 months...
Guess I'm looking for a new HW wallet.


Add mirrors for bottles

There seems to be some issue with downloading the bottles from archive.org. The system continues with source downloads, so this is not a blocker. However, it now takes a while, so its a bit annoying.
One example below, but similar errors for all bottles on archive.org
==> Downloading http://archive.org/download/julialang/bottles/libtasn1-3.4.snow_leopard_or_later.bottle.tar.gz

curl: (22) The requested URL returned error: 503
Warning: Bottle installation failed: building from source.
==> Downloading http://ftpmirror.gnu.org/libtasn1/libtasn1-3.4.tar.gz

We don't use archive.org anymore, and AWS has been stable enough that I'm going to close this.


namecoin: 22.0 -> 23.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/namecoin/versions.
meta.description for namecoin is: "Decentralized open source information registration and transfer system based on the Bitcoin cryptocurrency"
meta.homepage for namecoin is: "https://namecoin.org"
meta.changelog for namecoin is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 23.0 with grep in /nix/store/68d4yc7rshvnj25rg6hrfgqh4y8y8x40-namecoin-23.0
found 23.0 in filename of file in /nix/store/68d4yc7rshvnj25rg6hrfgqh4y8y8x40-namecoin-23.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath
namecoin
namecoind

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/68d4yc7rshvnj25rg6hrfgqh4y8y8x40-namecoin-23.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A namecoin https://github.com/r-ryantm/nixpkgs/archive/5df71839356aea71eda60b8b8bd12c18c2dce701.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/68d4yc7rshvnj25rg6hrfgqh4y8y8x40-namecoin-23.0
ls -la /nix/store/68d4yc7rshvnj25rg6hrfgqh4y8y8x40-namecoin-23.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

namecoin
namecoind

Maintainer pings
cc @infinisil for testing.

Result of nixpkgs-review pr 185338 run on x86_64-linux 1

2 packages built:

namecoin
namecoind


issues/157

Thank you for contributing to naz.
Every contribution to naz is important.
Contributor offers to license certain software (a “Contribution” or multiple
“Contributions”) to naz, and naz agrees to accept said Contributions,
under the terms of the MIT License.
Contributor understands and agrees that naz shall have the irrevocable and perpetual right to make
and distribute copies of any Contribution, as well as to create and distribute collective works and
derivative works of any Contribution, under the MIT License.
Now,
What(What have you changed?)

Why(Why did you change it?)

References:

Codecov Report

Merging #161 into master will decrease coverage by 0.2%.
The diff coverage is 60%.

@@            Coverage Diff             @@
##           master     #161      +/-   ##
==========================================
- Coverage   86.49%   86.29%   -0.21%
==========================================
  Files          14       14
  Lines        1311     1321      +10
==========================================
+ Hits         1134     1140       +6
- Misses        177      181       +4

Impacted Files
Coverage Δ

naz/log.py
87.2% <60%> (-3.59%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1572086...f1300e4. Read the comment docs.


FIX: Fix search icons displayed outside with small base font size

When --pst-font-size-base is small (i.e. 12px) the search icons (magnifying-glass and keyboard shortcut hint) could appear outside the search bar because their positions did not take the negative margins of their parent container into account.
Use css calc() to include it now.
TBH I don't know why a padding + negative margin is employed on the form element. Online I found that this technique can be used to make just one element (like a header) not constrained by the padding, but here there is only one child element (the <form>). The commit history doesn't help either since the stylesheet had this since it's first version.
Before (300% zoom + --pst-font-size-base: 0.33rem to exaggerate the problem):

After:

I also have no idea why the container has padding + negative margin.  The resultant CSS is... complicated to say the least. Are you willing to try to simplify this bit of CSS, or are you happy to just have it looking good again?

Are you willing to try to simplify this bit of CSS (i.e., get rid of the negative margins and adjust what's left accordingly), or are you happy to just have it looking good again?

Sure I have checked it out before that it would work, just didn't know if there was any other reason why it was the way it was. See latest commit

@Maetveis you'll need to merge in current main to get the CIs to pass.  I tried doing it for you by pushing to your branch but got permission denied.

@Maetveis you'll need to merge in current main to get the CIs to pass. I tried doing it for you by pushing to your branch but got permission denied.

I don't remember disabling the allow pushes option on the PR, anyway done now, thanks.

I don't remember disabling the allow pushes option on the PR

in my experience sometimes it just doesn't work for unknown reasons. Thanks for the fix!


Cleanup unnecessary @staticmethod annotations

Context: https://github.com/quantumlib/Cirq/pull/3322#discussion_r488871057

@balopat I'd like take this up.

Hi @shouri007 - thank you for taking this up, it's yours! Regarding mac we don't have the instructions but we do have a task to document it - I'm working on a mac myself - it is definitely possible. If you're interested taking that up as well, let me know - otherwise if you get stuck (I just use venv personally and pip install -r requirements.txt -r cirq/contrib/contrib-requirements.txt -r dev_tools/conf/pip-list-dev-tools.txt  on python 3.8 + PyCharm, it should work pretty seemlessly) also let me know.

Should changes be made everywhere @staticmethod is used?

Yes, I believe so!

Wouldn't this be a pretty big breaking change?  For example, all calls to CircuitDag.make_node would need to be changed to make_node.  Personally I like module functions more than static methods, but do you feel comfortable with going forward with this?

Here's an option: we clean up all of the private functions that start with "_".  That way we can feel safer that people using Cirq won't be broken.  But if you feel comfortable just changing them all over, I can implement the refactor.

There is a @deprecated annotation cirq uses for depreciating things over time, to reduce breakages. Not sure what the policy is for private functions. It may be a judgment call, case by case.

I'm willing to add @deprecated to all of the public static methods.  Do you think I should?

@deprecated should be the way to go for all public ones, for private ones we can just break them, people should not depend on private method.

We probably want to retain discoverability associated with having most names at the top level.
There are at least two ways of eliminating @staticmethod: make them @classmethod when appropriate, turn them into module-level functions. It's quite possible that a significant fraction of our @staticmethod actually qualify for the former treatment.

The PR to refactor the private methods is ready (https://github.com/quantumlib/Cirq/pull/4231).   As far as @classmethod is concerned, check out this quote from the styleguide:
Use classmethod only when writing a named constructor or a class-specific routine that modifies necessary global state such as a process-wide cache.
It seems that since static methods don't "modif[y] necessary global state", the styleguide suggests that we should not refactor them into class methods.
I feel like the remaining work (if any) associated with this bug will require a pretty deep level of familiarity with the concerns of the remaining static methods.  So I suggest we remove the "good first issue" tag.

Thanks @thanacles - that's a fair assessment!

This was partially cleaned up a while ago.  Remaining references are not going to get cleaned up due to backwards compatibility issues.  Closing this issue.


Revert "startup: improve speed of syncing CRDs"

This reverts commit https://github.com/cilium/cilium/pull/28954.
This commit seems to be causing a lot of errors in CI:
2023-11-09T02:07:05.175239647Z level=error msg=k8sError error="github.com/cilium/cilium/pkg/k8s/resource/resource.go:725: Failed to watch *v2.CiliumEndpoint: failed to list *v2.CiliumEndpoint: the server could not find the requested resource (get ciliumendpoints.cilium.io)" subsys=k8s
2023-11-09T02:07:05.175585081Z level=error msg=k8sError error="github.com/cilium/cilium/pkg/k8s/resource/resource.go:725: Failed to watch *v2.CiliumNode: failed to list *v2.CiliumNode: the server could not find the requested resource (get ciliumnodes.cilium.io)" subsys=k8s
2023-11-09T02:07:05.176117013Z level=error msg=k8sError error="github.com/cilium/cilium/pkg/k8s/resource/resource.go:725: Failed to watch *v2.CiliumEgressGatewayPolicy: failed to list *v2.CiliumEgressGatewayPolicy: the server could not find the requested resource (get ciliumegressgatewaypolicies.cilium.io)" subsys=k8s
2023-11-09T02:07:06.614265449Z level=error msg=k8sError error="github.com/cilium/cilium/pkg/k8s/resource/resource.go:725: Failed to watch *v2.CiliumEgressGatewayPolicy: failed to list *v2.CiliumEgressGatewayPolicy: the server could not find the requested resource (get ciliumegressgatewaypolicies.cilium.io)" subsys=k8s
2023-11-09T02:07:06.617144774Z level=error msg=k8sError error="github.com/cilium/cilium/pkg/k8s/resource/resource.go:725: Failed to watch *v2.CiliumEndpoint: failed to list *v2.CiliumEndpoint: the server could not find the requested resource (get ciliumendpoints.cilium.io)" subsys=k8s
2023-11-09T02:07:06.655788942Z level=error msg=k8sError

/test


"OverflowError: string longer than<PHONE_NUMBER> bytes" when trying requests.put

Hi,
I'm trying to upload a file that weight about 3GB and I'm getting the following error:
"OverflowError: string longer than<PHONE_NUMBER> bytes"
If I understand correctly it seems like there's a 2GB limit? didnt manage to find any reference to such limiation or how to bypass it (if possible).
The code i'm using is:

datafile = 'someHugeFile'
with open(datafile, 'rb') as myfile:
    args = myfile.read()
resp = requests.put(url, data=args, verify=False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/requests-2.3.0-py2.7.egg/requests/api.py", line 99, in put
    return request('put', url, data=data, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests-2.3.0-py2.7.egg/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests-2.3.0-py2.7.egg/requests/sessions.py", line 456, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests-2.3.0-py2.7.egg/requests/sessions.py", line 559, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests-2.3.0-py2.7.egg/requests/adapters.py", line 327, in send
    timeout=timeout
  File "/usr/local/lib/python2.7/site-packages/requests-2.3.0-py2.7.egg/requests/packages/urllib3/connectionpool.py", line 493, in urlopen
    body=body, headers=headers)
  File "/usr/local/lib/python2.7/site-packages/requests-2.3.0-py2.7.egg/requests/packages/urllib3/connectionpool.py", line 291, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python2.7/httplib.py", line 995, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/lib/python2.7/httplib.py", line 1029, in _send_request
    self.endheaders(body)
  File "/usr/local/lib/python2.7/httplib.py", line 991, in endheaders
    self._send_output(message_body)
  File "/usr/local/lib/python2.7/httplib.py", line 844, in _send_output
    self.send(msg)
  File "/usr/local/lib/python2.7/httplib.py", line 820, in send
    self.sock.sendall(data)
  File "/usr/local/lib/python2.7/ssl.py", line 234, in sendall
    v = self.send(data[count:])
  File "/usr/local/lib/python2.7/ssl.py", line 203, in send
    v = self._sslobj.write(data)
OverflowError: string longer than<PHONE_NUMBER> bytes

For smaller files this code works fine for me.

Rather than reading the entire file and sending it across in a single request, would it be possible for you to use chunked transfer encoding? http://docs.python-requests.org/en/latest/user/advanced/#chunk-encoded-requests

This limitation is in httplib. You can easily avoid it by slightly changing your code:
datafile = 'someHugeFile'
with open(datafile, 'rb') as myfile:
    resp = requests.put(url, data=myfile, verify=False)

@Lukasa that's inaccurate. The traceback comes from an SSL wrapped socket. This has nothing to do with httplib from what I can see. OverflowErrors are raised when a value is larger than the underlying C integer size allowed. This can be seen if you call len(something_larger_than_four_gb) on a 32 bit system.

Unfortunately it looks like it cannot be avoided when you do a POST request with several headers. Then the file (or the files) is always read completely.
It would be great when this could be avoided in requests since I often have to send files which are longer than the available main memory on the system.

I'm just gonna chime in.
If you're trying to send files via the Web that are larger than your
systems memory can handle, HTTP probably isn't the best protocol to do this
via.
On Tue, 11 Oct 2016, 5:54 AM Erik Tews<EMAIL_ADDRESS>wrote:

Unfortunately it looks like it cannot be avoided when you do a POST
request with several headers. Then the file (or the files) is always read
completely.
It would be great when this could be avoided in requests since I often
have to send files which are longer than the available main memory on the
system.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/kennethreitz/requests/issues/2717#issuecomment-252729478,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGk_7XIpx0UDRPXDuoopI7jDSfAlurgLks5qypf7gaJpZM4FqFGb
.

That's true, but I don't get to decide on the protocol and endpoint.
Doing the request with curl works fine, and as a workaround, I'm currently printing a curl command to STDOUT so that the user can launch it.

@eriktews can you share how you're doing the upload? There are ways to stream uploads (like Lukasa's comment shows). Is there a reason you cannot do that (if you are not already trying that)? Also, can you provide your actual traceback?

So the comment from Lukasa seems to work when you are uploading a single file, then you can do a streaming upload. But I have to do a normal post request with several variables in the data part and the file as a part of a multipart upload.
There is an API documentation at https://canvas.instructure.com/doc/api/file.file_uploads.html which shows a curl command in the "Step 2" section. Basically I wanna replicate that call with the requests package in streaming mode.
I don't have the traceback at the moment, but when I get it, I will post it here.

Have you tried using the MultipartEncoder from the requests-toolbelt? That allows you to stream multipart/form-data uploads like doing an upload of a single file. It was written specifically for this use case and was added to our docs.

No, but that looks like right what I need. I will give it a try and see whether this works. I didn't know about the toolbelt package at all, so maybe you should reference it in the normal requests package documentation.

so maybe you should reference it in the normal requests package documentation.

It is :)

@Lukasa 's method does not work - even with httplib off the signing still happens for the transport itself.  In my case I have a 2GB+ POST request (not a file, just POST data).  This is for an elasticsearch bulk update.  The endpoint only has HTTPS so I'm working through other solutions now.
Traceback (most recent call last):
  File "/var/virtualenvs/centr/lib/python3.5/site-packages/elasticsearch/connection/http_requests.py", line 75, in perform_request
    timeout=timeout or self.timeout, verify=False)
  File "/var/virtualenvs/centr/lib/python3.5/site-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/var/virtualenvs/centr/lib/python3.5/site-packages/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/var/virtualenvs/centr/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/var/virtualenvs/centr/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 356, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.5/http/client.py", line 1106, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 936, in _send_output
    self.send(message_body)
  File "/usr/lib/python3.5/http/client.py", line 908, in send
    self.sock.sendall(data)
  File "/usr/lib/python3.5/ssl.py", line 891, in sendall
    v = self.send(data[count:])
  File "/usr/lib/python3.5/ssl.py", line 861, in send
    return self._sslobj.write(data)
  File "/usr/lib/python3.5/ssl.py", line 586, in write
    return self._sslobj.write(data)
OverflowError: string longer than<PHONE_NUMBER> bytes

Sorry, can you demonstrate your code please?

This should throw the error:
datafile = 'someHugeFile'
with open(datafile, 'rb') as myfile:
    r = requests.post(endpoint, data={'key': myfile.read()}, verify=False)

If endpoint is https then ssl will have to process the payload.  I wonder if requests or requests-toolbelt could have an option to do the signature with some other library that doesn't die when signing a 2GB string.  Of course, I would say that people shouldn't be signing such large things but it's definitely a real crash that's happening in the real world.

@adamn That was not my proposed solution. My proposed solution was to not read the file in manually at all. You are bumping into the same error as before, which is that we are sending a single gigantic string to httplib.
This is a behaviour we can fix: if we spot someone uploading a gigantic single string via Python then we can resolve it. But at this point I strongly recommend you use an intermediary file object: either one on disk, or by doing the urlencoding yourself and wrapping the result in a BytesIO.

I've already come up with a workaround so won't be able to dig deeper into this unfortunately.  I still suspect that the SSL payload needs to be signed/encrypted so the same thing will happen regardless of whether there is a file object or not since the exception is raised by ssl.write itself and I presume that method needs the entire payload.  Chunking the POST seems like the only real option.  Anyway, thanks for the help.

@adamn No, that's not necessary. TLS uses stream encryption, it does not need the entire payload at once.
What you're missing is that when given a file object, requests will automatically stream it in smaller chunks (specifically, 8192 kb chunks). Those cause no problem.

Sorry to comment on an old issue, but this looks similar to an issue we've run into and I'm trying to decide whether it's worth opening a new issue for it.
Again, requests.put where data is a huge string doesn't work, but we don't get an error. requests just hangs sending; a packet capture shows that no more data is being sent.
This behaviour is worse that an exception being raised.

Has the remote peer been ACKing at the TCP level? Is it still reading from the receive buffer? Has it TCP FIN'd?

Yes, the remote end is sending ACKs appropriately, no FIN or anything like that.
In fact, if you have a large file f, we see the problem if you do requests.put(url, data=f.read()) but not if you do requests.put(url, data=f). Obviously if we have a file handle, we wouldn't bother to call read on it, but the point is that both calls are supposed generate the same request, and a packet capture shows that they do up until the point at which one stops sending packets.

Hrm. Is it possible for you to put together a small repro scenario? Do you see the same effect with other hosts?

As luck would have it, I have already done so.
Github doesn't seem to want to let me attach files, so:
#!/usr/bin/env python

import requests

MB = 1024 ** 2
GB = MB * 1024

if __name__ == '__main__':
    data = 'x' * 4 * GB
    resp = requests.put('http://localhost:8000', data=data)
    print resp

And a server to run it against:
#!/usr/bin/env python

import BaseHTTPServer
import logging

READ_CHUNK = 1024 ** 2

class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
    def do_PUT(self):
        logging.info("PUT request recieved")
        for header, value in self.headers.items():
            logging.info("header: %s = %s", header, value)

        length = int(self.headers['Content-Length'])

        logging.info("Content length %s, getting content...", length)

        while length:
            to_read = min(length, READ_CHUNK)
            logging.info("reading %s bytes...", to_read)
            self.rfile.read(to_read)
            length -= to_read

        logging.info("Recieved content")

        self.send_response(200)

def run(server_class=BaseHTTPServer.HTTPServer):
    server_address = ('', 8000)
    httpd = server_class(server_address, Handler)
    httpd.serve_forever()

if __name__ == '__main__':
    logging.basicConfig(
        level=logging.DEBUG,
        format="%(asctime)s %(levelname)s: %(message)s",
    )
    logging.debug("Starting server")
    run()

Obviously this isn't the server we were running against when we first encountered this problem :)

Well as a first logical note I should point out that this is necessarily not the same problem as originally reported on this issue, as the original report affected TLS only, as discussed above. :wink: Regardless, let's dig into this a bit.

Ah, sorry. Is it worth me opening a new issue then, or should I just leave it here, since you're already looking at it?

Let's leave it here for now. =)

Huh. That behaves...very oddly. On my machine, over the loopback, I don't see any data sent at all: it's like Requests just gave up on sending it. Further debugging seems to show this is happening at the level of socket.sendall, which for some absurd reason is just not sending the complete response. By "not sending the complete response" I mean socket.sendall is returning early, but demonstrably is not sending all the data.
 The very first thing that socket.sendall does is get the length of the data that was sent into it and shoves it into a C int. Now, this is wrong to begin with: Py_buffer.len is a Py_ssize_t, and sizeof(ssize_t) is frequently larger than sizeof(int).
In fact, it definitely is, since the current Python master has a changed sendall that uses the correct size. This seems to have been cleaned up around Python 3 time as a general "64-bit issue" (see python/cpython@19467d27ff14ebe31978438078ed5a661ffd29fb) in the socket module.
That makes this ultimately a duplicate of CPython issue #18100. This has been open a long time in need of patch review, and given that Python 2.7 is now only getting security fixes I doubt the CPython developers will fix it at this point.
This is a difficult issue for Requests to sensibly police. We can tell when people will definitely hit it (e.g. because the input is a string which a length greater than 2GB), but there are many situations where people will hit it but we can't tell (e.g. because the string plus the headers is greater than 2GB in size, or because there is a different type in use that CPython will treat as "stringish" that is larger than 2GB). So my initial inclination is, given that this is an issue that can be solved by moving to a newer version of Python, and that it can be worked around by not reading gigantic strings into memory (which is a best-practice anyway), and that if we ever move off httplib we'll fix it automatically anyway, I'm inclined to suggest that we probably don't have a huge pressure to resolve the issue? For my part, I think this is getting pretty close to "Dr, it hurts when I do this." "So don't do that then!" territory.
However, I'm willing to be disagreed with here.

The workaround is really simple - just wrap it in StringIO/BytesIO, but when you run into it, it's difficult to diagnose, so any help that requests could give, even if it's just a warning in the documentation, would be appreciated.

I can get behind the idea of a PR that adds a note in the documentation.

Running into the same problem,I dont this thread has an accepted solution,anyone has a solution for this ?

@SpoonMeiser Wrapping the file contents in a BytesIO does not fix the problem on Python 3.6, still raises the exact same error.

I'm having the same basic issue as @gjedeer and see the same behavior as @cmbasnett (that wrapping in BytesIO is not a solution). I'm trying to use a file object to upload something larger than 2GB using a TLS encrypted post. Specifically I'm trying to use a presigned url to upload a file to S3. It appears that the underlying ssl library in python doesn't like files over 2GB. Is there an accepted workaround to this? Stack trace:
Basic code:
 with open(self.path_to_data, 'rb') as f:
    fields = 'defined elsewhere...'
    files = {'file': f}
    request('post', url, data=fields, files=files)

Traceback (most recent call last):
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/bin/mds", line 11, in <module>
    load_entry_point('mdscli', 'console_scripts', 'mds')()
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/coltonhicks/dev/mds_cli/mdscli/cli.py", line 133, in upload_member_data
    uploader.main()
  File "/Users/coltonhicks/dev/mds_cli/mdscli/upload_member_data.py", line 30, in main
    self.client.upload_member_data(self.mida, self.data_type, f)
  File "/Users/coltonhicks/dev/mds_cli/mdscli/requests_client.py", line 300, in upload_member_data
    logger.info(
  File "/Users/coltonhicks/dev/mds_cli/mdscli/requests_client.py", line 186, in _request
    res = requests.request(method, url, data=data, files=files)
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
    chunked=chunked)
  File "/Users/coltonhicks/.virtualenvs/mds_cli-AtYG3_5U/lib/python3.7/site-packages/urllib3/connectionpool.py", line 355, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1055, in _send_output
    self.send(chunk)
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 977, in send
    self.sock.sendall(data)
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1015, in sendall
    v = self.send(byte_view[count:])
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 984, in send
    return self._sslobj.write(data)
OverflowError: string longer than<PHONE_NUMBER> bytes

Regarding the newer (since 2018) questions for a solution here:
The workaround using requests-toolbelt works for me in Python 3.8.
The requests-code to upload was the following:
requests.request(method, url, *args, **kwargs)
...with the kwargs being:
{'files': {'file': ({filename}', <_io.BufferedReader name='{filepath}'>), 'parent_dir': '/bert_files/bert_models'}, 'headers': {'Authorization': 'Token {token}'}}.
Wrapping it like this:
m = MultipartEncoder(
    fields={'file': (kwargs['files']['file'][1].name, open(kwargs['files']['file'][1].name, 'rb'), 'text/plain'),
            'parent_dir': kwargs['files']['parent_dir']}
)
del kwargs['files']
kwargs['data'] = m
kwargs['headers']['Content-Type'] =  m.content_type

...leading to these kwargs:
{'headers': {'Authorization': 'Token {token}', 'Content-Type': 'multipart/form-data; boundary={boundary}'}, 'data': <MultipartEncoder: {'file': ('filename', <_io.BufferedReader name={filepath}'>, 'text/plain'), 'parent_dir': '{parent_tir}'}>}
Like this it worked perfectly for me.


Add new Public Engagement opportunities page and button to the site

Tasks

[ ] create new page with component
[ ] see if USWDS component can support mock
[ ] create new button component (may want to refactor existing component) to support both button types
[ ] add button to each page
[ ] add test
[ ] test on mobile
[ ] testing on staging
[ ] testing on prod

![march_10](https://user-images.githubusercontent.com/77702996/156650054-1b728589-9125-490f

-a75a-5e6757066cab.svg)


[BUG] Connection via pycromanager failing

Running on Windows 11 with Anaconda, had to install with modified napari:
pip install recOrder-napari[acq]==0.4.2rc1
recOrder opens just fine now but does not connect to MicroManager which I have running an old Olympus IX81 body along with a TSI Thorlabs CS135MUN camera.
Already checked that I have enabled port 4827 for pycromanager.
I tried changing the order in which I open micromanager and napari w/ recOrder and consistently get the same error:
Exception ignored in: <function _JavaObjectShadow.__del__ at 0x000001AB444B7BE0> Traceback (most recent call last):   File "C:\Users\cortesadmin\anaconda3\envs\recOrder\lib\site-packages\pycromanager\zmq_bridge\_bridge.py", line 639, in __del__     self._close()   File "C:\Users\cortesadmin\anaconda3\envs\recOrder\lib\site-packages\pycromanager\zmq_bridge\_bridge.py", line 563, in _close     self._send(message)   File "C:\Users\cortesadmin\anaconda3\envs\recOrder\lib\site-packages\pycromanager\zmq_bridge\_bridge.py", line 577, in _send     return self._get_bridge()._send(message)   File "C:\Users\cortesadmin\anaconda3\envs\recOrder\lib\site-packages\pycromanager\zmq_bridge\_bridge.py", line 325, in _send     return self._main_socket.send(message, timeout=timeout)   File "C:\Users\cortesadmin\anaconda3\envs\recOrder\lib\site-packages\pycromanager\zmq_bridge\_bridge.py", line 116, in send     raise Exception("Tried to send message through socket {}, which is already closed".format(self._port)) Exception: Tried to send message through socket 4827, which is already closed Exception ignored in: <function _JavaObjectShadow.__del__ at 0x000001AB444B7BE0> Traceback (most recent call last):   File "C:\Users\cortesadmin\anaconda3\envs\recOrder\lib\site-packages\pycromanager\zmq_bridge\_bridge.py", line 639, in __del__     self._close()   File "C:\Users\cortesadmin\anaconda3\envs\recOrder\lib\site-packages\pycromanager\zmq_bridge\_bridge.py", line 563, in _close     self._send(message)   File "C:\Users\cortesadmin\anaconda3\envs\recOrder\lib\site-packages\pycromanager\zmq_bridge\_bridge.py", line 577, in _send     return self._get_bridge()._send(message)   File "C:\Users\cortesadmin\anaconda3\envs\recOrder\lib\site-packages\pycromanager\zmq_bridge\_bridge.py", line 325, in _send     return self._main_socket.send(message, timeout=timeout)   File "C:\Users\cortesadmin\anaconda3\envs\recOrder\lib\site-packages\pycromanager\zmq_bridge\_bridge.py", line 116, in send     raise Exception("Tried to send message through socket {}, which is already closed".format(self._port)) Exception: Tried to send message through socket 4827, which is already closed

Went ahead and did a fresh reinstall of everything just in case. Still getting the same issue. recOrder gui does seem to connect at least partially to MM as it correctly imports the Config Group name from MM for the Meadowlark controller.

recOrder gui does seem to connect at least partially to MM as it correctly imports the Config Group name from MM for the Meadowlark controller.

That's a good sign!
Our most recent successful tests have been with MicroManger nightly build 2023-04-26. Are you using this version? Are you using pycromanager==0.27.2?
Are there any other potential incompatibilities in this table?

Only potential incompatibility I see is Windows 11 rather than 10. I am using the Micromanager nightly build recommended, Only thing I'm unsure of is the version of pycromanager. Is there an easy way to tell? I tried
pycromanager --version
on the console but that doesn't work.

You can find the pycromanager version with pip list | grep pycromanager.
This issue seems related. Are you by chance running in debug mode from an IDE?

You can find the pycromanager version with pip list | grep pycromanager.
This issue seems related. Are you by chance running in debug mode from an IDE?

Haha for some reason 'grep' is not recognized on my Anaconda install... I looked in the micromanager folder and found a file called "PycroManagerJava-0.38.10.jar" if this is the version of pycromanager then I don't have the right one, but when I try to install 0.27.2 by using pip
pip install pycromanager==0.27.2
Terminal tells me that the requirements are already met and it changes PyQT to the incompatible form again...
I'm running Anaconda and using the Anaconda Powershell Prompt with administrator privileges. I don't think I have debug mode enabled on anything unless Anaconda enables it by default. I'd be happy to hop on a zoom call and go through the process with a clean install if you guys have the time to help me figure out where I'm going wrong!

@dbcortes2042000 can you share the following:

your terminal output fom a failed run. Is there anything before what you wrote at the start of this thread?
the output of pip list in the environment that is failing
anything that is printed in the Calibration > Advanced text box while in recOrder's debug mode (open the Calibration > Advanced tab, use the dropdown to select debug mode, then try connecting to MicroManager.

Thanks @dbcortes2042000, this is helpful. I think this narrows the failure to this section.
I see two possible failure modes:

In MicroManager's device property browser, does the LC control box appear as MeadowlarkLcOpenSource or MeadowlarkLC. If MeadowlarkLcOpenSource, can you try removing and re-adding  the device to your config. I expect MeadowlarkLC when you use the latest device drivers.

Did you name your MicroManager group Channel and set up State* presets similar to this documentation.

If (temporarily) renaming your MicroManager "Channel" fixes the issue, then this is a bug. self.mmc.getConfigData("Channel", "State0") should be self.mmc.getConfigData(self.config_group, "State0")

@talonchandler it appears my issue was with the naming of the Meadowlark group. I did not realize it needed to be named "Channel" specifically! Changing the name has allowed recOrder to connect succesfully. Hopefully I won't have any more issues! Thanks so much!


properly destroy agario-client instance

I have multiple connections to a server but when one disconnects I try to connect it a few times but if it fails I attempt to destroy everything about that connection but then sometimes it is still able to connect after that but then it doesn't have a client or anything so it throws an error.

end(); ?

I have contacted u personally, and as far as i could see this is an user-defined code problem.
Has nothing to do with agario-client

@henopied

so it throws an error

Please show this error.


Some (grammar only) updates and improvements

Just making a start on this for the moment - will hopefully get through the other chapters soon.
Love the visNetwork rendering! So cool!
PS This is looking really good so far - very clear and easy to follow introduction and examples!

Thanks for this PR! And, for the good words!


jsonSerialize ignore optional attributes

🐞 Bug Report
$data = [
            'reply_markup' => (new Keyboard(
                [
                    'One',
                    'Two'
                ],
                [
                    'Three',
                    'Four',
                ]
            ))->setResizeKeyboard(true)
        ];

Entity::jsonSerialize() return only raw_data but does not return optional attributes: resize_keyboard, one_time_keyboard, etc...

Can confirm. I'm working on a fix.

This bug has nothing to do with the introduction of jsonSerialize. It was there before.
I fixed it with PR #1304 though. Should be in the next release. Trying to release later today.


How to login both AzureRM and Azure module in Azure PowerShell Task

I had a script that need to dealing Azure Resources mixed with ARM and ASM, I require both AzureRm and Azure in my script.
Although Azure PowerShell task version 3.x have Both Azure And AzureRM modules installed, it only login the AzureRm cmdlets.
Is there a way to let the task login for both?
Otherwise, Is it possible to get credential from AzureRmContext and do login by myself in Azure?

I have also tried Azure Powershell 4.*, looks like it only login Azure CLI for you, and looks like the Azure CLI version doesn't support ASM resources at all.

@melode11 Please accept our apologies for the delay in getting to this issue. It looks like you were working through an issue with your scenario or implementation, rather than an issue with the documentation. Here are a few options where you might consider asking these types of questions in the future:

Azure DevOps on Stack Overflow
Azure DevOps Support Bot


ci: refactor julia/r/conda tests - now ~25 min instead of ~50 min

Previously the CI system took ~50 minutes. The tests in the folders tests/conda, tests/julia, and tests/r all took longer than 25 minutes but are now reduced to about ~25 minutes or less.
There has been very little compromise on existing test coverage, and new test coverage has been gained against new language versions etc.
Change description

Deleted and merged tests
Test coverage is retained well I think, even expanded towards modern versions. Overall the following principles guided what I retained.

oldest - py2, py3.5, r3.6?, julia 1.0.2? (Project.toml buildpack), julia 0.6.4? (REQUIRE buildpack)
See #1192
default - py3.7, r4.2, julia latest (Project.toml buildpack), julia 0.6.4 (REQUIRE buildpack)
See #1190
latest - py3.10, r4.2, julia latest (Project.toml buildpack)
before and after - R with mran and R with rspm, julia environment variables after 1.0+
pinnability - ensure language versions can be pinned
functionality - binder folder, description file, requirements file, etc.

Renamed test folders, updated and coalesced READMEs

Test changes
Changes to tests/conda tests

After
Before
Note

py35-binder-dir
binder-dir py37
Makes an old version the oldest version, and merges in the binder directory test

py310-requirements-file
py38 requirements
Makes a less old version the latest version, and merges in the requirements file test

py2
simple-py2
Renamed

r-postbuild-file
r-unspecified default-env simple r4.0 r4.1
Merges in the postBuild file test (default-env), merges tests of modern R versions into the latest version (r4.0, r4.1), merges tests of the default Python version (simple)

r3.6-target-repo-dir-flag
repo-path r3.6
Merges extra-args.yml file test with r3.6 pinning test

-
channel-dep
A deleted test, testing functionality part of mamba since 0.6 introduced more than two years ago

Changes to tests/r tests

After
Before
Note

r3.6-mran
r3.6
Renamed

r4.0-mran
mran, r4.0
Merges similar tests

r4.0-rspm
r4.0-rspm, r4.1
Merges r4.0 and r4.1,

r-rspm-apt-file
apt, simple
Merges in the apt.txt file test

r-rspm-description-file
description-file
Renamed

Changes to tests/julia tests

After
Before
Note

project
julia_version-default
Merges in the requirements file test

project-1.0.2
julia_version-1.0.2
Renamed

require
julialegacy_version-0.6.3
The default version for require is 0.6.4, and can be used to test the oldest version.

require-1-requirements-file
pyplot-requirements julialegacy_version-1 julialegacy_version-1.0 julialegacy_version-1.1
Merged similar tests

Before

After

To help with review would you mind explaining the overall thoughts behind your changes? For example, what's your thinking behind bumping versions instead of leaving them as they are?
I think we should keep intermediate versions, for example an old bug was included installing the wrong version of R when 4.0 was requested https://github.com/jupyterhub/repo2docker/issues/1077 so this should be kept as a regression test.

@manics I've updated the PR description with a declaration of the principles that has guided me when refactoring this! I think we still cover #1077 in the R buildback by testing both before (mran) and after (rspm) situations.

Sorry for the noise in this PR @manics @yuvipanda, with a lot of force pushes and too early transition from a draft PR to a ready for review PR.
At this point, it is ready for review though!

Thanks for the additional description- it makes sense, though I'm still struggling to review the actual changes. I'm also concerned we're going to loose some of the information on the purposes of individual tests, which is a problem for any future refactoring.
I noticed you added a few READMEs in some tests, what do you think about adding READMEs for each group of tests instead/as well, e.g.
tests/conda/README.md
tests/julia/README.md
tests/r/README.md

where each file describes how the subtests in that directory combines multiple factors, such that they cover all combinations?

I'm still struggling to review the actual changes.

I'm sorry about this, if you have a suggestion on what I can do to help let me know. I have considered breaking apart this refactoring PR into pieces such as one for the conda buildpacks tests, and one for julia, and one for R. Doing that though would make common aspects need to be discussed in separate PRs, such as the README suggestion etc and I figure it wouldn't be very helpful.

I'm also concerned we're going to loose some of the information on the purposes of individual tests, which is a problem for any future refactoring.

Having worked with these files many hours now, I'm quite confident this is an improvement with regards to future refactoring work. The git history will be obfuscated by this refactor, but the documentation surrounding the tests will be accurate and updated. I've been surprised several times by un

I noticed you added a few READMEs in some tests, what do you think about adding READMEs for each group of tests instead/as well, e.g.
tests/conda/README.md
tests/julia/README.md
tests/r/README.md

where each file describes how the subtests in that directory combines multiple factors, such that they cover all combinations?

:100: implemented now!

LET'S GOOOOO! THANK YOU SO MUCH @MANICS AND @CONSIDERATIO!

let it be known that I tried to upper case your usernames too ^ but github autocorrected them


Support ESM

Hi,
More and more tools are using ESM modules and the support is increasing in the community.
Jest support ESM when "type": "module" is present in the package.json.
On Nuxt documentation, every examples for the nuxt.config.js file are in ESM syntaxe.
But when setting up Nuxt with test-utils in ESM, an error is thrown Must use import to load ES Module: /home/node/app/nuxt.config.js because a require is used.
jest.config.js
export default {
  preset: '@nuxt/test-utils',
  transform: {},
};

nuxt.config.js
export default {
  srcDir: 'src/',
};

package.json
{
  "name": "terraforming",
  "type": "module",
  "scripts": {
    "test": "jest"
  },
  "dependencies": {
    "nuxt": "^2.15.7",
  },
  "devDependencies": {
    "@nuxt/test-utils": "^0.2.2",
    "jest": "^27.1.0",
  }
}

$ NODE_OPTIONS=--experimental-vm-modules npm test

Do you have a repo or test setup to share? Usually, you can avoid the experimental options with some tweaks.

@GMartigny Seems like the issue is related with Nuxt’s loadNuxtConfig helper which is used by the test-utils.
Possible workaround:

import your Nuxt config to a test file,
pass it to setupTest,
and add fixture: false, which will make the utils library avoid calling loadNuxtConfig

import { get, setupTest } from '@nuxt/test-utils'
import config from '../nuxt.config'

describe('ssr', () => {
  setupTest({
    config,
    fixture: false,
    server: true
  })

  it('renders the index page', async () => {
    const { body } = await get('/')

    expect(body).toContain('Hello world!')
  })
})

Unfortunately there are trade offs. The test-utils are creating random build directory for each build to avoid race conditions. With fixture: false this precaution will be disabled.
By the way, test-utils preset is unnecessary with your setup. The preset only adds testEnvironment: node (the new default since Jest v27) and includes transform option (you are overriding anyway).

Here's a minimal repro repo.
It works until I added @nuxtjs/style-resources. Which is exporting ESM anyway, should I make it pass through babel ?

can you look at this comment https://github.com/nuxt/test-utils/issues/165#issuecomment-923792271

@GMartigny Are you planning to test your web app in a browser using Playwright? In this case it is better idea to use Playwright Test Runner instead of Jest (with Test Utils). See my comments here.
There are many reasons why Playwright Test Runner is a better choice. For example, your app will grow, you will want to split tests into several files. In case you use the Test utils, you will have to include setupTest in each file. Every time calling setupTest will build fresh app. That’s slow. Your app did not change, why to rebuild? To avoid that you can run nuxt build before running tests and disable built step:
setupTest({
    fixture: false,
    server: true,
    build: false,
    config: {
        buildDir: '.nuxt',
        ...config
    }
})

Using Playwright Test Runner you don’t need to repeat this boilerplate code. In general, Jest is great tool for unit testing, but for testing in browser Playwright Test Runner is way better choice. Check Playwright’s website, they recommend using their runner instead of any other solution. Simply try to set up tests so that: one particular test is running in only one particular browser; or running all tests in all browsers; or mocking some server response; not to mention the situation which I described above.
This will be complicated with Jest. It does not scale.
Also keep in mind that from very beginning Nuxt Test Utils were made to help testing Nuxt modules. Pass different settings to setupTest, build a fixture and test your module’s logic in various situations. You simply don’t need all this functionality to test web app.

Back to your question. @nuxtjs/style-resources is not ESM module. File extension is .js, "type": "module" is not declared in package.json, so Node will treat this module as CJS, but will choke on export default (line 6). We can change file extension or add "type": "module", but require does not exist in ESM (it is used in the very first line). This code is written is Javascript, but according to Node’s specification this is not CJS, nor ESM module.
Should everything published on npm be a Node module? That’s not necessary at all. @nuxtjs/style-resources is a Nuxt module. Nuxt can load it, but Node cannot.
What about Jest? Jest follows Node’s module specification. So Jest cannot load Nuxt modules. Wait.. Nuxt CLI runs on Node and modules are loaded as expected. Why Jest cannot do the same? Well.. look here.
To be able to load Nuxt modules (the ones which are mixing CJS and ESM syntax) Nuxt is replacing the require function. In CJS module require is just another variable, one can overwrite it and nobody will complain. For example, in Node we cannot require ESM modules, but Nuxt’s require allows this. It checks the source and transforms on demand.
All works smooth until it does not. The lines which I was referencing are detecting the Jest’s global object. If Jest is present Nuxt does not use its require function anymore. Jest’s require is used. Hm.. On surface both of them are require functions, but they are not interchangeable. As I was explaining, Jest is following Node specification and it simply cannot load Nuxt modules.
Same example, one can require ESM module from inside Nuxt. It works, because everything is transformed into CJS. Jest’s require will throw, because ESM modules cannot be required, they must be imported.
Here is an idea for another workaround. Run Jest in ESM mode and include injectGlobals: false in your Jest config. There is no Jest global anymore, Nuxt cannot detect it and is using its own require. Nuxt modules are loaded as expect, but there is another problem – the Test utils depend on Jest’s globals.
Thanks for reading. Please use Playwright Test Runner (;

Also keep in mind that from very beginning Nuxt Test Utils were made to help testing Nuxt modules.
@mrazauskas

So nuxt test utils with browser:true is using playwright but not with their runner I guess.
I hoped I could use setupTest in combination with the playwright test runner but this isnt is working as expected. So I think this brings up a lot of confusion for newcomers.
Whats bothering me is that the e2e:setupTest are taking a lot of time to finish. Will try with playwright test runner again.

@regenrek Thanks for note. I added couple of lines to my previous comment.
Yes, Playwright can be used with Jest too. This was the only way to test with Playwright for some time, but they released own test runner rather recently.
Each time called setupTest will build your app (or fixture) from scratch. That’s the slowest part of a test. In some cases it is a must, in other cases this is unnecessary overhead. In general e2e are slow ones by nature.