psql stuck on reconnection

To reproduce:

Connect with "quick connect:

$ psql -h start.zenith.tech
NOTICE:  ☀  Welcome to Zenith!
To proceed with database creation, open the following link:

    https://console.zenith.tech/psql_session/4d754295011d1690

It needs to be done once and we will send you '.pgpass' file,
which will allow you to access or create databases without opening your web browser.
NOTICE:  Connecting to database.
psql (13.5 (Debian 13.5-0+deb11u1), server 14.2)
WARNING: psql major version 13, server major version 14.
         Some psql features might not work.
Type "help" for help.

heikki=>

Connect again, with the \c command

heikki=> \c
NOTICE:  ☀  Welcome to Zenith!
To proceed with database creation, open the following link:

    https://console.zenith.tech/psql_session/712b63cd43e0b9b2

It needs to be done once and we will send you '.pgpass' file,
which will allow you to access or create databases without opening your web browser.
^C
^C^C
^C^C

Without opening the link, try killing psql with CTRL-C. It doesn't work. It does work in the first connection attempt, but when reconnecting with \c it does not.

Without opening the link, try killing psql with CTRL-C. It doesn't work. It does work in the first connection attempt, but when reconnecting with \c it does not.

Perhaps this is because psql keeps previous connection active while it reconnects with new params. Shows same behavior on direct connections to pg.

Actually first connection arms SIGINT handler,
https://github.com/zenithdb/postgres/blob/1dc6535b877050a3b3768ca1ed140dd15a1a3e78/src/bin/psql/startup.c#L303
and second connection stays in sock poller waiting for ready-for-query (or error) response,
https://github.com/zenithdb/postgres/blob/1dc6535b877050a3b3768ca1ed140dd15a1a3e78/src/interfaces/libpq/fe-misc.c#L1074-L1076

Hmm, I wonder if this is similar to https://github.com/zenithdb/zenith/issues/1213

It worked for me. I think #1448 fixed it. @hlinnaka can you confirm that it works for you?

It worked for me. I think #1448 fixed it. @hlinnaka can you confirm that it works for you?

I can still reproduce this. Might depend on the psql version, mine is:
$  psql --version
psql (PostgreSQL) 13.5 (Debian 13.5-0+deb11u1)

But I could also reproduce it with a version of psql built from Postgres master branch.

Can repro this by dropping traffic from pg for the auxiliary query cancel connection and psql gets blocked on connect. Any connectivity issue will create similar results.

@vadim2404 not sure if this is still relevant, added compute label

neondb=> \c
psql (14.7 (Homebrew), server 15.2)
WARNING: psql major version 14, server major version 15.
         Some psql features might not work.
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
You are now connected to database "neondb" as user "vadim".
neondb=> \c
psql (14.7 (Homebrew), server 15.2)
WARNING: psql major version 14, server major version 15.
         Some psql features might not work.
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
You are now connected to database "neondb" as user "vadim".

I can still reproduce this. Note that this is specifically related to the "link authentication", with pg.neon.tech.

gotcha, didn't get this detail first

BTW, should we fix it in psql? I guess makes sense to exit on Ctrl-C in any state?

yep.
@tristan957, you've been looking into ctrl-c with pgbench, could you have a look at this too?

In a perfect world, I think the libpq interfaces should take the equivalent of Go's context.Context. Here is a diff I came up with to restore the expected SIGINT behavior:
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 6733f008fd..5a5e7d98b7 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3532,6 +3532,8 @@ do_connect(enum trivalue reuse_previous_specification,
 		const char **values = pg_malloc((nconnopts + 1) * sizeof(*values));
 		int			paramnum = 0;
 		PQconninfoOption *ci;
+		struct sigaction oldact;
+		struct sigaction newact = { 0 };

 		/*
 		 * Copy non-default settings into the PQconnectdbParams parameter
@@ -3576,9 +3578,14 @@ do_connect(enum trivalue reuse_previous_specification,
 		keywords[paramnum] = NULL;
 		values[paramnum] = NULL;

+		newact.sa_handler = SIG_DFL;
+		sigaction(SIGINT, &newact, &oldact);
+
 		/* Note we do not want libpq to re-expand the dbname parameter */
 		n_conn = PQconnectdbParams(keywords, values, false);

+		sigaction(SIGINT, &oldact, NULL);
+
 		pg_free(keywords);
 		pg_free(values);

The intention of the patch is to use the default signal handler while within libpq. Then, when we get out of it, restore the psql signal handler. I have a feeling this patch doesn't work on Windows, though I am not even sure if this problem also reproduced on Windows.
The reason it works for the first db connection is that setup_cancel_handler() isn't called until after the first PQconnectdbParams().

https://www.postgresql.org/message-id/CUAJJDVD8L61.2AH6VEEDMTXX3%40gonk

Confirming I can still reproduce this. However, I don't think it's a concern for proxy so I'm removing the label

Committed today. I don't think it'll be back-patched, but available for PG 17.


make bert tf use pb file by default

looks good to me. @christ1ne @guschmue I am fine with this change. Thanks!

LGTM @guschmue?


环境问题

为什么我使用了你提供的surfgen的yml环境，运行“python gen.py --outdir example --check_point ./ckpt/val_119.pt --ply_file ./example/3cl_pocket_8.0_res_1.5.ply”这个命令时报错：Traceback (most recent call last):
File "gen.py", line 12, in
from utils.transforms import *
File "/home/data1/XRJ/SurfGen-main/utils/transforms.py", line 14, in
from torch_geometric.nn.pool import knn_graph
File "/home/data1/anaconda3/envs/geobind/lib/python3.7/site-packages/torch_geometric/init.py", line 4, in
import torch_geometric.data
File "/home/data1/anaconda3/envs/geobind/lib/python3.7/site-packages/torch_geometric/data/init.py", line 1, in
from .data import Data
File "/home/data1/anaconda3/envs/geobind/lib/python3.7/site-packages/torch_geometric/data/data.py", line 9, in
from torch_sparse import SparseTensor
ModuleNotFoundError: No module named 'torch_sparse'

Dear Sir, the error suggests that you lack the torch_sparse, which may imply that your PyG suite is not successfully installed. My environment is built upon the CUDA 11.3, please manually config your environment according to your own CUDA version.

尊敬的先生，该错误表明您缺少torch_sparse，这可能意味着您的 PyG 套件未成功安装。我的环境是基于 CUDA 11.3 构建的，请根据您自己的 CUDA 版本手动配置您的环境。

Thank you so much for your reply, it solved the problem for me.I managed to generate some small s of "3cl".I noticed that you used an "in situ estimation of binding energy—scoring energy" method in your validation experiments, can you specify how this was accomplished?

Dear Sir, I have summarized the scripts at the https://github.com/HaotianZhangAI4Science/AI-Physics-DrugDiscovery/blob/main/pydocking/docking/qvina.py, the function scoring_with_qvina02 is exactly what you want.


16bit texture-files over-ridden with 8-bit version, without asking

Blender version 2.8 -- 2019-05-20
I tried to export as GLTF with option "Separate gltf + texture".
(in order to make it use existing textures)
Instead of using the existing PNG files the
exporter over-wrote them with 8-bit version,
without telling me anything.
Expected behavior
Select-box : texture export or use-existing.
Reference existing textures.
Ask for metall+roughness maps to be combined into new single texture,
allow to use them separately. (checkbox: combine channels // use separate image-files)
Ask before overwriting.
Use 16bit / 32bit-float textures.
Version

OS: ubuntu 18.04
Blender Version _ 2.8 -- 2019-05-20
GLTF IO exporter included in release (addon)

Merging with https://github.com/KhronosGroup/glTF-Blender-IO/issues/428.
A couple questions, if you'd like to follow up on the other thread –

Do you mean that the 16-bit source texture on disk is being overwritten when you export the file? Or that the glTF file is exported with a new, 8-bit version of the same texture, with a different path?
Note on glTF and engine support: https://github.com/KhronosGroup/glTF/issues/1561

the textures on disk were over-written (by chosing the same directory for export).

@donmccurdy That's correct.  You may recall that you contributed some logic to protect against this, but, that piece of logic was removed here and has not yet been rewritten.
Until this gets fixed, I recommend always exporting to a dedicated export-only folder.


xcframework

title:  "Learning XCFramework"
description: "What is xcframework and how to create and use it and how to convert universal fat framework to xcframework"
date:   2021-05-26 20:00:00 +0900
categories: [framework]
naver sdk to xcframework
otool -L Developer.app/Contents/MacOS/Developer

https://blog.embrace.io/xcode-12-and-xcframework/
https://developer.apple.com/videos/play/wwdc2020/10147/
https://developer.apple.com/documentation/swift_packages/distributing_binary_frameworks_as_swift_packages
http://minsone.github.io/ios/mac/ios-framework-part-1-static-framework-dynamic-framework
https://medium.com/@zippicoder/libraries-frameworks-swift-packages-whats-the-difference-764f371444cd
https://medium.com/strava-engineering/convert-a-universal-fat-framework-to-an-xcframework-39e33b7bd861
https://developer.apple.com/videos/play/wwdc2019/416/

https://blog.embrace.io/xcode-12-and-xcframework/

https://stackoverflow.com/questions/32591878/ios-is-it-a-static-or-a-dynamic-framework
http://alazydevelopersessay.blogspot.com/2017/07/ios-framework.html
https://github.com/minsOne/minsOne.github.io/issues/3

https://blog.embrace.io/xcode-12-and-xcframework/


[QUESTION] How to use plugins with asset=true configuration?

I just installed Datatables Plugins and use this config :
'Datatables' => [
    'active' => false,
    'files' => [
        [
            'type' => 'js',
            'asset' => true,
            'location' => 'datatables/js/jquery.dataTables.min.js',
        ],
        [
            'type' => 'js',
            'asset' => true,
            'location' => 'datatables/js/dataTables.bootstrap4.min.js',
        ],
        [
            'type' => 'css',
            'asset' => true,
            'location' => 'datatables/css/dataTables.bootstrap4.min.css',
        ],
    ],
],

Here is my test blade code :
@extends('adminlte::page')

@section('plugins.Datatables', true)

@section('title', 'Dashboard')

@section('content_header')

Dashboard

@stop

@section('content')

                Key
                Value

@stop

@section('js')

@stop

As it mentions on https://github.com/jeroennoten/Laravel-AdminLTE/wiki/Plugins-Configuration, when you use asset=>True the css & script location will be using laravel asset(), but it does not work on my case.
On my page, it generates :
http://xxx/datatables/css/dataTables.bootstrap4.min.css
http://xxx/datatables/js/jquery.dataTables.min.js
http://xxx/datatables/js/dataTables.bootstrap4.min.js

When it should be :
http://xxx/vendor/datatables/css/dataTables.bootstrap4.min.css
http://xxx/vendor/datatables/js/jquery.dataTables.min.js
http://xxx/vendor/datatables/js/dataTables.bootstrap4.min.js

I have not changed my project ASSET_URL, because the other css & script is generated correctly like this :
http://xxx/vendor/jquery/jquery.min.js
http://xxx/vendor/bootstrap/js/bootstrap.bundle.min.js
http://xxx/vendor/overlayScrollbars/js/jquery.overlayScrollbars.min.js
http://xxx/vendor/adminlte/dist/js/adminlte.min.js

So, am i using this config wrong, if so how to use this config properly ?
Of course i can just use the exact path on the location like this '/vendor/datatables/js/jquery.dataTables.min.js', but i think if i can use the config as it mentions on the wiki, it will be better.

@kevince09 I think the asset() method usually point to the public folder within your Laravel application. So, use of '/vendor/datatables/js/jquery.dataTables.min.js' will be alright. You can check source code at https://github.com/jeroennoten/Laravel-AdminLTE/blob/master/resources/views/master.blade.php as a reference, there vendor is prepend to all urls when using the asset() method.

Okay, i just misunderstood the asset() and the example from wiki after all. I thought it will points to public/vendor by default (or when using this package) and assume the default code is like this :

But i forgot that, of course you can place css folder directly under public directory, and vendor is just another directory like css from the example.
Thank you @dfsmania


 They block doors and small rooms.
mini boss

Out of Scope.


attempt to fix travis

hey I ran into this as well as this to the travis.yml file to fix it after the jdk:
before_install:

cat /etc/hosts # optionally check the content before
sudo hostname "$(hostname | cut -c1-63)"
sed -e "s/^\(127\.0\.0\.1.*\)/\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
cat /etc/hosts # optionally check the content after


redirect to bogus URL generates low-level exception; can do better

This URL parses correctly, however the redirect leads to a bogus URL ---  (nice work Patch.com :-)
Can we cause this to generate a more useful exception?  Something specifically about the redirect being bogus?
Here is the URL parsing correctly:
>>> import urlparse
>>> urlparse.urlparse('http://stclairshores.patch.com/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day')
ParseResult(scheme='http', netloc='stclairshores.patch.com', path='/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day', params='', query='', fragment='')
>>> urlparse.urlparse('http://stclairshores.patch.com/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day').port
>>>

Here is the redirect that it generates...  notice the http://http:// at the beginning of the new location!
>>> r = requests.get('http://stclairshores.patch.com/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day', allow_redirects=False)
>>> r.headers
{'status': '302', 'content-length': '160', 'content-encoding': 'gzip', 'set-cookie': 'p13n=%5B%5D; path=/, _patch_session=BAh7BzoPc2Vzc2lvbl9pZCIlNmEzYzM4YzZjMWIxMTdiNDkxMmEwNmEwM2JmZDQzYTU6FnByb21wdF9mb3Jfc3VydmV5aQA%3D--547af227538bb1d039809a3d01eaadb320a9a42b; domain=patch.com; path=/', 'x-powered-by': 'Phusion Passenger (mod_rails/mod_rack) 3.0.11', 'vary': 'Accept-Encoding', 'server': 'Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l Phusion_Passenger/3.0.11', 'x-runtime': '15', 'location': 'http://http://www.dailytribune.com/articles/2011/11/09/news/doc4ebb336cad1c7378471368.txt?viewmode=fullstory', 'cache-control': 'no-cache', 'date': 'Mon, 23 Jan 2012 13:32:36 GMT', 'content-type': 'text/html; charset=utf-8', 'x-rack-cache': 'miss'}
>>>

So, of course urllib cannot open it:
>>> import urllib
>>> g = urllib.urlopen('http://stclairshores.patch.com/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day').read()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/urllib.py", line 84, in urlopen
    return opener.open(url)
  File "/usr/lib/python2.7/urllib.py", line 205, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 356, in open_http
    return self.http_error(url, fp, errcode, errmsg, headers)
  File "/usr/lib/python2.7/urllib.py", line 369, in http_error
    result = method(url, fp, errcode, errmsg, headers)
  File "/usr/lib/python2.7/urllib.py", line 632, in http_error_302
    data)
  File "/usr/lib/python2.7/urllib.py", line 659, in redirect_internal
    return self.open(newurl)
  File "/usr/lib/python2.7/urllib.py", line 205, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 331, in open_http
    h = httplib.HTTP(host)
  File "/usr/lib/python2.7/httplib.py", line 1061, in __init__
    self._setup(self._connection_class(host, port, strict))
  File "/usr/lib/python2.7/httplib.py", line 693, in __init__
    self._set_hostport(host, port)
  File "/usr/lib/python2.7/httplib.py", line 718, in _set_hostport
    raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: ''

urllib3 has the same error:
>>> http_pool = urllib3.connection_from_url('http://stclairshores.patch.com/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day')>>> r = http_pool.get_url('http://stclairshores.patch.com/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day')Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "urllib3/request.py", line 136, in get_url
    **urlopen_kw)
  File "urllib3/request.py", line 78, in request_encode_url
    return self.urlopen(method, url, **urlopen_kw)
  File "urllib3/connectionpool.py", line 410, in urlopen
    retries - 1, redirect, assert_same_host)
  File "urllib3/connectionpool.py", line 336, in urlopen
    if assert_same_host and not self.is_same_host(url):
  File "urllib3/connectionpool.py", line 246, in is_same_host
    scheme, host, port = get_host(url)
  File "urllib3/connectionpool.py", line 538, in get_host
    port = int(port)
ValueError: invalid literal for int() with base 10: ''
>>>

and it propagates through to requests too:
>>>
>>> r = requests.get('http://stclairshores.patch.com/articles/shores-veteran-to-receive-complimentary-wedding-on-veterans-day')Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 50, in get
    return request('get', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 38, in request
    return s.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 200, in request
    r.send(prefetch=prefetch)
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 514, in send
    self._build_response(r)
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 253, in _build_response
    request.send()
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 430, in send
    conn = self._poolmanager.connection_from_url(url)
  File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/poolmanager.py", line 94, in connection_from_url
    scheme, host, port = get_host(url)
  File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 524, in get_host
    port = int(port)
ValueError: invalid literal for int() with base 10: ''

What kind exception did you have in mind?

What kind exception did you have in mind?

Anything that can be caught with something less broad than ValueError
would be an improvement.
Would an exception called "InvalidRedirectURL" be consistent with existing
style?
This issue also exists in python requests library, where it is more
general, because the redirect URL might parse properly and then only
expose itself as bogus when it attempts DNS.  See this ticket:
https://github.com/kennethreitz/requests/issues/380
Maybe we can design one exception that can be used in both places?
In the specific example here, the URL proposed by the redirect would not
be accepted by a call to get_host, so maybe just a try..except around
that?

urllib3.get_host('bogus:')
Traceback (most recent call last):
File "", line 1, in
File "urllib3/connectionpool.py", line 538, in get_host
port = int(port)
ValueError: invalid literal for int() with base 10: ''

Here's the actual example:

u = 'http://http://www.dailytribune.com/articles/2011/11/09/news/doc4ebb336cad1c7378471368.txt?viewmode=fullstory'
urllib3.get_host(u)
Traceback (most recent call last):
File "", line 1, in
File "urllib3/connectionpool.py", line 538, in get_host
port = int(port)
ValueError: invalid literal for int() with base 10: ''

Would an exception called "InvalidRedirectURL" be consistent with existing style?

Well, the same problem is when you call get with such invalid url so it's more universal problem.

I think the answer is something like a HostParseError which inherits from both urllib3.exceptions.HTTPError and ValueError. Thoughts?

Yes, an exception that inherits from both is a good idea.
I don't understand the name "HostParseError" -- that seems to imply that there is something wrong with only the hostname in the URL.  Don't we mean that the URL is generally invalid?  Maybe InvalidURL?
It would also be nice to have a way to know that the InvalidURL was generated by a redirect rather than a URL that I fed into urllib3.  Is there another way of detecting that besides having another type of exception called something like InvalidURLFromRedirect?
Here's the URL normalization code that I have been using.  As you can see, it calls sys.exit() if it fails to catch a new flavor of InvalidURL.   It now catches a good variety of invalid URLs in the first few million URLs from this rather unclean source.  I'll let you know if I find meaningfully different types of errors as I ramp up to the next couple hundred million URLs.
Parts of this were derived from requests --- however they really don't clean up the URLs enough there either.  For example, currently requests library only requotes the path, and there are plenty of partially quoted parameter strings out there on the open Web.  This code fully requotes all relevant parts.  The various normalizing steps here are intended to make it easy to detect duplicate URLs that might have started off differently, e.g. with capital letters in the hostname or scheme, or some other oddity that makes the strings different even though the resource that they locate is the same.
import re
import hashlib
import traceback
import xml.sax.saxutils
from urlparse import urlparse, urlunparse
from urllib import quote, unquote
allowed_schemes = ['http', 'https']

class InvalidURL(BaseException):
    pass

def encode_and_requote(part):
    """Re-quote this part of a URL

    This function passes <part> through an unquote/quote cycle to
    ensure that it is fully and consistently quoted.
    """
    if isinstance(part, unicode):
        try:
            part = part.encode('utf-8')
        except Exception, exc:
            raise InvalidURL("Invalid URL: %r.encode('utf-8') failed (%s) url=%r" % (part, str(exc), url))
    try:
        part = quote(unquote(part), safe=b'')
    except Exception, exc:
        raise InvalidURL("Invalid URL: quote(unquote(%r, safe=b'') failed (%s) url=%r" % (part, str(exc), url))
    return part

def encode_and_requote_path(path):
    """Re-quote each component of a URL <path>.

    This function passes each part of <path> through an unquote/quote
    cycle to ensure that it is fully and consistently quoted.
    """
    parts = path.split(b'/')
    parts = (encode_and_requote(part) for part in parts)
    return b'/'.join(parts)

double_quoted_url_re = re.compile('''^\"*(?P<url>.*?)\"*$''')
valid_netloc = re.compile("^[a-z0-9-.]+(:[0-9]+)?$")

def normalize_url(url):
    """
    Takes a URL string as input and returns a dict of parsed fields,
    unless it cannot, in which case it raises InvalidURL
    """
    original_url = url
    try:
        if url.startswith('http%3A%2F%2F'):
            url = unquote(url)
        # remove XML quoting of & > <
        url =  xml.sax.saxutils.unescape(url)

        # Drop any number of double quote marks before or after it
        url = double_quoted_url_re.search(url).group('url')

        # Support for unicode domain names and paths.
        scheme, netloc, path, params, query, fragment = urlparse(url)

        if not scheme:
            raise InvalidURL("Invalid URL: no scheme supplied in url=%r" % url)

        scheme = scheme.lower().strip()
        if scheme not in allowed_schemes:
            raise InvalidURL("Invalid URL: not http or https url=%r" % url)

        try:
            netloc = netloc.encode('idna').lower().strip()
        except Exception, exc:
            raise InvalidURL("Invalid URL: encode('idna') failed on netloc=%r reason=%r url=%r" % (netloc, exc, url))

        if not netloc == netloc.decode('utf-8'):
            raise InvalidURL("Invalid URL: changed by netloc.decode('utf-8') netloc=%r url=%r" % (netloc, url))

        if not valid_netloc.match(netloc):
            raise InvalidURL("InvalidURL: invalid netloc=%r url=%r" % (netloc, url))

        path     = encode_and_requote_path(path.lstrip())
        params   = encode_and_requote(params)
        query    = encode_and_requote(query)

        fragment = encode_and_requote(fragment)

        # reconstruct URL without fragment
        abs_url = (urlunparse([ scheme, netloc, path, params, query, '' ]))

    except Exception, exc:
        if type(exc) is InvalidURL:
            raise exc
        else:
            #raise InvalidURL("Invalid URL: unhandled failure url=%r\n%s\nInvalidURL" % (url, traceback.format_exc(exc)))
            import sys
            sys.exit("Invalid URL: unhandled failure url=%r\n%s\nInvalidURL" % (url, traceback.format_exc(exc)))

    # use scheme and netloc as unique identifier of target
    schost = scheme + '://' + netloc
    url_rec = {
        'fragment': fragment,
        'abs_url': abs_url,
        'doc_id': hashlib.md5(abs_url).hexdigest(),
        'schost': schost,
        'host_id': hashlib.md5(schost).hexdigest()
        }
    if original_url != abs_url:
        url_rec['original_url'] = original_url
    return url_rec

I'm closing this issue. We can discuss more effective host parsing in another issue as it comes up. :)

I'm still hitting this issue, and finding this little bit of info was rather hard.  I think that revisiting the error message is a valid expenditure of effor

@mansweet Fab, I'm looking forward to seeing a PR from you then. :smile:
(All joking aside, I think it's valuable too, but telling people what is a valid use of their time is not the most polite thing to do in the whole world. In this case, given that this issue has been closed for more than 5 years, you'll probably do best to open a new issue treating your case as a new bug report, providing all of the appropriate detail (e.g. stack trace, urllib3 version).)

@shazow , I have the impression that you want only to create new issues to discuss issues instead of fixing problems in the original ticket, I can't understand why. You did the same here https://github.com/urllib3/urllib3/issues/38 ...

@sofiand-png urllib3 is a community project, you're very welcome to help fix problems that are important to you. That's what I do, too.
If you look a little closer, I did indeed push a fix to the original problem before closing the issue. And since then, we have completely rewritten the parsing, so whatever problems it has are completely new.
If you have a bug to report, please open an issue to discuss and I encourage you to follow up with a pull request that fixes your bug. Thank you!


config Absinthe.Relay causes warnings

When configuring Absinthe.Relay (e.g. setting custom ID translator):
config Absinthe.Relay, MyApp.Schema,
  global_id_translator: MyApp.Schema.CustomIDTranslator

Mix yells with following warning:
You have configured application Absinthe.Relay in your configuration file,
but the application is not available.

This usually means one of:

  1. You have not added the application as a dependency in a mix.exs file.

  2. You are configuring an application that does not really exist.

Please ensure Absinthe.Relay exists or remove the configuration.

Would it be possible to remove it? Thanks! 😄

Ah, yeah Absinthe.Relay is using a non standard configuration pattern there, we should fix it. Honestly this ought to be set as like a module attribute on the schema or something and not in config.

ok, I changed my code to pass global_id_translator as use Absinthe.Schema argument and let it read the value from custom config parameter.
I assume it may be better then to reword this issue as deprecate config Absinthe.Relay, isn't it? If so, I'm leaving the state of the issue to you


anyOf + const not behaving as expected?

Schema:
{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "type": "object",
    "properties": {
        "channels": { "type": "array", "items": {"$ref": "#/definitions/channel"} }
    },
    "additionalProperties": false,
    "required": ["channels"],

    "definitions": {
        "channel": {
            "type": "object",
            "properties": {
                "name": { "type": "string" },
                "samples": { "type": "array", "items": {"$ref": "#/definitions/sample"} }
            },
            "required": ["name", "samples"],
            "additionalProperties": false
        },
        "sample": {
            "type": "object",
            "properties": {
                "name": { "type": "string" },
                "data": { "type": "array", "items": {"type": "number"} },
                "modifiers": {
                    "type": "array",
                    "items": {
                        "anyOf": [
                            { "$ref": "#/definitions/modifier/histosys" },
                            { "$ref": "#/definitions/modifier/normfactor" },
                            { "$ref": "#/definitions/modifier/normsys" },
                            { "$ref": "#/definitions/modifier/shapefactor" },
                            { "$ref": "#/definitions/modifier/shapesys" }
                        ]
                    }
                }
            },
            "required": ["name", "data", "modifiers"],
            "additionalProperties": false
        },
        "modifier": {
            "histosys": {
                "type": "object",
                "properties": {
                    "name": { "type": "string" },
                    "type": { "const": "histosys" },
                    "data": { "type": "object", "required": ["lo_data", "hi_data"] }
                },
                "required": ["name", "type", "data"],
                "additionalProperties": false
            },
            "normfactor": {
                "type": "object",
                "properties": {
                    "name": { "type": "string" },
                    "type": { "const": "normfactor" },
                    "data": { "type": "null" }
                },
                "required": ["name", "type", "data"],
                "additionalProperties": false
            },
            "normsys": {
                "type": "object",
                "properties": {
                    "name": { "type": "string" },
                    "type": { "const": "normsys" },
                    "data": { "type": "object", "required": ["lo", "hi"] }
                },
                "required": ["name", "type", "data"],
                "additionalProperties": false
            },
            "shapefactor": {
                "type": "object",
                "properties": {
                    "name": { "type": "string" },
                    "type": { "const": "shapefactor" },
                    "data": { "type": "null" }
                },
                "required": ["name", "type", "data"],
                "additionalProperties": false
            },
            "shapesys": {
                "type": "object",
                "properties": {
                    "name": { "type": "string" },
                    "type": { "const": "shapesys" },
                    "data": { "type": "array", "items": {"type": "number"} }
                },
                "required": ["name", "type", "data"],
                "additionalProperties": false
            }
        }
    }
}

Input JSONs
{
    "channels": [
        {
            "name": "channel",
            "samples": [
                {
                    "data": [3],
                    "modifiers": [
                        {
                            "data": [1],
                            "name": "a_name",
                            "type": "this_should_not_exist"
                        }
                    ],
                    "name": "ttbar"
                }
            ]
        }
    ]
}

This can be tested pretty easily:
import json, jsonschema

schema = json.loads(''' ... ''')
input = json.loads(''' ... ''')
jsonschema.validate(input, schema)

The online tool here (https://www.jsonschemavalidator.net/) is able to raise a validation error. What's even more interesting is that the line "data": [1], seems to be what trips up jsonschema a lot for some reason.
Raises validation error:

"data": [""],
"data": null,
"data": 1, (this raises 1 is not of type u'array'. which isn't really correct since that depends on what the type is for matching....)

Does not raise validation error:

"data": [1],
"data": [],

What's very strange in that in some cases where a validation error is raised, it's not for the right reason. If I'm defining this schema wrong, it would be great to know -- or if there's a better way to do it.

Hi.
Happy to help here, but please work on reducing your example to a SSCCE so there's less to wade through.
Since you're using Draft 6, please also confirm you're using HEAD, or one of the alpha releases.

Since you're using Draft 6, please also confirm you're using HEAD, or one of the alpha releases.

v3.0.0a2 worked for me! I wasn't aware the alpha releases had existed for draft 6 specifically and solves this issue. I was on 2.6.0 previously.
Let me know if you still want an SSCCE or feel free to close this issue :)

Great, glad you got it working!


Refactor surface and ICs

This PR refactors the surface and IC functions by

Passing ThermodynamicsParameters instead of all of ClimaAtmosParameters
Improves names: surface_ref_state -> surface_thermo_state
Avoids passing namelist into the Cases module to better decouple the namelist from initialization

bors r+

bors r+

bors r+


ERROR cannot convert type: types.Decimal

Using latest one, the Error cannot convert type: types.Decimal occurred from sqlboiler when inserting data at Decimal type.
For now, workaround is to use very old one.
replace github.com/ericlagergren/decimal => github.com/ericlagergren/decimal v0.0.0-20181231230500-73749d4874d5

Is there any plan to fix this issue on current code?

this is a duplicate of  #154
see also https://github.com/volatiletech/sqlboiler/issues/803#issuecomment-660742115


@import “breakpoint”; throws not found error

(from http://stackoverflow.com/questions/17090191/import-breakpoint-throws-not-found-error/17090653?noredirect=1#comment24723128_17090653)
I was working on this project yesterday using Sass and Breakpoint and everything was fine. This morning however when I went to compile using sass --watch .. I am getting this error:
error ../sass/screen.scss (Line 6: File to import not found or unreadable: breakpoint. Load path: /Users/MOD3/Sites/GABE/stylesheets/stylesheets)

I was having the same issue when using Breakpoints Sass installed via Bower following the  Breakpoint Wiki installation instructions.
The error message I was getting was the following:
error scss/style.scss (Line 1: File to import not found or unreadable: breakpoint.
Load path: ~Sites/example.dev/scss)

The Wiki documentation said to install Breakpoints via Bower and include Breakpoints as an include:

Install Breakpoints
$ bower install breakpoint-sass --save-dev
Import Breakpoints Sass (e.g. scss/style.scss)
@import "breakpoint";

The Wiki doesn't provide much information for troubleshooting, but the solution was to include Breakpoints Sass from the _bower_components directory in your Sass file:
@import "../bower_components/breakpoint-sass/stylesheets/_breakpoint.scss";
For anyone experiencing this problem, the fix was to change the import / include path to point Sass to where the Breakpoints Sass files were located at.
Kudos to Piotr Sikora for writing a helpful tutorial and documenting his workflow on using Breakpoints Sass with Bower and Gulp.


notepadplusplus: Fixed persist, change pre_install and uninstaller.script properties

Closes #10263

[x] I have read the Contributing Guide.

/verify


SW-5626 Application API changes

Boundary is no longer accepted at creation time since it would never have been
populated at that point anyway.
Non-internal users see an application status of "In Review" instead of some of
the underlying statuses.
The "list applications" endpoint now requires an explicit query string parameter
to return the admin-only list of all applications; previously that would have
been the default behavior.

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#2165
#2164  👈
#2163
#2162
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @sgrimm and the rest of your teammates on  Graphite


http.webdav doesn't work on armv7

Good afternoon!
I've installed caddy 0.10.4 with http.webdav on my armv7 server (cubietruck) and I have an error:
 Parse error: Unknown directive 'webdav'
caddyfile is:
files.domain.ru
basicauth /  login 123456
webdav / /media

Hey @Rurik19! As it is stated on the documentation, "Currently not compatible with the build server. Don't download it.". It will only be available when Caddy 0.10.5 is out, unless you build Caddy from source of course. Sorry for the trouble 😞

http.filemanager doesn't work as well with similar error

File Manager should work. Did you select http.filemanager on the download page?

Just reinstall and filemanager works now. Thank you!

No problem 😄 Sorry for not having webdav working now though 😞